Esempio n. 1
0
        /// <summary>
        /// 绑定报表数据
        /// </summary>
        /// <param name="dt">数据源</param>
        public void BindGridData(DataTable dt)
        {
            PrintDt = dt;
            DateTime dtTemp = Convert.ToDateTime(dtYearMonth.Text + "-01");
            //本月第一天时间
            DateTime dtFirst = dtTemp.AddDays(-(dtTemp.Day) + 1);

            //将本月月数+1
            DateTime dt2 = dtTemp.AddMonths(1);

            //本月最后一天时间
            DateTime dtLast          = dt2.AddDays(-(dtTemp.Day));
            string   currentUserName = (string)InvokeController("GetCurrentUserName");
            Dictionary <string, object> myDictionary = new Dictionary <string, object>();

            myDictionary.Add("开始时间", dtFirst);
            myDictionary.Add("结束时间", dtLast);
            myDictionary.Add("科室", CmbDeptRoom.Text);
            myDictionary.Add("查询人", currentUserName);
            myDictionary.Add("查询时间", DateTime.Now);
            GridReport gridreport = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 4028, 0, myDictionary, dt);

            axGRDisplayViewer.Report = gridreport.Report;
            axGRDisplayViewer.Start();
            axGRDisplayViewer.Refresh();
        }
