コード例 #1
0
 protected void btn_Save_Click(object sender, EventArgs e)
 {
     try
     {
         if (ValiadteState())
         {
             INSERT = "I";
             DataTable dt = new DataTable();
             dt = objDist.InsertStateBAL(txtstateCode.Text, txtstateName.Text.Trim(), INSERT, ConnKey);
             if (dt.Rows.Count > 0)
             {
                 objCommon.ShowAlertMessage(dt.Rows[0][0].ToString());
                 txtstateCode.Text = "";
                 txtstateName.Text = "";
             }
             Viewdata();
         }
     }
     catch (Exception ex)
     {
         ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString());
         Response.Redirect("~/Error.aspx");
     }
 }