public void BindGrid() { 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 { DataSet ds = new DataSet(); ArrayList objAL = new ArrayList(); if (Page.IsPostBack) { objAL.Add(txtFromDate.Text); objAL.Add(txtToDate.Text); } else { objAL.Add("01/01/1900"); objAL.Add(DateTime.Today.AddDays(-1).ToString("MM/dd/yyyy")); } objAL.Add(extddlDoctor.Text); objAL.Add(ddlStatus.SelectedValue.ToString()); objAL.Add(txtCompanyID.Text); objAL.Add(extddlSpeciality.Text); string szCaseList = ""; string szProcDescList = ""; if (txtCaseNo.Text.Length != 0) { szCaseList = getCaseList(); } if ((!lstProcedureDesc.SelectedValue.ToString().Equals("")) && (!ddlProcedureCode.SelectedValue.ToString().Equals("NA"))) { szProcDescList = getProcDescList(); } //_reportBO = new Bill_Sys_ReportBO(); //grdPayment.DataSource = _reportBO.Get_Referral_Schedule_Report(objAL); //grdPayment.DataBind(); //Connection.ConnectionString str = new Connection.ConnectionString(); String szConnection = System.Configuration.ConfigurationManager.AppSettings["Connection_String"]; XMLDMLComponent.SQLToDAO objDao = new XMLDMLComponent.SQLToDAO(szConnection); mbs.dao.ScheduleReport sReport = new ScheduleReport(); sReport.from_date = txtFromDate.Text; sReport.to_date = txtToDate.Text; sReport.sz_company_id = txtCompanyID.Text; sReport.sz_case_no = szCaseList; sReport.sz_Patient_Name = txtPatientName.Text; sReport.i_status = ddlStatus.Text; sReport.sz_doctor_id = extddlDoctor.Text; sReport.SZ_PROCEDURE_GROUP_ID = extddlSpeciality.Text; sReport.SZ_PROCEDURE_CODE = ddlProcedureCode.Text; sReport.SZ_PROCEDURE_CODE_DESC = szProcDescList; sReport.sz_Provider_id = extddlOffice.Text; if (chkRfferal.Checked) { sReport.IsRefferalDoc = "1"; } else { sReport.IsRefferalDoc = "NA"; } ds = objDao.LoadDataSet("SP_REFFERAL_SCHEDULE_REPORT", "mbs.dao.ScheduleReport", sReport, "mbs.dao"); DataView dv1; dv1 = ds.Tables[0].DefaultView; Session["grdPayment"] = ds; grdPayment.DataSource = dv1; grdPayment.DataBind(); } 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()); } }
public void BindGrid() { 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 { _bill_Sys_BillingCompanyDetails_BO = new Bill_Sys_BillingCompanyDetails_BO(); DataSet objDatasetResult = new DataSet(); txtPatientName.Text = txtPatientName.Text.Replace("'", ""); txtPatientName.Text = txtPatientName.Text.Replace("\"", ""); if (objSystem.SZ_LOCATION == "1") { //DataTable objDTLocationWise = new DataTable(); //objDatasetResult = _bill_Sys_BillingCompanyDetails_BO.getPrintPOM(txtCompanyID.Text, "NotNull"); //objDTLocationWise = DisplayLocationInGrid(objDatasetResult); //grdUnsentNF2.DataSource = objDTLocationWise; //grdUnsentNF2.DataBind(); string szCaseList = ""; if (txtCaseNo.Text.Length != 0) { szCaseList = getCaseList(); } String szConnection = System.Configuration.ConfigurationManager.AppSettings["Connection_String"]; XMLDMLComponent.SQLToDAO objDao = new XMLDMLComponent.SQLToDAO(szConnection); mbs.dao.PrintPOM oPrintPOM = new mbs.dao.PrintPOM(); oPrintPOM.sz_company_id = txtCompanyID.Text; oPrintPOM.sz_case_no = szCaseList; oPrintPOM.sz_patient_name = txtPatientName.Text; oPrintPOM.sz_location_id = "1"; grdUnsentNF2.DataSource = objDao.LoadDataSet("SP_PRINT_POM", "mbs.dao.PrintPOM", oPrintPOM, "mbs.dao"); grdUnsentNF2.DataBind(); for (int i = 0; i < grdUnsentNF2.Items.Count; i++) { string str = grdUnsentNF2.Items[i].Cells[10].Text.ToString(); str = str.ToString().Trim(); if (str.ToString().Trim() == " ") { ((Label)grdUnsentNF2.Items[i].Cells[0].FindControl("lbl_Location_Id")).Visible = true; ((LinkButton)grdUnsentNF2.Items[i].Cells[0].FindControl("lnkSelectCase2")).Visible = false; ((CheckBox)grdUnsentNF2.Items[i].Cells[0].FindControl("ChkSent")).Visible = false; } } } else { string szCaseList = ""; if (txtCaseNo.Text.Length != 0) { szCaseList = getCaseList(); } //_reportBO = new Bill_Sys_ReportBO(); //grdPayment.DataSource = _reportBO.Get_Referral_Schedule_Report(objAL); //grdPayment.DataBind(); String szConnection = System.Configuration.ConfigurationManager.AppSettings["Connection_String"]; XMLDMLComponent.SQLToDAO objDao = new XMLDMLComponent.SQLToDAO(szConnection); mbs.dao.PrintPOM oPrintPOM = new mbs.dao.PrintPOM(); oPrintPOM.sz_company_id = txtCompanyID.Text; oPrintPOM.sz_case_no = szCaseList; oPrintPOM.sz_patient_name = txtPatientName.Text; oPrintPOM.sz_location_id = ""; grdUnsentNF2.DataSource = objDao.LoadDataSet("SP_PRINT_POM", "mbs.dao.PrintPOM", oPrintPOM, "mbs.dao"); grdUnsentNF2.DataBind(); //objDatasetResult= _bill_Sys_BillingCompanyDetails_BO.getPrintPOM(txtCompanyID.Text); //grdUnsentNF2.DataSource = objDatasetResult; //grdUnsentNF2.DataBind(); } } 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()); } }