Esempio n. 2
0
        /// <summary>
        /// 血糖数据绑定
        /// </summary>
        /// <param name="dtBloodGluRecord">血糖数据</param>
        public void BindBloodGluRecord(DataTable dtBloodGluRecord)
        {
            try
            {
                GridViewResult.Stop();
                this.Cursor = Cursors.WaitCursor;
                Dictionary <string, object> myDictionary = new Dictionary <string, object>();
                int       rowindex = dgvPatInfo.CurrentCell.RowIndex;
                DataTable dt       = (DataTable)dgvPatInfo.DataSource;
                myDictionary.Add("医院名称", (InvokeController("this") as AbstractController).LoginUserInfo.WorkName);
                myDictionary.Add("科室", dt.Rows[rowindex]["deptName"]);
                myDictionary.Add("姓名", dt.Rows[rowindex]["PatName"]);
                myDictionary.Add("性别", dt.Rows[rowindex]["PatSex"]);
                myDictionary.Add("年龄", GetAge(dt.Rows[rowindex]["Age"].ToString()));
                myDictionary.Add("床号", dt.Rows[rowindex]["BedNo"]);
                myDictionary.Add("住院号", dt.Rows[rowindex]["SerialNumber"]);

                gridreport            = new GridReport();
                gridreport            = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 3205, 0, myDictionary, dtBloodGluRecord);
                GridViewResult.Report = gridreport.Report;
                GridViewResult.Start();
                GridViewResult.Refresh();
            }
            catch (Exception error)
            {
                MessageBox.Show(error.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Esempio n. 3
0
        public void PrintReport(DataTable dt, bool isPrint)
        {
            // 做成报表数据
            DataTable reportDt = dt.Clone();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                int num = Tools.ToInt32(dt.Rows[i]["Num"]);
                for (int j = 0; j < num; j++)
                {
                    reportDt.Rows.Add(dt.Rows[i].ItemArray);
                }
            }

            if (reportDt.Rows.Count > 0)
            {
                if (isPrint)
                {
                    // 打印报表
                    ReportTool.GetReport(LoginUserInfo.WorkId, 3019, 0, null, reportDt).Print(true);
                    iprintExamConfirm.CloseForm();  // 关闭界面
                }
                else
                {
                    // 预览报表
                    ReportTool.GetReport(LoginUserInfo.WorkId, 3019, 0, null, reportDt).PrintPreview(true);
                }
            }
        }
        /// <summary>
        /// 打印执行卡
        /// </summary>
        /// <param name="iGroupIdList">勾选的需要打印的组Id</param>
        public void PrinterExeCard(List <PrintData> iGroupIdList)
        {
            //同组的在一个框内  但是每列都要有数据
            //_dtExcuteLis  报表数据源
            //_iReportType  执行单类型
            //3015.住院护士执行单服药单   OrderContents   BedCode  PatName    GroupID     Unit    Usage   Frequency
            //3016.住院护士执行单输液卡   OrderContents   BedCode  PatName    GroupID     Unit    Usage   Frequency   OrderContent   Amount   DropSpec    --ordertype
            //3017.住院护士执行单注射单   OrderContents   BedCode  PatName    GroupID     Unit    Usage   Frequency
            //3018.住院护士执行单治疗卡   OrderContents   BedCode  PatName    GroupID
            DataTable printTable = CreatePrintTable(iGroupIdList);

            if (printTable.Rows.Count > 0)
            {
                GridReport gridreport = new GridReport();
                gridreport = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, iReportType, 0, myDictionary, printTable);
                gridreport.PrintPreview(true);

                List <int> iExecIdList = new List <int>();
                foreach (PrintData printData in iGroupIdList)
                {
                    DataRow[] drs = dtExcuteLis.Select(" GroupId=" + printData.groupId + " and ExecDate='" + printData.execDate + "'");
                    foreach (DataRow dr in drs)
                    {
                        int iExecId = Convert.ToInt32(dr["ID"]);
                        iExecIdList.Add(iExecId);
                    }
                }

                if (iExecIdList.Count > 0)
                {
                    SetPrintState(iExecIdList, 1);
                }
            }
        }
 /// <summary>
 /// 查询
 /// </summary>
 /// <param name="sender">控件</param>
 /// <param name="e">参数</param>
 private void btnQuery_Click(object sender, EventArgs e)
 {
     try
     {
         axGRDisplayViewer.Stop();
         this.Cursor = Cursors.WaitCursor;
         int       queryYear       = Convert.ToInt32(cmbQueryYear.SelectedValue);
         int       queryMonth      = Convert.ToInt32(cmbQueryMonth.SelectedValue);
         int       deptId          = Convert.ToInt32(cmbDept.SelectedValue);
         int       typeId          = Convert.ToInt32(txtType.Tag);
         string    currentUserName = (string)InvokeController("GetCurrentUserName");
         DataTable dtReport        = (DataTable)InvokeController("InventoryStatistic", deptId, queryYear, queryMonth, typeId);
         Dictionary <string, object> myDictionary = new Dictionary <string, object>();
         myDictionary.Add("会计年", cmbQueryYear.Text);
         myDictionary.Add("会计月", cmbQueryMonth.Text);
         myDictionary.Add("查询科室", cmbDept.Text);
         myDictionary.Add("类型", txtType.Text);
         myDictionary.Add("查询人", currentUserName);
         myDictionary.Add("HospitalName", (InvokeController("this") as AbstractController).LoginUserInfo.WorkName + "物资进销存报表");
         GridReport gridreport = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 5009, 0, myDictionary, dtReport);
         axGRDisplayViewer.Report = gridreport.Report;
         axGRDisplayViewer.Start();
         axGRDisplayViewer.Refresh();
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Esempio n. 6
0
 /// <summary>
 /// 查询
 /// </summary>
 /// <param name="sender">控件对象</param>
 /// <param name="e">事件参数</param>
 private void BtnQuery_Click(object sender, EventArgs e)
 {
     try
     {
         GridViewResult.Stop();
         this.Cursor = Cursors.WaitCursor;
         DateTime  bdate           = Convert.ToDateTime(sdtDate.Bdate.Value.ToString("yyyy-MM-dd 00:00:00"));
         DateTime  edate           = Convert.ToDateTime(sdtDate.Edate.Value.ToString("yyyy-MM-dd 23:59:59"));
         int       queryWorkId     = Convert.ToInt32(cmbWorker.SelectedValue);
         int       queryTimeType   = cmbTimeType.SelectedIndex;//0收费时间 1缴款时间
         int       rowGroupType    = cmbRowGroupType.SelectedIndex;
         int       colGroupType    = cmbColGroupType.SelectedIndex;
         string    currentUserName = (string)InvokeController("GetCurrentUserName");
         DataTable dtReport        = (DataTable)InvokeController("GetFinacialOPRevenueData", frmName, bdate, edate, queryWorkId, queryTimeType, rowGroupType, colGroupType);
         Dictionary <string, object> myDictionary = new Dictionary <string, object>();
         myDictionary.Add("Title", cmbWorker.Text.Trim() + "门诊收入统计");
         myDictionary.Add("DateRange", sdtDate.Bdate.Value.ToString("yyyy-MM-dd") + "至" + sdtDate.Edate.Value.ToString("yyyy-MM-dd"));
         myDictionary.Add("Printer", currentUserName);
         gridreport = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 2006, 0, myDictionary, dtReport);
         gridreport.Report.Initialize += new _IGridppReportEvents_InitializeEventHandler(ReportInitialize);
         GridViewResult.Report         = gridreport.Report;
         GridViewResult.Start();
         GridViewResult.Refresh();
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
        public void PrintDepositInfo(int depositID)
        {
            Action <ClientRequestData> derequestAction = ((ClientRequestData request) =>
            {
                request.AddData(depositID);
            });

            ServiceResponseData         deretdata = InvokeWcfService("IPProject.Service", "AdmissionController", "GetPayADeposit", derequestAction);
            DataTable                   dt        = deretdata.GetData <DataTable>(0);
            Dictionary <string, object> dic       = new Dictionary <string, object>();

            if (dt.Rows.Count > 0 && dt.Rows[0]["Status"].ToString() == "正常")
            {
                dt.Rows[0]["Head"] = LoginUserInfo.WorkName + "预交金缴款单";
                string serialNumber = dt.Rows[0]["SerialNumber"].ToString();
                string patName      = dt.Rows[0]["PatName"].ToString();
                dt.Rows[0]["SerialNumberName"] = patName + "(住院号" + serialNumber + ")";

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    for (int j = 0; j < dt.Rows[i].ItemArray.Length; j++)
                    {
                        dic.Add(dt.Columns[j].ColumnName, dt.Rows[i][j]);
                    }

                    dic.Add("Year", Convert.ToDateTime(dt.Rows[i]["MakerDate"]).Year);
                    dic.Add("Month", Convert.ToDateTime(dt.Rows[i]["MakerDate"]).Month);
                    dic.Add("Day", Convert.ToDateTime(dt.Rows[i]["MakerDate"]).Day);
                    dic.Add("TotalFees", dt.Rows[i]["TotalFee"].ToString());
                }

                ReportTool.GetReport(LoginUserInfo.WorkId, 3204, 0, dic, null).PrintPreview(true);
                InvokeWcfService("IPProject.Service", "AdmissionController", "UpdatePrintTime", derequestAction);
            }
        }
 /// <summary>
 /// 查询
 /// </summary>
 /// <param name="sender">控件对象</param>
 /// <param name="e">事件参数</param>
 private void BtnQuery_Click(object sender, EventArgs e)
 {
     try
     {
         GridViewResult.Stop();
         this.Cursor = Cursors.WaitCursor;
         DateTime  bdate           = Convert.ToDateTime(sdtDate.Bdate.Value.ToString("yyyy-MM-dd 00:00:00"));
         DateTime  edate           = Convert.ToDateTime(sdtDate.Edate.Value.ToString("yyyy-MM-dd 23:59:59"));
         int       queryWorkId     = Convert.ToInt32(cmbWorker.SelectedValue);
         string    currentUserName = (string)InvokeController("GetCurrentUserName");
         DataTable dtReport        = (DataTable)InvokeController("GetFinacialDispenseData", frmName, bdate, edate, queryWorkId);
         Dictionary <string, object> myDictionary = new Dictionary <string, object>();
         myDictionary.Add("Title", cmbWorker.Text.Trim() + "发药人员工作量统计");
         myDictionary.Add("DateRange", sdtDate.Bdate.Value.ToString("yyyy-MM-dd") + "至" + sdtDate.Edate.Value.ToString("yyyy-MM-dd"));
         myDictionary.Add("Printer", currentUserName);
         GridReport gridreport = new GridReport();
         gridreport            = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 4019, 0, myDictionary, dtReport);
         GridViewResult.Report = gridreport.Report;
         GridViewResult.Start();
         GridViewResult.Refresh();
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Esempio n. 9
0
 /// <summary>
 /// 查询
 /// </summary>
 /// <param name="sender">控件对象</param>
 /// <param name="e">事件参数</param>
 private void BtnQuery_Click(object sender, EventArgs e)
 {
     try
     {
         GridViewResult.Stop();
         this.Cursor = Cursors.WaitCursor;
         DateTime  bdate           = dtTimer.Bdate.Value;
         DateTime  edate           = dtTimer.Edate.Value;
         int       queryWorkId     = Convert.ToInt32(cbbWork.SelectedValue);
         string    queryTimeType   = Convert.ToString(cbbTimeType.SelectedValue);
         string    qyeryDocType    = Convert.ToString(cbbDocType.SelectedValue);
         string    currentUserName = (string)InvokeController("GetCurrentUserName");
         DataTable dtReport        = (DataTable)InvokeController("QueryInpatientWorkLoad", queryWorkId, bdate.ToString("yyyy-MM-dd 00:00:00"), edate.ToString("yyyy-MM-dd 23:59:59"), qyeryDocType, queryTimeType);
         Dictionary <string, object> myDictionary = new Dictionary <string, object>();
         myDictionary.Add("Title", cbbWork.Text.Trim() + "住院医生工作量统计");
         myDictionary.Add("DateRange", dtTimer.Bdate.Value.ToString("yyyy-MM-dd") + "至" + dtTimer.Edate.Value.ToString("yyyy-MM-dd"));
         myDictionary.Add("Printer", currentUserName);
         myDictionary.Add("DocType", "医生类型:" + cbbDocType.Text);
         myDictionary.Add("TimeType", "时间类型:" + cbbTimeType.Text);
         GridReport gridreport = new GridReport();
         gridreport            = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 3011, 0, myDictionary, dtReport);
         GridViewResult.Report = gridreport.Report;
         GridViewResult.Start();
         GridViewResult.Refresh();
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Esempio n. 10
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="sender">控件对象</param>
        /// <param name="e">事件参数</param>
        private void BtnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                DateTime bdate           = Convert.ToDateTime(sdtDate.Bdate.Value.ToString("yyyy-MM-dd 00:00:00"));
                DateTime edate           = Convert.ToDateTime(sdtDate.Edate.Value.ToString("yyyy-MM-dd 23:59:59"));
                int      queryWorkId     = Convert.ToInt32(cmbWorker.SelectedValue);
                string   currentUserName = (string)InvokeController("GetCurrentUserName");
                int      queryType       = 0;//0收入流水账 1预交金流水账
                Dictionary <string, object> myDictionary = new Dictionary <string, object>();
                if (superTabControl1.SelectedTabIndex == 0)
                {
                    GVResultRevenue.Stop();
                    this.Cursor = Cursors.WaitCursor;
                    DataTable dtReport = (DataTable)InvokeController("GetFinacialIPAccountBookData", frmName, bdate, edate, queryWorkId, queryType);

                    myDictionary.Add("Title", cmbWorker.Text.Trim() + "住院收入流水账");
                    myDictionary.Add("DateRange", sdtDate.Bdate.Value.ToString("yyyy-MM-dd") + "至" + sdtDate.Edate.Value.ToString("yyyy-MM-dd"));
                    myDictionary.Add("Printer", currentUserName);
                    decimal[] beginEnd = GetBeginAndEnd(0, dtReport);
                    myDictionary.Add("BeginFeeTotal", beginEnd[0]);
                    myDictionary.Add("EndFeeTotal", beginEnd[1]);
                    GridReport gridreport = new GridReport();
                    gridreport             = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 3012, 0, myDictionary, dtReport);
                    GVResultRevenue.Report = gridreport.Report;
                    GVResultRevenue.Start();
                    GVResultRevenue.Refresh();
                }
                else
                {
                    queryType = 1;
                    GVResultDeposit.Stop();
                    this.Cursor = Cursors.WaitCursor;
                    DataTable dtReport = (DataTable)InvokeController("GetFinacialIPAccountBookData", frmName, bdate, edate, queryWorkId, queryType);

                    myDictionary.Add("Title", cmbWorker.Text.Trim() + "住院预交金流水账");
                    myDictionary.Add("DateRange", sdtDate.Bdate.Value.ToString("yyyy-MM-dd") + "至" + sdtDate.Edate.Value.ToString("yyyy-MM-dd"));
                    myDictionary.Add("Printer", currentUserName);
                    decimal[] beginEnd = GetBeginAndEnd(1, dtReport);
                    myDictionary.Add("BeginFeeTotal", beginEnd[0]);
                    myDictionary.Add("EndFeeTotal", beginEnd[1]);
                    GridReport gridreport = new GridReport();
                    gridreport             = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 3013, 0, myDictionary, dtReport);
                    GVResultDeposit.Report = gridreport.Report;
                    GVResultDeposit.Start();
                    GVResultDeposit.Refresh();
                }
            }
            catch (Exception error)
            {
                MessageBox.Show(error.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Esempio n. 11
0
        /// <summary>
        /// 获取医技确费统计信息
        /// </summary>
        /// <param name="dt">医技确费统计数据</param>
        public void BindThatFeeCount(DataTable dt)
        {
            PrintData = dt;
            Dictionary <string, object> myDictionary = GetDictionary();
            GridReport gridreport = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, (int)OP_Enum.PrintReport.医技工作量统计, 0, myDictionary, dt);

            axGRDisplayViewer.Report = gridreport.Report;
            axGRDisplayViewer.Start();
            axGRDisplayViewer.Refresh();
        }
Esempio n. 12
0
        /// <summary>
        /// 事件
        /// </summary>
        /// <param name="sender">对象</param>
        /// <param name="e">参数</param>
        private void btnPrint_Click(object sender, EventArgs e)
        {
            string currentUserName = (string)InvokeController("GetCurrentUserName");
            Dictionary <string, object> myDictionary = new Dictionary <string, object>();

            myDictionary.Add("开始时间", dtpBillDate.Bdate.Value);
            myDictionary.Add("结束时间", dtpBillDate.Edate.Value);
            myDictionary.Add("科室", DeptRoom.Text);
            myDictionary.Add("查询人", currentUserName);
            myDictionary.Add("查询时间", DateTime.Now);
            ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 4018, 0, myDictionary, PrintDt).PrintPreview(true);
        }
        /// <summary>
        /// 加载数据
        /// </summary>
        /// <param name="dtData">统计数据</param>
        public void LoadData(DataTable dtData)
        {
            Dictionary <string, object> myDictionary = new Dictionary <string, object>();

            myDictionary.Add("Title", cmbWorker.Text.Trim() + "药品医生开方统计");
            myDictionary.Add("DateRange", sdtDate.Bdate.Value.ToString("yyyy-MM-dd") + "至" + sdtDate.Edate.Value.ToString("yyyy-MM-dd"));
            myDictionary.Add("Printer", (InvokeController("this") as AbstractController).LoginUserInfo.EmpName);

            gridreport            = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 6001, 0, myDictionary, dtData);
            GridViewResult.Report = gridreport.Report;
            GridViewResult.Start();
            GridViewResult.Refresh();
        }
