protected void btn_Update_Click(object sender, EventArgs e)
 {
     try
     {
         if (Validate())
         {
             UPDATE = "U";
             int       ActiveSt = Convert.ToInt16(rbnSy.SelectedValue);
             DataTable dt       = new DataTable();
             dt = objDist.UpdateMandalBAL(ddl_dist_code.SelectedValue.ToString(), txtMandalCode.Text, txtMandalName.Text.Trim(), ActiveSt, Session["UsrName"].ToString(), UPDATE, ConnKey);
             if (dt.Rows.Count > 0)
             {
                 objCommon.ShowAlertMessage(dt.Rows[0][0].ToString());
                 txtMandalName.Text    = "";
                 txtMandalCode.Enabled = true;
                 btn_Save.Visible      = true;
                 btn_Update.Visible    = false;
                 txtMandalCode.Text    = "";
             }
             else
             {
                 objCommon.ShowAlertMessage(dt.Rows[0][0].ToString());
             }
             Viewdata();
         }
     }
     catch (Exception ex)
     {
         ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString());
         Response.Redirect("~/Error.aspx");
     }
     finally
     {
     }
 }