private void BindLatestTreatmentlist() { 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()); } _treatmentBO = new Bill_Sys_TreatmentBO(); try { grdScheduledTests.DataSource = _treatmentBO.GetSceduledTreatmentList(txtCompanyID.Text, txtPatientID.Text, "TEST");; grdScheduledTests.DataBind(); grdLatestTest.DataSource = _treatmentBO.GetLatestTreatmentList(txtCompanyID.Text, txtPatientID.Text, "TEST"); grdLatestTest.DataBind(); string strDoctorName = ""; for (int i = 0; i < grdLatestTest.Items.Count; i++) { Label lblDoctorName = (Label)grdLatestTest.Items[i].Cells[3].FindControl("lblDoctorName"); if (strDoctorName != "" && strDoctorName == lblDoctorName.Text) { lblDoctorName.Text = ""; } else { strDoctorName = lblDoctorName.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()); } }
private void BindPatientList() { 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()); } _treatmentBO = new Bill_Sys_TreatmentBO(); _arrayList = new ArrayList(); try { grdScheduledVisits.DataSource = _treatmentBO.GetSceduledTreatmentList(txtCompanyID.Text, txtPatientID.Text, "VISITS");; grdScheduledVisits.DataBind(); grdBilledVisits.DataSource = _treatmentBO.GetBilledTreatmentList(txtCompanyID.Text, txtPatientID.Text, "VISITS"); grdBilledVisits.DataBind(); grdPatientLatestVisit.DataSource = _treatmentBO.GetLatestTreatmentList(txtCompanyID.Text, txtPatientID.Text, "VISITS"); grdPatientLatestVisit.DataBind(); _arrayList = _treatmentBO.GetLatestDoctorTreatmentCount(txtCompanyID.Text, txtPatientID.Text, "VISITS"); if (_arrayList.Count > 0) { if (_arrayList[0].ToString() != "") { lblPatientLastVisitDate.Text = Convert.ToDateTime(_arrayList[0].ToString()).ToShortDateString(); } lblTotalPatientVisitCount.Text = _arrayList[1].ToString(); } grdPatientVisitList.DataSource = _treatmentBO.GetSummaryTreatmentList(txtCompanyID.Text, txtPatientID.Text, "VISITS"); grdPatientVisitList.DataBind(); string strDName = ""; for (int i = 0; i < grdBilledVisits.Items.Count; i++) { Label lblDoc = (Label)grdBilledVisits.Items[i].Cells[3].FindControl("lblDName"); if (strDName != "" && strDName == lblDoc.Text) { lblDoc.Text = ""; } else { strDName = lblDoc.Text; } } string strDocName = ""; for (int i = 0; i < grdPatientLatestVisit.Items.Count; i++) { Label lblDoc = (Label)grdPatientLatestVisit.Items[i].Cells[3].FindControl("lblDoctorName"); if (strDocName != "" && strDocName == lblDoc.Text) { lblDoc.Text = ""; } else { strDocName = lblDoc.Text; } } string strDoctorName = ""; for (int i = 0; i < grdPatientVisitList.Items.Count; i++) { Label lblDoctor = (Label)grdPatientVisitList.Items[i].Cells[3].FindControl("lblDocName"); if (strDoctorName != "" && strDoctorName == lblDoctor.Text) { LinkButton lnkAdd = (LinkButton)grdPatientVisitList.Items[i].Cells[3].FindControl("lnkAdd"); LinkButton lnkView = (LinkButton)grdPatientVisitList.Items[i].Cells[3].FindControl("lnkView"); lnkAdd.Text = ""; lnkView.Text = ""; lblDoctor.Text = ""; } else { strDoctorName = lblDoctor.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()); } }