Esempio n. 14
0
        /// <summary>
        /// 事件
        /// </summary>
        /// <param name="sender">对象</param>
        /// <param name="e">参数</param>
        private void btnPrintCard_Click(object sender, EventArgs e)
        {
            DataTable excuteDt = InvokeController("GetExecuteBills") as DataTable;
            DataTable dt       = new DataTable();
            int       rowIndex = -1;

            dt       = dgFeeHead.DataSource as DataTable;
            rowIndex = dgFeeHead.CurrentCell.RowIndex;
            if (rowIndex >= 0)
            {
                DataRow   dr       = dt.Rows[rowIndex];
                DataTable presData = InvokeController("GetPrintPresData", Convert.ToInt32(dr["DocPresHeadID"]), Convert.ToInt32(dr["DocPresNO"])) as DataTable;
                Dictionary <string, object> myDictionary = new Dictionary <string, object>();
                if (presData.Rows.Count > 0)
                {
                    DataRow exdr = excuteDt.Select("ChannelID=" + Tools.ToString(presData.Rows[0]["ChannelID"]) + string.Empty).FirstOrDefault();
                    if (exdr != null)
                    {
                        presData.Columns.Add("PatName");
                        presData.Columns.Add("VisitNO");
                        presData.Columns.Add("ExecDate");
                        InvokeController("GetPatInfo", Tools.ToInt32(dr["PatListID"]));
                        for (int i = 0; i < presData.Rows.Count; i++)
                        {
                            presData.Rows[i]["PatName"]  = txtName.Text;
                            presData.Rows[i]["VisitNO"]  = Tools.ToString(dtPatList.Rows[0]["VisitNO"]);
                            presData.Rows[i]["ExecDate"] = Convert.ToDateTime(presData.Rows[0]["PresDate"]).ToString("yyyy-MM-dd hh:mm:ss");
                        }

                        myDictionary.Add("WorkerName", (InvokeController("this") as AbstractController).LoginUserInfo.WorkName);
                        myDictionary.Add("DoseNum", Tools.ToString(presData.Rows[0]["DoseNum"]));
                        myDictionary.Add("Printer", (InvokeController("this") as AbstractController).LoginUserInfo.EmpName);
                        ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, (int)OP_Enum.PrintReport.输液卡, 0, myDictionary, presData).PrintPreview(true);
                    }
                    else
                    {
                        MessageBoxEx.Show("没有可打印的输液卡");
                    }
                }
                else
                {
                    MessageBoxEx.Show("没有可打印的数据");
                }
            }
            else
            {
                MessageBoxEx.Show("没有可打印的数据");
            }
        }
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="sender">控件对象</param>
        /// <param name="e">事件参数</param>
        private void BtQuery_Click(object sender, EventArgs e)
        {
            if (txtItem.Text == string.Empty)
            {
                MessageBoxEx.Show("请选择查询项目!", "提示框", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            if ((Convert.ToInt16(cbbPatType.SelectedValue) == 1) && (Convert.ToString(cbbTimeType.SelectedValue) == "ChargeDate"))
            {
                MessageBoxEx.Show("门诊类型按记帐时间统计单项目收入!", "提示框", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            int      workID    = Convert.ToInt32(cmbWork.SelectedValue);
            DateTime queryDate = dtTimer.Value;
            int      patType   = Convert.ToInt32(cbbPatType.SelectedValue);
            string   timeType  = Convert.ToString(cbbTimeType.SelectedValue);
            string   itemInfo  = ItemID;

            try
            {
                GridViewResult.Stop();
                this.Cursor = Cursors.WaitCursor;
                string    currentUserName = (string)InvokeController("GetCurrentUserName");
                DataTable dtReport        = (DataTable)InvokeController("GetItmeItemStatistics", workID, queryDate, patType, timeType, itemInfo);
                Dictionary <string, object> myDictionary = new Dictionary <string, object>();
                myDictionary.Add("TjTime", "统计时间:" + dtTimer.Value.ToString("yyyy-MM"));
                myDictionary.Add("Printer", "制表人:" + currentUserName);
                myDictionary.Add("PrintTime", "制表时间:" + DateTime.Now.ToString("yyyy-MM-dd"));
                myDictionary.Add("ItemName", txtItem.Text);
                GridReport gridreport = new GridReport();
                gridreport            = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 2009, 0, myDictionary, dtReport);
                GridViewResult.Report = gridreport.Report;
                GridViewResult.Start();
                GridViewResult.Refresh();
            }
            catch (Exception error)
            {
                MessageBox.Show(error.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Esempio n. 16
0
        /// <summary>
        /// 绑定药品网格信息
        /// </summary>
        /// <param name="dt">报表数据</param>
        public void BindDgData(DataTable dt)
        {
            PrintDt = dt;
            string currentUserName = (string)InvokeController("GetCurrentUserName");
            Dictionary <string, object> myDictionary = new Dictionary <string, object>();

            myDictionary.Add("开始时间", dtpBillDate.Bdate.Value);
            myDictionary.Add("结束时间", dtpBillDate.Edate.Value);
            myDictionary.Add("科室", DeptRoom.Text);
            myDictionary.Add("查询人", currentUserName);
            myDictionary.Add("查询时间", DateTime.Now);
            GridReport gridreport = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 4018, 0, myDictionary, dt);

            axGRDisplayViewer.Report = gridreport.Report;
            axGRDisplayViewer.Start();
            axGRDisplayViewer.Refresh();
        }
Esempio n. 17
0
        public void BatchPrintReminder(string patListID)
        {
            Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
            {
                request.AddData(patListID);
            });

            ServiceResponseData retdata        = InvokeWcfService("IPProject.Service", "BedManagementController", "GetReminderDataList", requestAction);
            DataTable           reminderDataDt = retdata.GetData <DataTable>(0);

            if (reminderDataDt.Rows.Count <= 0)
            {
                MessageBoxShowSimple("所选病人已交款或余额充足,无需打印催款单!");
                return;
            }

            ReportTool.GetReport(LoginUserInfo.WorkId, 3202, 0, null, reminderDataDt).PrintPreview(true);
        }
Esempio n. 18
0
        /// <summary>
        /// 打印事件
        /// </summary>
        /// <param name="sender">对象</param>
        /// <param name="e">参数</param>
        private void btnPrint_Click(object sender, EventArgs e)
        {
            System.Data.DataTable printDt = InvokeController("PrintPayRecord", cmbDept.SelectedValue.ToString()) as System.Data.DataTable;
            if (printDt.Rows.Count <= 0)
            {
                MessageBoxEx.Show("没有可以打印的记录", "提示");
                return;
            }

            Dictionary <string, object> myDictionary = new Dictionary <string, object>();

            myDictionary.Add("开始时间", dtpBillDate.Bdate.Value);
            myDictionary.Add("结束时间", dtpBillDate.Edate.Value);
            myDictionary.Add("经销商", txtSupport.Text == string.Empty ? "所有经销商" : txtSupport.Text);
            myDictionary.Add("查询人", (InvokeController("this") as AbstractController).LoginUserInfo.EmpName);
            myDictionary.Add("查询时间", DateTime.Now);
            ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 4035, 0, myDictionary, printDt).PrintPreview(true);
        }
Esempio n. 19
0
        public void PrintReminder()
        {
            // 选中的床位上没有分配病人
            if (bedManagement.Bed.PatientID <= 0 && string.IsNullOrEmpty(bedManagement.Bed.PatientName))
            {
                return;
            }

            Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
            {
                request.AddData(bedManagement.Bed.PatientID);
            });

            ServiceResponseData retdata = InvokeWcfService("IPProject.Service", "BedManagementController", "GetReminderConfigInfo", requestAction);
            // 获取催款数据
            DataTable feeDt         = retdata.GetData <DataTable>(0);
            string    reminderMoney = retdata.GetData <string>(1); // 继续交款金额

            // 打印催款单
            DataTable reminderDt = new DataTable();

            reminderDt.Columns.Add("DeptName");
            reminderDt.Columns.Add("SerialNumber");
            reminderDt.Columns.Add("BedNo");
            reminderDt.Columns.Add("PatName");
            reminderDt.Columns.Add("SumFee");
            reminderDt.Columns.Add("DepositFee");
            reminderDt.Columns.Add("ReminderMoney");
            reminderDt.Columns.Add("ReminderData");
            reminderDt.Columns.Add("PrintReminderData");
            DataRow reminderDr = reminderDt.NewRow();

            reminderDr["DeptName"]          = bedManagement.Bed.Dept;
            reminderDr["SerialNumber"]      = bedManagement.Bed.PatientNum;
            reminderDr["BedNo"]             = bedManagement.Bed.BedNo;
            reminderDr["PatName"]           = bedManagement.Bed.PatientName;
            reminderDr["SumFee"]            = feeDt.Rows[1]["TotalFee"];
            reminderDr["DepositFee"]        = feeDt.Rows[0]["TotalFee"];
            reminderDr["ReminderMoney"]     = reminderMoney;
            reminderDr["ReminderData"]      = DateTime.Now;
            reminderDr["PrintReminderData"] = DateTime.Now;
            reminderDt.Rows.Add(reminderDr);
            ReportTool.GetReport(LoginUserInfo.WorkId, 3202, 0, null, reminderDt).PrintPreview(true);
        }
Esempio n. 20
0
        /// <summary>
        /// 打印事件
        /// </summary>
        /// <param name="sender">对象</param>
        /// <param name="e">参数</param>
        private void btnPrint_Click(object sender, EventArgs e)
        {
            DateTime dtTemp = Convert.ToDateTime(dtYearMonth.Text + "-01");
            //本月第一天时间
            DateTime dtFirst = dtTemp.AddDays(-(dtTemp.Day) + 1);

            //将本月月数+1
            DateTime dt2 = dtTemp.AddMonths(1);

            //本月最后一天时间
            DateTime dtLast          = dt2.AddDays(-(dtTemp.Day));
            string   currentUserName = (string)InvokeController("GetCurrentUserName");
            Dictionary <string, object> myDictionary = new Dictionary <string, object>();

            myDictionary.Add("开始时间", dtFirst);
            myDictionary.Add("结束时间", dtLast);
            myDictionary.Add("科室", CmbDeptRoom.Text);
            myDictionary.Add("查询人", currentUserName);
            myDictionary.Add("查询时间", DateTime.Now);
            ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 4028, 0, myDictionary, PrintDt).PrintPreview(true);
        }
Esempio n. 21
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="sender">控件对象</param>
        /// <param name="e">事件参数</param>
        private void BtnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                GridViewResult.Stop();
                this.Cursor = Cursors.WaitCursor;
                DateTime  bdate           = Convert.ToDateTime(sdtDate.Bdate.Value.ToString("yyyy-MM-dd 00:00:00"));
                DateTime  edate           = Convert.ToDateTime(sdtDate.Edate.Value.ToString("yyyy-MM-dd 23:59:59"));
                int       queryWorkId     = Convert.ToInt32(cmbWorker.SelectedValue);
                int       queryTimeType   = cmbTimeType.SelectedIndex;//0收费时间 1缴款时间
                string    currentUserName = (string)InvokeController("GetCurrentUserName");
                DataTable dtReport        = (DataTable)InvokeController("GetFinacialOPDoctorData", frmName, bdate, edate, queryWorkId, queryTimeType);
                Dictionary <string, object> myDictionary = new Dictionary <string, object>();
                myDictionary.Add("Title", cmbWorker.Text.Trim() + "门诊医生工作量统计");
                myDictionary.Add("DateRange", sdtDate.Bdate.Value.ToString("yyyy-MM-dd") + "至" + sdtDate.Edate.Value.ToString("yyyy-MM-dd"));
                myDictionary.Add("Printer", currentUserName);
                if (dtReport.Rows.Count > 0)
                {
                    decimal allDrugFee     = Convert.ToDecimal(dtReport.Compute("sum(DrugFee)", string.Empty));
                    decimal allMeterialFee = Convert.ToDecimal(dtReport.Compute("sum(MeterialFee)", string.Empty));
                    decimal allFee         = Convert.ToDecimal(dtReport.Compute("sum(TotalFee)", string.Empty));
                    myDictionary.Add("AllDrugFeePerCent", allDrugFee / allFee);
                    myDictionary.Add("AllMeterailFeePerCent", allMeterialFee / allFee);
                }

                GridReport gridreport = new GridReport();
                gridreport            = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 2005, 0, myDictionary, dtReport);
                GridViewResult.Report = gridreport.Report;
                GridViewResult.Start();
                GridViewResult.Refresh();
            }
            catch (Exception error)
            {
                MessageBox.Show(error.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Esempio n. 22
0
        /// <summary>
        /// 加载报表数据
        /// </summary>
        /// <param name="dtPatientFeeSum">病人费用数据</param>
        /// <param name="dtPatientFeeInfo">住院总费用</param>
        public void LoadPatientFeeInfo(DataTable dtPatientFeeSum, DataTable dtPatientFeeInfo)
        {
            try
            {
                int iListType = Convert.ToInt32(((ComboBoxItem)cmbListType.SelectedItem).Tag);

                GetDataAndShowFromTable(dgvCostMsg, dtPatientFeeInfo);
                CreateSumCol(iListType);

                decimal totalFee = 0;
                foreach (DataRow dr in dtPatientFeeInfo.Rows)
                {
                    totalFee += Convert.ToDecimal(dr["TotalFee"]);
                }

                if (dtPatientFeeSum != null && dtPatientFeeSum.Rows.Count > 0)
                {
                    myDictionary["TotalDespoit"] = Convert.ToDecimal(dtPatientFeeSum.Rows[0]["TotalDespoit"]);
                    myDictionary["TotalFee"]     = Convert.ToDecimal(dtPatientFeeSum.Rows[0]["TotalFee"]);
                    myDictionary["YE"]           = Convert.ToDecimal(dtPatientFeeSum.Rows[0]["YE"]);
                    myDictionary["BANumber"]     = dtPatientFeeSum.Rows[0]["CaseNumber"].ToString();
                }

                myDictionary["Fee"] = totalFee;

                ReportViewer.Stop();
                this.Cursor = Cursors.WaitCursor;
                GridReport gridreport = new GridReport();
                if (iListType == 1)
                {
                    myDictionary["Title"] = "项目明细清单";
                    gridreport            = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 3006, 0, myDictionary, dtPatientFeeInfo);
                }
                else if (iListType == 2)
                {
                    myDictionary["Title"] = "一日清单";

                    DataTable  dtPrint = new DataTable();
                    DataColumn col     = new DataColumn();
                    col.ColumnName = "InFpName";
                    col.DataType   = typeof(string);
                    dtPrint.Columns.Add(col);

                    DataColumn col1 = new DataColumn();
                    col1.ColumnName = "TotalFee";
                    col1.DataType   = typeof(string);
                    dtPrint.Columns.Add(col1);

                    DataColumn col2 = new DataColumn();
                    col2.ColumnName = "InFpName1";
                    col2.DataType   = typeof(string);
                    dtPrint.Columns.Add(col2);

                    DataColumn col3 = new DataColumn();
                    col3.ColumnName = "TotalFee1";
                    col3.DataType   = typeof(string);
                    dtPrint.Columns.Add(col3);

                    DataColumn col4 = new DataColumn();
                    col4.ColumnName = "Date";
                    col4.DataType   = typeof(string);
                    dtPrint.Columns.Add(col4);

                    for (int i = 0; i < dtPatientFeeInfo.Rows.Count; i++)
                    {
                        string  sInFpName = dtPatientFeeInfo.Rows[i]["InFpName"].ToString();
                        decimal dTotalFee = Convert.ToDecimal(dtPatientFeeInfo.Rows[i]["TotalFee"]);
                        if (!Convert.ToBoolean(i % 2))  //偶数行
                        {
                            DataRow dr = dtPrint.NewRow();
                            dr["InFpName"] = sInFpName;
                            dr["TotalFee"] = dTotalFee;
                            dr["Date"]     = dtPatientFeeInfo.Rows[i]["Date"];

                            dtPrint.Rows.Add(dr);
                        }
                        else
                        {
                            int j = i / 2;
                            dtPrint.Rows[j]["InFpName1"] = sInFpName;
                            dtPrint.Rows[j]["TotalFee1"] = dTotalFee;
                        }
                    }

                    //foreach (DataRow dr in dtPatientFeeInfo.Rows)
                    //{
                    //    string sInFpName = dr["InFpName"].ToString();
                    //    if (myDictionary.Keys.Contains(sInFpName))
                    //    {
                    //        myDictionary[sInFpName] = Convert.ToDecimal(dr["TotalFee"]);
                    //    }
                    //    else
                    //    {
                    //        myDictionary.Add(sInFpName, Convert.ToDecimal(dr["TotalFee"]));
                    //    }
                    //}



                    gridreport = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 3005, 0, myDictionary, dtPrint);
                }
                else if (iListType == 3)
                {
                    myDictionary["Title"] = "发票项目";
                    gridreport            = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 3007, 0, myDictionary, dtPatientFeeInfo);
                }
                else if (iListType == 4)
                {
                    myDictionary["Title"] = "项目汇总";
                    gridreport            = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 3008, 0, myDictionary, dtPatientFeeInfo);
                }

                ReportViewer.Report = gridreport.Report;
                ReportViewer.Start();
                ReportViewer.Refresh();
            }
            catch (Exception error)
            {
                MessageBox.Show(error.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Esempio n. 23
0
        /// <summary>
        /// 打印点击事件
        /// </summary>
        /// <param name="sender">控件对象</param>
        /// <param name="e">事件参数</param>
        private void btnPrint_Click(object sender, EventArgs e)
        {
            Dictionary <string, object> myDictionary = GetDictionary();

            ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, (int)OP_Enum.PrintReport.医技工作量统计, 0, myDictionary, PrintData).PrintPreview(true);
        }
Esempio n. 24
0
        /// <summary>
        /// 事件
        /// </summary>
        /// <param name="sender">对象</param>
        /// <param name="e">参数</param>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                DateTime beginTime = new DateTime();
                DateTime endTime   = new DateTime();
                GetQueryTime(ref beginTime, ref endTime);
                axGRDisplayViewer.Stop();
                if (txtCode.Text.Trim() == string.Empty)
                {
                    MessageBoxEx.Show("请选择药品");
                    txtCode.Focus();
                    return;
                }

                int queryType = 1;
                if (ratAccount.Checked)
                {
                    if (cmbQueryYear.Text == string.Empty)
                    {
                        MessageBoxEx.Show("会计年不能为空");
                        cmbQueryYear.Focus();
                        return;
                    }

                    if (cmbQueryMonth.Text == string.Empty)
                    {
                        MessageBoxEx.Show("会计月不能为空");
                        cmbQueryMonth.Focus();
                        return;
                    }

                    queryType = 2;
                }
                else
                {
                    queryType = 1;
                }

                int       deptId     = Convert.ToInt32(cmbDept.SelectedValue);
                int       drugId     = Convert.ToInt32(txtCode.MemberValue);
                int       queryYear  = Convert.ToInt32(cmbQueryYear.SelectedValue);
                int       queryMonth = Convert.ToInt32(cmbQueryMonth.SelectedValue);
                DataTable dtReport   = (DataTable)InvokeController("GetAccountDetail", frmName, deptId, queryYear, queryMonth, beginTime.ToString("yyyy-MM-dd HH:mm:ss"), endTime.ToString("yyyy-MM-dd HH:mm:ss"), drugId, queryType);
                orderDt = dtReport;
                Dictionary <string, object> myDictionary = new Dictionary <string, object>();
                myDictionary.Add("开始时间", beginTime.ToString("yyyy-MM-dd HH:mm:ss"));
                myDictionary.Add("结束时间", endTime.ToString("yyyy-MM-dd HH:mm:ss"));
                myDictionary.Add("名称", txtCode.Text);
                myDictionary.Add("生产厂家", ((DataRow)txtCode.SelectedValue)["ProductName"].ToString());
                myDictionary.Add("HospitalName", (InvokeController("this") as AbstractController).LoginUserInfo.WorkName + "药品明细账报表");
                GridReport gridreport = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 4017, 0, myDictionary, dtReport);
                axGRDisplayViewer.Report = gridreport.Report;
                axGRDisplayViewer.Start();
                axGRDisplayViewer.Refresh();
            }
            catch (Exception error)
            {
                MessageBox.Show(error.Message);
            }
        }
