public void GetPatientDebtInfo() { string AreaID = ""; string registerid = ""; if (this.m_objViewer.m_txtAREAID_CHR.Tag != null && this.m_objViewer.m_cboBedNo.SelectedIndex >= 0) { AreaID = (string)this.m_objViewer.m_txtAREAID_CHR.Tag; registerid = ((DataTable)this.m_objViewer.m_cboBedNo.Tag).Rows[this.m_objViewer.m_cboBedNo.SelectedIndex]["registerid_chr"].ToString().Trim(); } DataTable dtbResult = null; long lngRes = 0; if (this.m_objViewer.radioButton3.Checked == true) { lngRes = objSvc.m_lngGetPatientDebt(AreaID, registerid, this.m_objViewer.m_dtpStatDate.Value, "", "", out dtbResult); } else if (this.m_objViewer.radioButton2.Checked == true) { lngRes = objSvc.m_lngGetPatientDebt(AreaID, "", this.m_objViewer.m_dtpStatDate.Value, this.m_objViewer.m_txtInpatientNo.Text.ToString().Trim(), "", out dtbResult); } else if (this.m_objViewer.radioButton1.Checked == true) { lngRes = objSvc.m_lngGetPatientDebt(AreaID, "", this.m_objViewer.m_dtpStatDate.Value, "", this.m_objViewer.m_txtPatientCard.Text.ToString().Trim(), out dtbResult); } if (lngRes > 0 && dtbResult.Rows.Count == 1) { this.m_objViewer.m_cboBedNo.Text = dtbResult.Rows[0]["BedNo"].ToString(); this.m_objViewer.m_cboChargeType.Text = dtbResult.Rows[0]["PayType"].ToString(); // this.m_objViewer.m_totalCharge.Text = dtbResult.Rows[0]["charge_dec"].ToString(); this.m_objViewer.m_txtAREAID_CHR.Text = dtbResult.Rows[0]["areaname"].ToString(); this.m_objViewer.m_txtBirthDay.Text = dtbResult.Rows[0]["birth_dat"].ToString(); // this.m_objViewer.m_txtCharge.Text = dtbResult.Rows[0]["balance"].ToString(); this.m_objViewer.m_txtInhospitalDate.Text = dtbResult.Rows[0]["inpatient_dat"].ToString(); this.m_objViewer.m_txtInpatientNo.Text = dtbResult.Rows[0]["inpatientid_chr"].ToString(); this.m_objViewer.m_txtPatientCard.Text = dtbResult.Rows[0]["patientcardid_chr"].ToString(); this.m_objViewer.m_txtPatientName.Text = dtbResult.Rows[0]["lastname_vchr"].ToString(); this.m_objViewer.m_txtPayType.Text = dtbResult.Rows[0]["paytype"].ToString(); // this.m_objViewer.m_txtPrePay.Text = dtbResult.Rows[0]["money_dec"].ToString(); this.m_objViewer.m_txtSex.Text = dtbResult.Rows[0]["sex_chr"].ToString(); this.Registerid = dtbResult.Rows[0]["registerid_chr"].ToString(); } else { this.m_objViewer.m_cboBedNo.Text = ""; this.m_objViewer.m_cboChargeType.Text = ""; this.m_objViewer.m_txtAREAID_CHR.Text = ""; this.m_objViewer.m_txtBirthDay.Text = ""; this.m_objViewer.m_txtInhospitalDate.Text = ""; this.m_objViewer.m_txtInpatientNo.Text = ""; this.m_objViewer.m_txtPatientCard.Text = ""; this.m_objViewer.m_txtPatientName.Text = ""; this.m_objViewer.m_txtPayType.Text = ""; this.m_objViewer.m_txtSex.Text = ""; this.Registerid = ""; } }
/// <summary> /// 病区病人欠费一览表 /// </summary> public void m_mthShowInHospitalDebtLog() { if (this.m_objViewer.m_txtAREAID_CHR.Tag == null) { this.m_objViewer.m_txtAREAID_CHR.Tag = ""; this.m_objViewer.m_txtAREAID_CHR.Text = "全院"; } this.m_objViewer.Cursor = Cursors.WaitCursor; DataTable dtbResult = new DataTable(); rptInHospitalLog = new ReportDocument(); rptInHospitalLog.Load(@"Report\rptDebtView.rpt"); rptInHospitalLog.DataDefinition.FormulaFields["AreaName"].Text = "'" + this.m_objViewer.m_txtAREAID_CHR.Text.Trim() + "'"; rptInHospitalLog.DataDefinition.FormulaFields["StatDate"].Text = "'" + this.m_objViewer.m_StatDate.Value.ToShortDateString() + "'"; rptInHospitalLog.DataDefinition.FormulaFields["operatorname"].Text = "'" + this.m_objViewer.LoginInfo.m_strEmpName + "'"; int type = -1; if (this.m_objViewer.radioButton1.Checked) { type = 1; } if (this.m_objViewer.radioButton2.Checked) { type = 0; } long lngRes = objSvc.m_lngGetPatientDebt(type, (string)this.m_objViewer.m_txtAREAID_CHR.Tag, "", this.m_objViewer.m_StatDate.Value, "", "", out dtbResult); if (lngRes > 0) { rptInHospitalLog.SetDataSource(dtbResult); this.m_objViewer.m_ctrvPatientDebtReport.ReportSource = rptInHospitalLog; } this.m_objViewer.Cursor = Cursors.Default; }