예제 #1
0
        private void neuSpread2_CellDoubleClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
        {
            if (this.neuTabControl1.Controls.Contains(this.tbFeeDetail))
            {
                this.neuTabControl1.Controls.Remove(this.tbFeeDetail);
            }
            if (this.neuSpread2_Sheet1.RowCount < 1)
            {
                return;
            }

            if (this.neuSpread2_Sheet1.Rows[this.neuSpread2_Sheet1.ActiveRowIndex].Tag == null)
            {
                return;
            }

            Neusoft.HISFC.Models.Account.AccountRecord accountRecord = this.neuSpread2_Sheet1.Rows[this.neuSpread2_Sheet1.ActiveRowIndex].Tag as Neusoft.HISFC.Models.Account.AccountRecord;

            string invoiceNO   = accountRecord.ReMark;
            string invoiceType = accountRecord.InvoiceType.ID;

            if (invoiceNO == "" || invoiceType == string.Empty)
            {
                return;
            }
            //门诊发票类型C
            if (invoiceType != "C")
            {
                return;
            }

            if (accountRecord.OperType.ID.ToString() != ((int)OperTypes.Pay).ToString() || accountRecord.OperType.ID.ToString() != ((int)OperTypes.CancelPay).ToString())
            {
                return;
            }
            bool isQuite = accountRecord.OperType.ID.ToString() == ((int)OperTypes.Pay).ToString() ? true : false;
            //检索发票费用明细
            DataSet dsFeeDetail = accountManager.GetFeeDetailByInvoiceNO(invoiceNO, isQuite);

            if (dsFeeDetail == null)
            {
                return;
            }

            if (dsFeeDetail.Tables[0].Rows.Count == 0)
            {
                return;
            }
            DataRow row = dsFeeDetail.Tables[0].NewRow();

            row[1] = "合计:";
            row[5] = dsFeeDetail.Tables[0].Compute("sum(金额)", "");
            dsFeeDetail.Tables[0].Rows.Add(row);
            this.fpFeeDetail.DataSource = dsFeeDetail;
            this.neuTabControl1.TabPages.Add(this.tbFeeDetail);
            this.neuTabControl1.SelectedTab = this.tbFeeDetail;
        }
예제 #2
0
        /// <summary>
        /// 克隆
        /// </summary>
        /// <returns></returns>
        public new AccountRecord Clone()
        {
            AccountRecord accountCard = base.Clone() as AccountRecord;

            accountCard.patient        = this.Patient.Clone();
            accountCard.empwoerPatient = this.EmpowerPatient.Clone();
            accountCard.operType       = this.OperType.Clone() as EnumOperTypesService;
            accountCard.invoiceType    = this.InvoiceType.Clone();
            return(accountCard);
        }