Esempio n. 25
0
        public void PatientOutHospital()
        {
            // 检查是否已开出院医嘱
            Action <ClientRequestData> patrequestAction = ((ClientRequestData request) =>
            {
                request.AddData(bedManagement.Bed.PatientID);
            });

            // 获取病人出院医嘱数据
            ServiceResponseData responData = InvokeWcfService(
                "IPProject.Service",
                "BedManagementController",
                "IsExistenceDischargeOrder",
                patrequestAction);
            DataTable patDt           = responData.GetData <DataTable>(0);
            int       isLeaveHosOrder = Tools.ToInt32(patDt.Rows[0]["IsLeaveHosOrder"]);
            DateTime  leaveHDate      = Convert.ToDateTime(patDt.Rows[0]["LeaveHDate"]);

            if (isLeaveHosOrder == 0)
            {
                MessageBoxShowSimple("定义出区失败,当前病人医生未开出区医嘱!");
                return;
            }

            // 不在指定日期内办理出区
            if (DateTime.Compare(
                    Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd")),
                    Convert.ToDateTime(leaveHDate.ToString("yyyy-MM-dd"))) > 0)
            {
                if (MessageBoxShowYesNo("当前日期已超出出区医嘱中的出区日期,确定继续办理出区吗?") == DialogResult.No)
                {
                    return;
                }
            }
            else if (DateTime.Compare(
                         Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd")),
                         Convert.ToDateTime(leaveHDate.ToString("yyyy-MM-dd"))) < 0)
            {
                if (MessageBoxShowYesNo("当前日期小于出区医嘱中的出区日期,确定继续办理出区吗?") == DialogResult.No)
                {
                    return;
                }
            }
            else
            {
                if (MessageBoxShowYesNo("确定要办理出院吗?") == DialogResult.No)
                {
                    return;
                }
            }

            Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
            {
                request.AddData(bedManagement.Bed.PatientID);
                request.AddData(Convert.ToInt32(bedManagement.Bed.WardCode));
                request.AddData(0);
            });

            ServiceResponseData retdata = InvokeWcfService(
                "IPProject.Service",
                "BedManagementController",
                "PatientOutHospital",
                requestAction);

            bool      result   = retdata.GetData <bool>(0);
            DataTable reportDt = retdata.GetData <DataTable>(1);

            if (!result)
            {
                // 病人有医嘱、账单未停,或者药品未统领发药
                if (reportDt.Rows.Count > 0)
                {
                    mDischargeConfirmation.Bind_NotStopOrder(reportDt, false);
                }

                ((Form)iBaseView["FrmDischargeConfirmation"]).ShowDialog();
            }
            else
            {
                MessageBoxShowSimple("病人定义出院成功!");
                // 打印出院通知单
                Dictionary <string, object> dic = new Dictionary <string, object>();
                if (reportDt.Rows.Count > 0)
                {
                    if (reportDt.Rows.Count > 0)
                    {
                        dic.Add("Head", LoginUserInfo.WorkName + "出院通知单");
                        dic.Add("PatName", reportDt.Rows[0]["PatName"]);
                        dic.Add("PatSex", reportDt.Rows[0]["Sex"]);
                        dic.Add("PatAge", SetAge(reportDt.Rows[0]["Age"].ToString()));
                        dic.Add("PatDept", reportDt.Rows[0]["Name"]);
                        dic.Add("PatSerialNumber", reportDt.Rows[0]["CaseNumber"]);
                        dic.Add("PatAddress", reportDt.Rows[0]["NAddress"]);
                        dic.Add("PatEnterDiseaseName", reportDt.Rows[0]["EnterDiseaseName"]);
                        dic.Add("LeaveHDateYear", Convert.ToDateTime(reportDt.Rows[0]["LeaveHDate"]).Year);
                        dic.Add("LeaveHDateMonth", Convert.ToDateTime(reportDt.Rows[0]["LeaveHDate"]).Month);
                        dic.Add("LeaveHDateDay", Convert.ToDateTime(reportDt.Rows[0]["LeaveHDate"]).Day);
                        dic.Add("LeaveHDateHH", Convert.ToDateTime(reportDt.Rows[0]["LeaveHDate"]).Hour);
                        dic.Add("OutSituation", reportDt.Rows[0]["OutSituation"]);
                        ReportTool.GetReport(LoginUserInfo.WorkId, 3003, 0, dic, null).PrintPreview(true);
                    }
                }

                GetBedList(int.Parse(bedManagement.Bed.WardCode));
            }
        }
        /// <summary>
        /// 缴纳预交金
        /// </summary>
        /// <param name="depositList">待保存预交金数据</param>
        private void PayADeposit(IP_DepositList depositList)
        {
            depositList.MakerEmpID = LoginUserInfo.EmpId; //收费人
            depositList.MakerDate  = DateTime.Now;        // 收费时间
            depositList.Status     = 0;
            depositList.PrintTimes = 1;
            Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
            {
                request.AddData(depositList);
            });

            if (depositList.TotalFee <= 0)
            {
                MessageBoxShowSimple("请输入正确的金额");
                return;
            }

            if (MessageBoxShowYesNo(string.Format("确定要该病人收费[{0}]吗?", depositList.TotalFee)) == DialogResult.Yes)
            {
                ServiceResponseData retdata = InvokeWcfService("IPProject.Service", "AdmissionController", "PayADeposit", requestAction);
                string msg       = retdata.GetData <string>(0);
                int    depositID = retdata.GetData <int>(1);

                if (depositID <= 0)
                {
                    MessageBoxShowSimple(msg);
                }
                else
                {
                    Action <ClientRequestData> derequestAction = ((ClientRequestData request) =>
                    {
                        request.AddData(depositID);
                    });

                    ServiceResponseData         deretdata = InvokeWcfService("IPProject.Service", "AdmissionController", "GetPayADeposit", derequestAction);
                    DataTable                   dt        = deretdata.GetData <DataTable>(0);
                    Dictionary <string, object> dic       = new Dictionary <string, object>();

                    if (dt.Rows.Count > 0 && dt.Rows[0]["Status"].ToString() == "正常")
                    {
                        dt.Rows[0]["Head"] = LoginUserInfo.WorkName + "预交金缴款单";
                        string serialNumber = dt.Rows[0]["SerialNumber"].ToString();
                        string patName      = dt.Rows[0]["PatName"].ToString();
                        dt.Rows[0]["SerialNumberName"] = patName + "(住院号" + serialNumber + ")";

                        for (int i = 0; i < dt.Rows.Count; i++)
                        {
                            for (int j = 0; j < dt.Rows[i].ItemArray.Length; j++)
                            {
                                dic.Add(dt.Columns[j].ColumnName, dt.Rows[i][j]);
                            }

                            dic.Add("Year", Convert.ToDateTime(dt.Rows[i]["MakerDate"]).Year);
                            dic.Add("Month", Convert.ToDateTime(dt.Rows[i]["MakerDate"]).Month);
                            dic.Add("Day", Convert.ToDateTime(dt.Rows[i]["MakerDate"]).Day);
                            dic.Add("TotalFees", dt.Rows[i]["TotalFee"].ToString());
                        }

                        ReportTool.GetReport(LoginUserInfo.WorkId, 3204, 0, dic, null).PrintPreview(true);
                    }
                    else
                    {
                        DevComponents.DotNetBar.MessageBoxEx.Show("已退费不能打印");
                    }
                }
            }
        }
