Exemplo n.º 1
0
    protected void btn_Update_Click(object sender, EventArgs e)
    {
        UPDATE = "U";
        DataTable dt = new DataTable();

        try
        {
            if (Validatedisease())
            {
                dt = objDist.UpdateDiseaseTypeBAL(txtDiseaseTCode.Text, txtDiseaseName.Text.Trim(), Session["UsrName"].ToString(), UPDATE, ConnKey);
                if (dt.Rows.Count > 0)
                {
                    objCommon.ShowAlertMessage(dt.Rows[0][0].ToString());
                    txtDiseaseTCode.Text    = "";
                    txtDiseaseName.Text     = "";
                    btn_Save.Visible        = true;
                    txtDiseaseTCode.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
        {
        }
    }