Esempio n. 1
0
        /// <summary>
        /// 按发票号检索发票基本信息
        /// </summary>
        public int QueryInvoiceInfromationByInvoiceNo()
        {
            // 变量定义
            int    intReturn = 0;
            string strCode   = "";

            System.Data.DataSet dsResult1 = new DataSet();
            System.Data.DataSet dsResult2 = new DataSet();
            System.Data.DataSet dsResult3 = new DataSet();
            Neusoft.HISFC.BizLogic.Fee.Outpatient outpatient = new Neusoft.HISFC.BizLogic.Fee.Outpatient();

            // 获取检索码
            intReturn = this.GetInput(ref strCode);
            if (intReturn == -1)
            {
                this.frmWait.Hide();
                return(-1);
            }

            // 执行查询
            intReturn = outpatient.QueryBalancesByInvoiceNO(strCode, ref dsResult1);
            if (-1 == intReturn)
            {
                MessageBox.Show("获取发票基本信息失败" + outpatient.Err);
                this.frmWait.Hide();
                return(-1);
            }
            this.fpSpread1_Sheet1.DataSource = dsResult1;

            // 按发票号查询同时查询发票明细和费用明细
            intReturn = outpatient.QueryBalanceListsByInvoiceNO(strCode, ref dsResult2);
            if (-1 == intReturn)
            {
                MessageBox.Show("获取发票明细失败" + outpatient.Err);
                this.frmWait.Hide();
                return(-1);
            }
            this.fpSpread1_Sheet2.DataSource = dsResult2;

            intReturn = outpatient.QueryFeeItemListsByInvoiceNO(strCode, ref dsResult3);
            if (-1 == intReturn)
            {
                MessageBox.Show("获取费用明细失败" + outpatient.Err);
                this.frmWait.Hide();
                return(-1);
            }
            this.fpSpread1_Sheet3.DataSource = dsResult3;
            if (this.fpSpread1_Sheet3.RowCount > 0)
            {
                this.SetSheet3DisplayData();
            }
            return(1);
        }
Esempio n. 2
0
        private bool SetInfo(string invoiceNO)
        {
            ArrayList alBalance = outPatientManager.QueryBalancesByInvoiceNO(invoiceNO);

            if (alBalance == null)
            {
                MessageBox.Show("查询发票信息失败!");
                return(false);
            }
            if (alBalance.Count > 0)
            {
                foreach (Neusoft.HISFC.Models.Fee.Outpatient.Balance invoice in alBalance)
                {
                    if (invoice.TransType == TransTypes.Positive && invoice.CancelType == CancelTypes.Valid)
                    {
                        ArrayList alPatient = registerManager.QueryPatient(invoice.Patient.ID);
                        Neusoft.HISFC.Models.Registration.Register r = alPatient[0] as Neusoft.HISFC.Models.Registration.Register;
                        this.lblName.Text    = r.Name;
                        this.lblSex.Text     = r.Sex.Name;
                        this.lblAge.Text     = this.outPatientManager.GetAge(r.Birthday);
                        this.lblDate.Text    = invoice.BalanceOper.OperTime.ToString();
                        this.lblCardNO.Text  = r.PID.CardNO;
                        this.txtCost.Text    = invoice.FT.TotCost.ToString();
                        this.txtOwnCost.Text = invoice.FT.OwnCost.ToString();
                        this.txtPubCost.Text = invoice.FT.PubCost.ToString();
                        this.txtPayCost.Text = invoice.FT.PayCost.ToString();
                        FrameWork.Models.NeuObject obj = perManager.GetPersonByID(invoice.BalanceOper.ID);
                        if (obj != null)
                        {
                            this.lblFeeOper.Text = obj.Name;
                        }

                        this.lblInvoiceNO.Text = invoice.Invoice.ID;
                        if (!SetFeeInfo(invoiceNO))
                        {
                            return(false);
                        }
                        return(true);
                    }
                }
            }
            return(false);
        }