Esempio n. 27
0
        /// <summary>
        /// 结算成功后的处理
        /// </summary>
        private void CostAfterSuccess()
        {
            MessageBox.Show("结算成功!");
            DataTable costInvoiceDt = SetCostInvoiceDt();
            DataRow   costDr        = costInvoiceDt.NewRow();

            costDr["InvoiceNo"]    = mIDischargeSettlement.InvoiceNo;
            costDr["PatDept"]      = mIDischargeSettlement.PatientDt.Rows[0]["DeptName"];
            costDr["SerialNumber"] = mIDischargeSettlement.PatientDt.Rows[0]["CaseNumber"];
            costDr["CostYear"]     = DateTime.Now.ToString("yyyy");
            costDr["CostMM"]       = DateTime.Now.ToString("MM");
            costDr["CostDay"]      = DateTime.Now.ToString("dd");
            costDr["PatName"]      = mIDischargeSettlement.PatientDt.Rows[0]["PatName"];
            costDr["EnterHDate"]   = mIDischargeSettlement.PatientDt.Rows[0]["EnterHDate"];
            DateTime enterHDate = Convert.ToDateTime(mIDischargeSettlement.PatientDt.Rows[0]["EnterHDate"]);
            DateTime leaveHDate = Convert.ToDateTime(mIDischargeSettlement.PatientDt.Rows[0]["LeaveHDate"]);

            if (mIDischargeSettlement.CostType == 1)
            {
                int days = new TimeSpan(DateTime.Now.Ticks - enterHDate.Ticks).Days;

                if (days == 0)
                {
                    days = 1;
                }

                costDr["HospitalDays"] = days + 1;
            }
            else
            {
                costDr["LeaveHDate"] = costDr["LeaveHDate"] = Convert.ToDateTime(mIDischargeSettlement.PatientDt.Rows[0]["LeaveHDate"]).ToString("yyyy年MM月dd日");
                int days = new TimeSpan(leaveHDate.Ticks - enterHDate.Ticks).Days;

                if (days == 0)
                {
                    days = 1;
                }

                costDr["HospitalDays"] = days + 1;
            }

            //costDr["BedFee"] = mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='床位费'");
            //costDr["OperationCost"] = mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='手术费'");
            //costDr["WesternMedicineFee"] = mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='西药费'");
            //costDr["TheExamination"] = mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='诊查费'");
            //costDr["LaboratoryFee"] = mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='化验费'");
            //costDr["MediumCost"] = mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='中成药费'");
            //costDr["InspectionFee"] = mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='检查费'");
            //costDr["MaterialCost"] = mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='材料费'");
            //costDr["GrassFee"] = mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='中草药费'");
            //costDr["TreatmentCost"] = mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='治疗费'");
            //costDr["BloodTransfusion"] = mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='输血费'");
            //costDr["AnesthesiaCharge"] = mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='麻醉费'");
            //costDr["NursingCost"] = mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='护理费'");
            //costDr["OxygenFee"] = mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='输氧费'");
            //costDr["OtherFees"] = mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='其他费'");
            costDr["TotalFeeCapital"]   = mIDischargeSettlement.TotalFee;
            costDr["TotalFee"]          = mIDischargeSettlement.TotalFee;
            costDr["DepositFeeCapital"] = mIDischargeSettlement.DepositFee;
            costDr["DepositFee"]        = mIDischargeSettlement.DepositFee;
            costDr["Refundable"]        = mIPayMentInfo.CostFee.zyRefundFee;

            if (mIDischargeSettlement.CostType == 3)
            {
                costDr["Arrears"] = mIPayMentInfo.CostFee.zyChargeFee;
            }
            else
            {
                costDr["UpClose"] = mIPayMentInfo.CostFee.zyChargeFee;
            }

            costDr["PromFee"] = mIPayMentInfo.PromFee;
            costDr["EmpName"] = LoginUserInfo.EmpName;
            costInvoiceDt.Rows.Add(costDr);

            // 结算成功后刷新病人费用列表
            StatisticsFeeByFeeType();

            if (mIDischargeSettlement.CostType == 2 || mIDischargeSettlement.CostType == 3)
            {
                GetPatientList();
            }

            StringBuilder lastPatCostData = new StringBuilder();

            lastPatCostData.Append("上一病人: " + mIPayMentInfo.CostHead.PatName + "\n\n");
            lastPatCostData.Append("票 据 号: " + mIDischargeSettlement.InvoiceNo + "\n\n");
            lastPatCostData.Append("总 金 额: " + string.Format("{0:N}", mIPayMentInfo.CostFee.PayTotalFee) + "\n\n");

            foreach (IP_CostPayment payment in mIPayMentInfo.CostPayList)
            {
                lastPatCostData.Append(payment.PayName + ": " + string.Format("{0:N}", payment.CostMoney) + "\n\n");
            }

            lastPatCostData.Append("预 交 金:" + string.Format("{0:N}", mIPayMentInfo.CostFee.zyDepositFee) + "\n\n");
            decimal actPaycash = mIPayMentInfo.CostFee.ChangeFee + mIPayMentInfo.CostFee.CashFee;

            lastPatCostData.Append("实付现金: " + string.Format("{0:N}", actPaycash) + "\n\n");
            lastPatCostData.Append("找零金额: " + string.Format("{0:N}", mIPayMentInfo.CostFee.ChangeFee) + "\n\n");
            decimal balanceFee = 0;

            if (mIPayMentInfo.CostFee.zyChargeFee != 0 || mIPayMentInfo.CostFee.zyRefundFee != 0)
            {
                if (mIPayMentInfo.CostFee.zyChargeFee != 0)
                {
                    balanceFee = 0 - mIPayMentInfo.CostFee.zyChargeFee;
                }
                else if (mIPayMentInfo.CostFee.zyRefundFee != 0)
                {
                    balanceFee = mIPayMentInfo.CostFee.zyRefundFee;
                }
            }

            lastPatCostData.Append("预交金结余: " + string.Format("{0:N}", balanceFee) + "\n\n");
            lastPatCostData.Append("凑整金额: " + string.Format("{0:N}", mIPayMentInfo.CostFee.RoundFee) + "\n\n");
            mIDischargeSettlement.SetLastPatCostData(lastPatCostData.ToString());
            GetInvoiceNO(true);

            // 结算发票
            Dictionary <string, object> dic = new Dictionary <string, object>();

            if (costInvoiceDt.Rows.Count > 0)
            {
                if (costInvoiceDt.Rows.Count > 0)
                {
                    dic.Add("Head", LoginUserInfo.WorkName);                        // 机构名
                    dic.Add("InvoiceNo", costInvoiceDt.Rows[0]["InvoiceNo"]);       //发票号
                    dic.Add("PatDept", costInvoiceDt.Rows[0]["PatDept"]);           //科室
                    dic.Add("SerialNumber", costInvoiceDt.Rows[0]["SerialNumber"]); //住院号
                    dic.Add("CostYear", costInvoiceDt.Rows[0]["CostYear"]);         //结算年
                    dic.Add("CostMM", costInvoiceDt.Rows[0]["CostMM"]);             //结算月
                    dic.Add("CostDay", costInvoiceDt.Rows[0]["CostDay"]);           //结算日
                    dic.Add("PatName", costInvoiceDt.Rows[0]["PatName"]);           //病人姓名
                    dic.Add("EnterHDate", costInvoiceDt.Rows[0]["EnterHDate"]);     //入院日期
                    dic.Add("LeaveHDate", costInvoiceDt.Rows[0]["LeaveHDate"]);     //出院日期
                    dic.Add("HospitalDays", costInvoiceDt.Rows[0]["HospitalDays"]); //住院天数

                    dic.Add("西药", mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='西药'"));
                    dic.Add("中成药", mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='中成药'"));
                    dic.Add("中草药", mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='中草药'"));
                    dic.Add("化验", mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='化检'"));
                    dic.Add("治疗", mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='治疗'"));
                    dic.Add("床费", mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='床费'"));
                    dic.Add("检查", mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='检查'"));
                    dic.Add("材料费", mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='材料费'"));
                    dic.Add("护理费", mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='护理费'"));
                    dic.Add("心电", mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='心电'"));
                    dic.Add("B超", mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='B超'"));
                    dic.Add("会诊", mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='会诊'"));
                    dic.Add("其他", mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='其他'"));
                    dic.Add("医事服务费", mIDischargeSettlement.PatFeeDt.Compute("SUM(TotalFee)", "SubName='医事服务费'"));

                    //dic.Add("BedFee", costInvoiceDt.Rows[0]["BedFee"]);//床位费
                    //dic.Add("OperationCost", costInvoiceDt.Rows[0]["OperationCost"]);//手术费
                    //dic.Add("WesternMedicineFee", costInvoiceDt.Rows[0]["WesternMedicineFee"]);//西药费
                    //dic.Add("TheExamination", costInvoiceDt.Rows[0]["TheExamination"]);//诊查费
                    //dic.Add("LaboratoryFee", costInvoiceDt.Rows[0]["LaboratoryFee"]);//化验费
                    //dic.Add("MediumCost", costInvoiceDt.Rows[0]["MediumCost"]);//中成药
                    //dic.Add("InspectionFee", costInvoiceDt.Rows[0]["InspectionFee"]);//检查费
                    //dic.Add("MaterialCost", costInvoiceDt.Rows[0]["MaterialCost"]);//材料费
                    //dic.Add("GrassFee", costInvoiceDt.Rows[0]["GrassFee"]);//中草药
                    //dic.Add("TreatmentCost", costInvoiceDt.Rows[0]["TreatmentCost"]);//治疗费
                    //dic.Add("BloodTransfusion", costInvoiceDt.Rows[0]["BloodTransfusion"]);//输血费
                    //dic.Add("AnesthesiaCharge", costInvoiceDt.Rows[0]["AnesthesiaCharge"]);//麻醉费
                    //dic.Add("NursingCost", costInvoiceDt.Rows[0]["NursingCost"]);//护理费
                    //dic.Add("OxygenFee", costInvoiceDt.Rows[0]["OxygenFee"]);//输氧费
                    //dic.Add("OtherFees", costInvoiceDt.Rows[0]["OtherFees"]);//其他
                    dic.Add("TotalFeeCapital", costInvoiceDt.Rows[0]["TotalFeeCapital"]);     //总费用金额大写
                    dic.Add("TotalFee", costInvoiceDt.Rows[0]["TotalFee"]);                   //总费用金额
                    dic.Add("DepositFeeCapital", costInvoiceDt.Rows[0]["DepositFeeCapital"]); //预交金金额大写
                    dic.Add("DepositFee", costInvoiceDt.Rows[0]["DepositFee"]);               //预交金金额
                    dic.Add("UpClose", costInvoiceDt.Rows[0]["UpClose"]);                     //应收
                    dic.Add("Refundable", costInvoiceDt.Rows[0]["Refundable"]);               //应退
                    dic.Add("Arrears", costInvoiceDt.Rows[0]["Arrears"]);                     //欠费
                    dic.Add("PromFee", costInvoiceDt.Rows[0]["PromFee"]);                     //欠费
                    dic.Add("EmpName", costInvoiceDt.Rows[0]["EmpName"]);                     //收费员
                    ReportTool.GetReport(LoginUserInfo.WorkId, 3004, 0, dic, null).PrintPreview(true);
                }
            }
        }
        public void InvoiceFill()
        {
            mIDischargeRecall.PrintInvoiceInfo.NewInvoiceNumber = mIInvoiceFill.InvoiceNO;
            mIDischargeRecall.PrintInvoiceInfo.PrintEmpID       = LoginUserInfo.EmpId;

            Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
            {
                request.AddData(mIDischargeRecall.PatListID);
                request.AddData(mIDischargeRecall.CostHeadID);
                request.AddData(mIDischargeRecall.PrintInvoiceInfo);
            });

            ServiceResponseData retdata       = InvokeWcfService("IPProject.Service", "DischargeRecallController", "GetInvoiceFillData", requestAction);
            DataTable           cost          = retdata.GetData <DataTable>(0);
            DataTable           costDetails   = retdata.GetData <DataTable>(1);
            DataTable           costInvoiceDt = SetCostInvoiceDt();
            DataRow             costDr        = costInvoiceDt.NewRow();

            costDr["InvoiceNo"]    = mIInvoiceFill.InvoiceNO;
            costDr["PatDept"]      = cost.Rows[0]["DeptName"];
            costDr["SerialNumber"] = cost.Rows[0]["CaseNumber"];
            costDr["CostYear"]     = DateTime.Now.ToString("yyyy");
            costDr["CostMM"]       = DateTime.Now.ToString("MM");
            costDr["CostDay"]      = DateTime.Now.ToString("dd");
            costDr["PatName"]      = cost.Rows[0]["PatName"];
            costDr["EnterHDate"]   = cost.Rows[0]["EnterHDate"];
            DateTime enterHDate = Convert.ToDateTime(cost.Rows[0]["EnterHDate"]);
            DateTime leaveHDate = Convert.ToDateTime(cost.Rows[0]["LeaveHDate"]);

            if (Convert.ToInt32(cost.Rows[0]["CostType"]) == 1)
            {
                int days = new TimeSpan(DateTime.Now.Ticks - enterHDate.Ticks).Days;

                if (days == 0)
                {
                    days = 1;
                }

                costDr["HospitalDays"] = days + 1;
            }
            else
            {
                costDr["LeaveHDate"] = Convert.ToDateTime(cost.Rows[0]["LeaveHDate"]).ToString("yyyy年MM月dd日");
                int days = new TimeSpan(leaveHDate.Ticks - enterHDate.Ticks).Days;

                if (days == 0)
                {
                    days = 1;
                }

                costDr["HospitalDays"] = days + 1;
            }

            //costDr["BedFee"] = costDetails.Compute("SUM(TotalFee)", "SubName='床位费'");
            //costDr["OperationCost"] = costDetails.Compute("SUM(TotalFee)", "SubName='手术费'");
            //costDr["WesternMedicineFee"] = costDetails.Compute("SUM(TotalFee)", "SubName='西药费'");
            //costDr["TheExamination"] = costDetails.Compute("SUM(TotalFee)", "SubName='诊查费'");
            //costDr["LaboratoryFee"] = costDetails.Compute("SUM(TotalFee)", "SubName='化验费'");
            //costDr["MediumCost"] = costDetails.Compute("SUM(TotalFee)", "SubName='中成药费'");
            //costDr["InspectionFee"] = costDetails.Compute("SUM(TotalFee)", "SubName='检查费'");
            //costDr["MaterialCost"] = costDetails.Compute("SUM(TotalFee)", "SubName='材料费'");
            //costDr["GrassFee"] = costDetails.Compute("SUM(TotalFee)", "SubName='中草药费'");
            //costDr["TreatmentCost"] = costDetails.Compute("SUM(TotalFee)", "SubName='治疗费'");
            //costDr["BloodTransfusion"] = costDetails.Compute("SUM(TotalFee)", "SubName='输血费'");
            //costDr["AnesthesiaCharge"] = costDetails.Compute("SUM(TotalFee)", "SubName='麻醉费'");
            //costDr["NursingCost"] = costDetails.Compute("SUM(TotalFee)", "SubName='护理费'");
            //costDr["OxygenFee"] = costDetails.Compute("SUM(TotalFee)", "SubName='输氧费'");
            //costDr["OtherFees"] = costDetails.Compute("SUM(TotalFee)", "SubName='其他费'");
            costDr["DepositFeeCapital"] = cost.Rows[0]["DeptositFee"];
            costDr["DepositFee"]        = cost.Rows[0]["DeptositFee"];

            if (Convert.ToDecimal(cost.Rows[0]["BalanceFee"]) > 0)
            {
                costDr["Refundable"] = cost.Rows[0]["BalanceFee"];
            }
            else
            {
                if (Convert.ToInt32(cost.Rows[0]["CostType"]) == 3)
                {
                    costDr["Arrears"] = cost.Rows[0]["BalanceFee"];
                }
                else
                {
                    costDr["UpClose"] = cost.Rows[0]["BalanceFee"];
                }
            }

            costDr["PromFee"] = cost.Rows[0]["PromFee"];

            if (Convert.ToDecimal(cost.Rows[0]["PromFee"]) > 0)
            {
                costDr["TotalFeeCapital"] = Convert.ToDecimal(cost.Rows[0]["TotalFee"]) - Convert.ToDecimal(cost.Rows[0]["PromFee"]);
                costDr["TotalFee"]        = Convert.ToDecimal(cost.Rows[0]["TotalFee"]) - Convert.ToDecimal(cost.Rows[0]["PromFee"]);
            }
            else
            {
                costDr["TotalFeeCapital"] = cost.Rows[0]["TotalFee"];
                costDr["TotalFee"]        = cost.Rows[0]["TotalFee"];
            }

            costDr["EmpName"] = cost.Rows[0]["EmpName"];
            costInvoiceDt.Rows.Add(costDr);
            // 结算发票
            Dictionary <string, object> dic = new Dictionary <string, object>();

            if (costInvoiceDt.Rows.Count > 0)
            {
                if (costInvoiceDt.Rows.Count > 0)
                {
                    dic.Add("Head", LoginUserInfo.WorkName);                        //发票号
                    dic.Add("InvoiceNo", costInvoiceDt.Rows[0]["InvoiceNo"]);       //发票号
                    dic.Add("PatDept", costInvoiceDt.Rows[0]["PatDept"]);           //科室
                    dic.Add("SerialNumber", costInvoiceDt.Rows[0]["SerialNumber"]); //住院号
                    dic.Add("CostYear", costInvoiceDt.Rows[0]["CostYear"]);         //结算年
                    dic.Add("CostMM", costInvoiceDt.Rows[0]["CostMM"]);             //结算月
                    dic.Add("CostDay", costInvoiceDt.Rows[0]["CostDay"]);           //结算日
                    dic.Add("PatName", costInvoiceDt.Rows[0]["PatName"]);           //病人姓名
                    dic.Add("EnterHDate", costInvoiceDt.Rows[0]["EnterHDate"]);     //入院日期
                    dic.Add("LeaveHDate", costInvoiceDt.Rows[0]["LeaveHDate"]);     //出院日期
                    dic.Add("HospitalDays", costInvoiceDt.Rows[0]["HospitalDays"]); //住院天数

                    dic.Add("西药", costDetails.Compute("SUM(TotalFee)", "SubName='西药'"));
                    dic.Add("中成药", costDetails.Compute("SUM(TotalFee)", "SubName='中成药'"));
                    dic.Add("中草药", costDetails.Compute("SUM(TotalFee)", "SubName='中草药'"));
                    dic.Add("化验", costDetails.Compute("SUM(TotalFee)", "SubName='化检'"));
                    dic.Add("治疗", costDetails.Compute("SUM(TotalFee)", "SubName='治疗'"));
                    dic.Add("床费", costDetails.Compute("SUM(TotalFee)", "SubName='床费'"));
                    dic.Add("检查", costDetails.Compute("SUM(TotalFee)", "SubName='检查'"));
                    dic.Add("材料费", costDetails.Compute("SUM(TotalFee)", "SubName='材料费'"));
                    dic.Add("护理费", costDetails.Compute("SUM(TotalFee)", "SubName='护理费'"));
                    dic.Add("心电", costDetails.Compute("SUM(TotalFee)", "SubName='心电'"));
                    dic.Add("B超", costDetails.Compute("SUM(TotalFee)", "SubName='B超'"));
                    dic.Add("会诊", costDetails.Compute("SUM(TotalFee)", "SubName='会诊'"));
                    dic.Add("其他", costDetails.Compute("SUM(TotalFee)", "SubName='其他'"));
                    dic.Add("医事服务费", costDetails.Compute("SUM(TotalFee)", "SubName='医事服务费'"));

                    //dic.Add("BedFee", costInvoiceDt.Rows[0]["BedFee"]);//床位费
                    //dic.Add("OperationCost", costInvoiceDt.Rows[0]["OperationCost"]);//手术费
                    //dic.Add("WesternMedicineFee", costInvoiceDt.Rows[0]["WesternMedicineFee"]);//西药费
                    //dic.Add("TheExamination", costInvoiceDt.Rows[0]["TheExamination"]);//诊查费
                    //dic.Add("LaboratoryFee", costInvoiceDt.Rows[0]["LaboratoryFee"]);//化验费
                    //dic.Add("MediumCost", costInvoiceDt.Rows[0]["MediumCost"]);//中成药
                    //dic.Add("InspectionFee", costInvoiceDt.Rows[0]["InspectionFee"]);//检查费
                    //dic.Add("MaterialCost", costInvoiceDt.Rows[0]["MaterialCost"]);//材料费
                    //dic.Add("GrassFee", costInvoiceDt.Rows[0]["GrassFee"]);//中草药
                    //dic.Add("TreatmentCost", costInvoiceDt.Rows[0]["TreatmentCost"]);//治疗费
                    //dic.Add("BloodTransfusion", costInvoiceDt.Rows[0]["BloodTransfusion"]);//输血费
                    //dic.Add("AnesthesiaCharge", costInvoiceDt.Rows[0]["AnesthesiaCharge"]);//麻醉费
                    //dic.Add("NursingCost", costInvoiceDt.Rows[0]["NursingCost"]);//护理费
                    //dic.Add("OxygenFee", costInvoiceDt.Rows[0]["OxygenFee"]);//输氧费
                    //dic.Add("OtherFees", costInvoiceDt.Rows[0]["OtherFees"]);//其他

                    dic.Add("TotalFeeCapital", costInvoiceDt.Rows[0]["TotalFeeCapital"]);     //总费用金额大写
                    dic.Add("TotalFee", costInvoiceDt.Rows[0]["TotalFee"]);                   //总费用金额
                    dic.Add("DepositFeeCapital", costInvoiceDt.Rows[0]["DepositFeeCapital"]); //预交金金额大写
                    dic.Add("DepositFee", costInvoiceDt.Rows[0]["DepositFee"]);               //预交金金额
                    dic.Add("UpClose", costInvoiceDt.Rows[0]["UpClose"]);                     //应收
                    dic.Add("Refundable", costInvoiceDt.Rows[0]["Refundable"]);               //应退
                    dic.Add("Arrears", costInvoiceDt.Rows[0]["Arrears"]);                     //欠费
                    dic.Add("PromFee", costInvoiceDt.Rows[0]["PromFee"]);                     //欠费
                    dic.Add("EmpName", costInvoiceDt.Rows[0]["EmpName"]);                     //收费员
                    ReportTool.GetReport(LoginUserInfo.WorkId, 3004, 0, dic, null).PrintPreview(true);
                }
            }

            mIInvoiceFill.CloseForm();
        }