单击按钮点击不点击?

时间:2013-10-26 04:43:29

标签: asp.net c#-4.0

 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);


    }
 }
实际上,此代码用于弹出窗口字段插入,如果我单击保存按钮,则显示保存成功消息..然后它转到常规aspx页面..在那个GRNO按钮有...然后我点击GRNO两次,第一次GRNO按钮没有被触发,第二次它会被触发

0 个答案:

没有答案