protected void btnSave_Click(object sender, EventArgs e) { double a, b, c, d; a = Convert.ToDouble(lblpurchasequantity.Text.ToString()); b = Convert.ToDouble(lblreceivedqty.Text.ToString()); c = Convert.ToDouble(txtreceivedquantity.Text.ToString()); d = b + c; if (a >= d) { int? insertgrnorecords; IFormatProvider provider = new System.Globalization.CultureInfo("en-CA", true); String datetime = txtgoodsreceiveddate.Text.ToString(); DateTime dt = DateTime.Parse(datetime, provider, System.Globalization.DateTimeStyles.NoCurrentDateDefault); objsupplyPL.goodsreceiveddate = dt; objsupplyPL.productid1 = Hidden1.Value.ToString(); objsupplyPL.purchaseid = Hid_Sno1.Value.ToString(); objsupplyPL.vehicleno = (txtvehicleno.Text.Trim().ToString() == "" ? null : txtvehicleno.Text.Trim()); objsupplyPL.grno = txtgrno.Text.Trim().ToString(); objsupplyPL.dcno = txtdcno.Text.Trim().ToString(); objsupplyPL.username = Session["username"].ToString(); objsupplyPL.quantity = Convert.ToDouble(lblpurchasequantity.Text.ToString()); objsupplyPL.receivedquantity = Convert.ToDouble(txtreceivedquantity.Text.ToString()); objsupplyPL.totalreceived = Convert.ToDouble(lblreceivedqty.Text.ToString()); objsupplyPL.branch = Hid_Sno.Value; insertgrnorecords = objsupplyBAL.insertgrnotorecords(objsupplyPL); buildBranches(); clear(); ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "UpdateDetails", "alert('Save Successful');", true); } }
if (a >= d)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)