예제 #1
0
    protected void btn_Update_Click(object sender, EventArgs e)
    {
        UPDATE = "U";
        DataTable dt = new DataTable();

        try
        {
            if (ValiadteState())
            {
                dt = objDist.UpdateStateBAL(txtstateCode.Text, txtstateName.Text.Trim(), UPDATE, ConnKey);
                if (dt.Rows.Count > 0)
                {
                    objCommon.ShowAlertMessage(dt.Rows[0][0].ToString());
                    txtstateCode.Text    = "";
                    txtstateName.Text    = "";
                    btn_Save.Visible     = true;
                    txtstateCode.Enabled = true;
                }
                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
        {
        }
    }