Example #1
0
    protected void btn_Save_Click(object sender, EventArgs e)
    {
        try
        {
            if (Validatedig())
            {
                UserName = Session["UsrName"].ToString();

                ddt = objDist.InsertDiagBAL(ddl_Ins_code.SelectedValue, ddlDiagTest.SelectedValue, txtTestFee.Text.Trim(), txtFeeP.Text.Trim(), UserName, ConnKey);
                if (ddt.Rows.Count > 0)
                {
                    objCommon.ShowAlertMessage(ddt.Rows[0][0].ToString());
                    DataTable dt = objDist.GetDiagTestDtls_ByUniqueInsIdBAL(ddl_Ins_code.SelectedValue.ToString(), ConnKey);
                    objCommon.BindDropDownLists(ddlDiagTest, dt, "DiagTestName", "DiagTestCode", "0");
                    txtTestFee.Text = "";
                    txtFeeP.Text    = "";
                }
                Viewdata();
            }
        }
        catch (Exception ex)
        {
            ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString());
            Response.Redirect("~/Error.aspx");
        }
    }