protected void Page_Load(object sender, EventArgs e) { btnSave.Attributes.Add("onclick", "return formValidator('form1','ddlStatus');"); btnDelete.Attributes.Add("onclick", "return ConfirmDelete();"); if (!IsPostBack) { BindTimeControl(); string id = Request.QueryString["id"].ToString(); txtEventID.Text = id; Bill_Sys_Calender _bill_Sys_Calender = new Bill_Sys_Calender(); DataTable dt = new DataTable(); dt = _bill_Sys_Calender.GET_EVENT_DETAIL(id); if (dt.Rows.Count > 0) { for (int drRow = 0; drRow <= dt.Rows.Count - 1; drRow++) { lblDoctorName.Text = dt.Rows[drRow].ItemArray.GetValue(0).ToString(); lblType.Text = dt.Rows[drRow].ItemArray.GetValue(1).ToString(); lblHours.Text = dt.Rows[drRow].ItemArray.GetValue(3).ToString(); lblMinutes.Text = dt.Rows[drRow].ItemArray.GetValue(4).ToString(); lblTime.Text = dt.Rows[drRow].ItemArray.GetValue(5).ToString(); lblEndHours.Text = dt.Rows[drRow].ItemArray.GetValue(6).ToString(); lblEndMinutes.Text = dt.Rows[drRow].ItemArray.GetValue(7).ToString(); lblEndTime.Text = dt.Rows[drRow].ItemArray.GetValue(8).ToString(); txtNotes.Text = dt.Rows[drRow].ItemArray.GetValue(9).ToString(); lblDoctorID.Text = dt.Rows[drRow].ItemArray.GetValue(10).ToString(); lblTypeCode.Text = dt.Rows[drRow].ItemArray.GetValue(11).ToString(); lblPatientID.Text = dt.Rows[drRow].ItemArray.GetValue(12).ToString(); lblDate.Text = dt.Rows[drRow].ItemArray.GetValue(13).ToString(); ddlStatus.SelectedValue = dt.Rows[drRow].ItemArray.GetValue(15).ToString(); txtCaseID.Text = dt.Rows[drRow].ItemArray.GetValue(16).ToString(); if (_bill_Sys_Calender.CheckReferralExists(lblDoctorID.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID) == true) { if (ddlStatus.SelectedValue == "2") { ddlTestNames.DataSource = _bill_Sys_Calender.GetAssociatedProcCodeList(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, dt.Rows[drRow].ItemArray.GetValue(10).ToString(), "GETCOMPLETEVISITCODE", txtCaseID.Text, id); } else { ddlTestNames.DataSource = _bill_Sys_Calender.GetAssociatedProcCodeList(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, dt.Rows[drRow].ItemArray.GetValue(10).ToString(), "GETALLCODE", txtCaseID.Text, id); } ddlTestNames.DataTextField = "DESCRIPTION"; ddlTestNames.DataValueField = "CODE"; ddlTestNames.DataBind(); } else { ddlTestNames.DataSource = _bill_Sys_Calender.GetReferringProcCodeList(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, dt.Rows[drRow].ItemArray.GetValue(10).ToString()); ddlTestNames.DataTextField = "DESCRIPTION"; ddlTestNames.DataValueField = "CODE"; ddlTestNames.DataBind(); } // if (dt.Rows[drRow].ItemArray.GetValue(14).ToString() == "True" || ddlStatus.SelectedValue=="2" ) // { //btnUpdate.Visible = true; ds = new DataSet(); _patient_TVBO = new Patient_TVBO(); ds = _patient_TVBO.GetAppointProcCode(Convert.ToInt32(id)); foreach (DataRow dr in ds.Tables[0].Rows) { foreach (ListItem lst in ddlTestNames.Items) { if (lst.Value == dr.ItemArray.GetValue(0).ToString()) { lst.Selected = true; } } } //} if (ddlStatus.SelectedValue != "0") { lblMessage.Visible = true; lblMessage.Text = ddlStatus.SelectedItem.Text; btnSave.Visible = false; } if (dt.Rows[drRow]["BT_STATUS"].ToString().ToLower() == "false") { btnDelete.Visible = true; } else { btnDelete.Visible = false; } } } GETAppointPatientDetail(Convert.ToInt32(id)); //} } #region "check version readonly or not" string app_status = ((Bill_Sys_BillingCompanyObject)Session["APPSTATUS"]).SZ_READ_ONLY.ToString(); if (app_status.Equals("True")) { Bill_Sys_ChangeVersion cv = new Bill_Sys_ChangeVersion(this.Page); cv.MakeReadOnlyPage("ViwScheduled.aspx"); } #endregion }
protected void Page_Load(object sender, EventArgs e) { 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()); } try { btnSave.Attributes.Add("onclick", "return formValidator('form1','extddlDoctor,txtAppointmentDate,extddlVisitType,ddlHours,txtReDate,ddlReSchHours');"); if (!IsPostBack) { string eventId = Request.QueryString["eventId"].ToString(); BindTimeControl(); txtCompanyID.Text = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID; extddlVisitType.Flag_ID = txtCompanyID.Text; // Set default 'C' for Visit Type Bill_Sys_PatientVisitBO objPV = new Bill_Sys_PatientVisitBO(); extddlVisitType.Text = objPV.GetDefaultVisitType(txtCompanyID.Text); /////////////////// Bill_Sys_Calender _bill_Sys_Calender = new Bill_Sys_Calender(); DataTable dt = new DataTable(); dt = _bill_Sys_Calender.GET_EVENT_DETAIL(eventId); if (dt.Rows.Count > 0) { for (int drRow = 0; drRow <= dt.Rows.Count - 1; drRow++) { ddlHours.SelectedValue = dt.Rows[drRow].ItemArray.GetValue(3).ToString().PadLeft(2, '0'); ddlMinutes.SelectedValue = dt.Rows[drRow].ItemArray.GetValue(1).ToString().PadLeft(2, '0'); ddlTime.SelectedValue = dt.Rows[drRow].ItemArray.GetValue(5).ToString(); extddlDoctor.Flag_ID = dt.Rows[drRow].ItemArray.GetValue(10).ToString(); extddlDoctor.Text = dt.Rows[drRow].ItemArray.GetValue(10).ToString(); extddlVisitType.Text = dt.Rows[drRow].ItemArray.GetValue(17).ToString(); txtPatientID.Text = dt.Rows[drRow].ItemArray.GetValue(12).ToString(); txtAppointmentDate.Text = dt.Rows[drRow].ItemArray.GetValue(13).ToString(); ddlStatus.SelectedValue = dt.Rows[drRow].ItemArray.GetValue(15).ToString(); txtCaseID.Text = dt.Rows[drRow].ItemArray.GetValue(16).ToString(); txtVisitStatus.Text = dt.Rows[drRow].ItemArray.GetValue(15).ToString(); txtReEventID.Text = dt.Rows[drRow].ItemArray.GetValue(18).ToString(); if (txtReEventID.Text == "" && ddlStatus.SelectedValue == "1") { txtReDate.Text = dt.Rows[drRow].ItemArray.GetValue(19).ToString(); ddlReSchHours.SelectedValue = dt.Rows[drRow].ItemArray.GetValue(20).ToString().PadLeft(2, '0'); ddlReSchMinutes.SelectedValue = dt.Rows[drRow].ItemArray.GetValue(21).ToString().PadLeft(2, '0'); ddlReSchTime.SelectedValue = dt.Rows[drRow].ItemArray.GetValue(22).ToString(); lblReDate.Visible = true; lblReTIme.Visible = true; txtReDate.Visible = true; ddlReSchHours.Visible = true; ddlReSchMinutes.Visible = true; ddlReSchTime.Visible = true; } if (ddlStatus.SelectedValue == "2") { btnSave.Visible = true; ddlHours.Enabled = false; ddlMinutes.Enabled = false; ddlTime.Enabled = false; ddlStatus.Enabled = false; extddlDoctor.Enabled = false; txtAppointmentDate.Enabled = false; } DataTable dtTest = _bill_Sys_Calender.GetReferringProcCodeList(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, extddlDoctor.Text).Tables[0]; ddlTestNames.DataSource = dtTest; ddlTestNames.DataTextField = "DESCRIPTION"; ddlTestNames.DataValueField = "CODE"; ddlTestNames.DataBind(); ddlOldTestNames.DataSource = dtTest; ddlOldTestNames.DataTextField = "DESCRIPTION"; ddlOldTestNames.DataValueField = "CODE"; ddlOldTestNames.DataBind(); // if (dt.Rows[drRow].ItemArray.GetValue(14).ToString() == "True" || ddlStatus.SelectedValue=="2" ) // { //btnUpdate.Visible = true; DataSet ds = new DataSet(); Patient_TVBO _patient_TVBO = new Patient_TVBO(); ds = _patient_TVBO.GetAppointProcCode(Convert.ToInt32(eventId)); foreach (DataRow dr in ds.Tables[0].Rows) { foreach (ListItem lst in ddlTestNames.Items) { if (lst.Value == dr.ItemArray.GetValue(0).ToString()) { lst.Selected = true; } } foreach (ListItem lst in ddlOldTestNames.Items) { if (lst.Value == dr.ItemArray.GetValue(0).ToString()) { lst.Selected = true; } } } //} } //////////////////// } } lblMsg.Text = ""; } 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()); } }