public void Save_History_Info(OTPT_HISTROY_DAO obj_OTPT_HISTROY_DAO) { sqlCon = new SqlConnection(strConn); try { sqlCon.Open(); sqlCmd = new SqlCommand("SP_TXN_OTPT_HISTORY_INFO", sqlCon); sqlCmd.CommandTimeout = Convert.ToInt32(ConfigurationManager.AppSettings["CommandTimeOut"].ToString()); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.Parameters.AddWithValue("@SZ_PATIENT_ID", obj_OTPT_HISTROY_DAO.SZ_PATIENT_ID); sqlCmd.Parameters.AddWithValue("@SZ_CASE_ID", obj_OTPT_HISTROY_DAO.SZ_CASE_ID); sqlCmd.Parameters.AddWithValue("@SZ_BILL_NO", obj_OTPT_HISTROY_DAO.SZ_BILL_NO); sqlCmd.Parameters.AddWithValue("@SZ_PHYSICIAN_REFERRING", obj_OTPT_HISTROY_DAO.SZ_PHYSICIAN_REFERRING); sqlCmd.Parameters.AddWithValue("@SZ_PRE_INJURY_HISTROY", obj_OTPT_HISTROY_DAO.SZ_PRE_INJURY_HISTROY); sqlCmd.Parameters.AddWithValue("@SZ_COMPANY_ID", obj_OTPT_HISTROY_DAO.SZ_COMPANY_ID); sqlCmd.ExecuteNonQuery(); } catch (SqlException ex) { Elmah.ErrorSignal.FromCurrentContext().Raise(ex); } finally { if (sqlCon.State == ConnectionState.Open) { sqlCon.Close(); } } }
private void LoadData() { string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url); using (Utils utility = new Utils()) { utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod()); } _objOTPT = new OTPT(); _OTPT_HISTROY_DAO = new OTPT_HISTROY_DAO(); DataSet dsgethistroy = new DataSet(); try { dsgethistroy = _objOTPT.GET_Histroy_Information_OTPT(txtCaseID.Text, txtCompanyID.Text); if (dsgethistroy.Tables.Count > 0) { if (dsgethistroy.Tables[0].Rows.Count > 0) { if (dsgethistroy.Tables[0].Rows[0].ToString() != "" && dsgethistroy.Tables[0].Rows[0].ToString() != null) { txtDiagnosis.Text = dsgethistroy.Tables[0].Rows[0]["SZ_PHYSICIAN_REFERRING"].ToString(); txtprehistroyinjury.Text = dsgethistroy.Tables[0].Rows[0]["SZ_PRE_INJURY_HISTROY"].ToString(); } } } } catch (Exception ex) { Elmah.ErrorSignal.FromCurrentContext().Raise(ex); using (Utils utility = new Utils()) { utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod()); } string str2 = "Error Request=" + id + ".Please share with Technical support."; base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2); } //Method End using (Utils utility = new Utils()) { utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod()); } }
private void SaveData() { string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url); using (Utils utility = new Utils()) { utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod()); } _OTPT_HISTROY_DAO = new OTPT_HISTROY_DAO(); _objOTPT = new OTPT(); try { _OTPT_HISTROY_DAO.SZ_PATIENT_ID = txtPatientID.Text; _OTPT_HISTROY_DAO.SZ_CASE_ID = txtCaseID.Text; _OTPT_HISTROY_DAO.SZ_BILL_NO = txtBillNumber.Text; _OTPT_HISTROY_DAO.SZ_PHYSICIAN_REFERRING = txtDiagnosis.Text; _OTPT_HISTROY_DAO.SZ_PRE_INJURY_HISTROY = txtprehistroyinjury.Text; _OTPT_HISTROY_DAO.SZ_COMPANY_ID = txtCompanyID.Text; _objOTPT.Save_History_Info(_OTPT_HISTROY_DAO); } catch (Exception ex) { Elmah.ErrorSignal.FromCurrentContext().Raise(ex); using (Utils utility = new Utils()) { utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod()); } string str2 = "Error Request=" + id + ".Please share with Technical support."; base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2); } //Method End using (Utils utility = new Utils()) { utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod()); } }