Exemplo n.º 1
0
    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.UpdateDistBAL(Session["StateCd"].ToString(), txtDistCode.Text, txtDistName.Text.Trim(), ActiveSt, Session["UsrName"].ToString(), ConnKey);
                if (dt.Rows.Count > 0)
                {
                    objCommon.ShowAlertMessage(dt.Rows[0][0].ToString());
                    btn_Save.Visible    = true;
                    txtDistCode.Enabled = true;
                    txt_Date.Text       = "";
                    txtDistName.Text    = "";
                    txtDistCode.Text    = "";
                    btn_Update.Visible  = false;
                }
                getDistrictDtls();
            }
        }
        catch (Exception ex)
        {
            ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString());
            Response.Redirect("~/Error.aspx");
        }
    }