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

        try
        {
            dt = objDist.UpdateAnimalTypeBAL(txtAnimalTCode.Text, txtAnimalName.Text.Trim(), UserName, "U", ConnKey);
            if (dt.Rows.Count > 0)
            {
                objCommon.ShowAlertMessage(dt.Rows[0][0].ToString());
                txtAnimalTCode.Text = "";
                txtAnimalName.Text  = "";

                btn_Save.Visible       = true;
                txtAnimalTCode.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
        {
        }
    }