private void btOk_Click(object sender, EventArgs e)
        {
            Class.ClinicDayBalanceNew obj = null;
            for (int i = 0; i < neuSpread1_Sheet1.Rows.Count; i++)
            {
                if (this.neuSpread1_Sheet1.Cells[i, 0].Text != "True")
                {
                    continue;
                }
                if (this.neuSpread1_Sheet1.Rows[i].Tag == null)
                {
                    continue;
                }
                obj        = this.neuSpread1_Sheet1.Rows[i].Tag as Class.ClinicDayBalanceNew;
                balanceNO += obj.BlanceNO + ",";
            }

            if (balanceNO == string.Empty)
            {
                MessageBox.Show("请选择要汇总的数据!");
                return;
            }
            balanceNO = balanceNO.Substring(0, balanceNO.LastIndexOf(","));
            this.FindForm().DialogResult = DialogResult.OK;
            this.FindForm().Close();
        }
        public new ClinicDayBalanceNew Clone()
        {
            ClinicDayBalanceNew obj = base.Clone() as ClinicDayBalanceNew;

            obj.Oper      = this.Oper.Clone();
            obj.InvoiceNO = this.InvoiceNO.Clone();
            return(obj);
        }
Beispiel #3
0
 /// <summary>
 /// 设置单个金额实体(只存一个金额或数量)
 /// </summary>
 /// <param name="InvoiceID">统计大类编码</param>
 /// <param name="InvoiceName">统计大类名称</param>
 /// <param name="Money">金额</param>
 /// <param name="typeStr">类别</param>
 private void SetOneCellDayBalance(string InvoiceID, string InvoiceName, decimal Money, string typeStr)
 {
     dayBalance = new Neusoft.Report.Finance.FinOpb.Class.ClinicDayBalanceNew();
     dayBalance.InvoiceNO.ID   = InvoiceID;
     dayBalance.InvoiceNO.Name = InvoiceName;
     dayBalance.TotCost        = Money;
     dayBalance.TypeStr        = typeStr;
     dayBalance.SortID         = InvoiceID + "|" + "TOT_COST";
     this.SetDayBalance();
 }
Beispiel #4
0
        /// <summary>
        /// 获得日结实体
        /// </summary>
        private void SetDayBalanceData()
        {
            FarPoint.Win.Spread.SheetView sheet = this.ucClinicDayBalanceReportNew1.neuSpread1_Sheet1;
            string strValue = string.Empty;

            #region 起止发票号
            dayBalance = new Neusoft.Report.Finance.FinOpb.Class.ClinicDayBalanceNew();
            dayBalance.InvoiceNO.ID   = "A001";
            dayBalance.InvoiceNO.Name = "起始结束票据号";
            strValue = GetOneCellText(sheet, "A00101");
            dayBalance.BegionInvoiceNO = strValue;
            strValue = GetOneCellText(sheet, "A00102");
            dayBalance.EndInvoiceNo = strValue;
            //设置Cell显示数据的Tag和字段名称
            dayBalance.SortID  = "A00101|EXTENT_FIELD2、A00102|EXTENT_FIELD3";
            dayBalance.TypeStr = "5";
            this.SetDayBalance();
            #endregion

            #region 票据总数
            strValue = GetOneCellText(sheet, "A002");
            this.SetOneCellDayBalance("A002", "票据总数", NConvert.ToDecimal(strValue), "5");
            #endregion

            #region  效票据
            strValue = GetOneCellText(sheet, "A003");
            this.SetOneCellDayBalance("A003", "有效票据", NConvert.ToDecimal(strValue), "5");
            #endregion

            #region 退费票据
            dayBalance = new Neusoft.Report.Finance.FinOpb.Class.ClinicDayBalanceNew();
            dayBalance.InvoiceNO.ID   = "A004";
            dayBalance.InvoiceNO.Name = "退费票据";
            //票据数
            strValue           = this.GetOneCellText(sheet, "A00401");
            dayBalance.TotCost = NConvert.ToDecimal(strValue);
            //票据号
            strValue = this.GetOneCellText(sheet, "A00402");
            dayBalance.CancelInvoiceNo = strValue;
            dayBalance.TypeStr         = "5";
            dayBalance.SortID          = "A00401|TOT_COST、A00402|EXTENT_FIELD5";
            this.SetDayBalance();
            #endregion

            #region 作废票据
            dayBalance = new Neusoft.Report.Finance.FinOpb.Class.ClinicDayBalanceNew();
            dayBalance.InvoiceNO.ID   = "A005";
            dayBalance.InvoiceNO.Name = "作废票据";
            strValue                  = this.GetOneCellText(sheet, "A00501");
            dayBalance.TotCost        = NConvert.ToDecimal(strValue);
            strValue                  = this.GetOneCellText(sheet, "A00502");
            dayBalance.FalseInvoiceNo = strValue;
            dayBalance.TypeStr        = "5";
            dayBalance.SortID         = "A00501|TOT_COST、A00502|EXTENT_FIELD4";
            this.SetDayBalance();
            #endregion

            #region 退费金额
            strValue = GetOneCellText(sheet, "A006");
            this.SetOneCellDayBalance("A006", "退费金额", NConvert.ToDecimal(strValue), "5");
            #endregion

            #region 作废金额
            strValue = GetOneCellText(sheet, "A007");
            this.SetOneCellDayBalance("A007", "作废金额", NConvert.ToDecimal(strValue), "5");
            #endregion

            #region 暂时无数据
            #region 押金金额
            strValue = GetOneCellText(sheet, "A008");
            this.SetOneCellDayBalance("A008", "押金金额", NConvert.ToDecimal(strValue), "5");
            #endregion

            #region 退押金额
            strValue = GetOneCellText(sheet, "A009");
            this.SetOneCellDayBalance("A009", "退押金额", NConvert.ToDecimal(strValue), "5");
            #endregion

            #region  减免金额
            strValue = GetOneCellText(sheet, "A010");
            this.SetOneCellDayBalance("A010", "减免金额", NConvert.ToDecimal(strValue), "5");
            #endregion
            #endregion

            #region  四舍五入
            strValue = GetOneCellText(sheet, "A011");
            this.SetOneCellDayBalance("A011", "四舍五入", NConvert.ToDecimal(strValue), "5");
            #endregion

            #region 公费医疗
            strValue = this.GetOneCellText(sheet, "A012");
            SetOneCellDayBalance("A012", "公费医疗", NConvert.ToDecimal(strValue), "6");
            #endregion

            #region 公费自付
            strValue = this.GetOneCellText(sheet, "A013");
            SetOneCellDayBalance("A013", "公费自费", NConvert.ToDecimal(strValue), "6");
            #endregion
            #region 公费账户
            strValue = this.GetOneCellText(sheet, "A026");
            SetOneCellDayBalance("A026", "公费账户", NConvert.ToDecimal(strValue), "6");
            #endregion

            #region 市保自付
            strValue = this.GetOneCellText(sheet, "A014");
            SetOneCellDayBalance("A014", "市保自费", NConvert.ToDecimal(strValue), "6");
            #endregion

            #region 市保账户
            strValue = this.GetOneCellText(sheet, "A015");
            SetOneCellDayBalance("A015", "市保账户", NConvert.ToDecimal(strValue), "6");
            #endregion

            #region 市保统筹
            strValue = this.GetOneCellText(sheet, "A016");
            SetOneCellDayBalance("A016", "市保统筹", NConvert.ToDecimal(strValue), "6");

            #endregion

            #region 市保大额
            strValue = this.GetOneCellText(sheet, "A017");
            SetOneCellDayBalance("A017", "市保大额", NConvert.ToDecimal(strValue), "6");
            #endregion

            #region 省保自付
            strValue = this.GetOneCellText(sheet, "A018");
            SetOneCellDayBalance("A018", "省保自费", NConvert.ToDecimal(strValue), "6");
            #endregion

            #region 省保账户
            strValue = this.GetOneCellText(sheet, "A019");
            SetOneCellDayBalance("A019", "省保账户", NConvert.ToDecimal(strValue), "6");
            #endregion

            #region 省保统筹
            strValue = this.GetOneCellText(sheet, "A020");
            SetOneCellDayBalance("A020", "省保统筹", NConvert.ToDecimal(strValue), "6");
            #endregion

            #region 省保大额
            strValue = this.GetOneCellText(sheet, "A021");
            SetOneCellDayBalance("A021", "省保大额", NConvert.ToDecimal(strValue), "6");
            #endregion

            #region 省公务员
            strValue = this.GetOneCellText(sheet, "A022");
            SetOneCellDayBalance("A022", "省公务员", NConvert.ToDecimal(strValue), "6");
            #endregion

            #region  缴现金额
            strValue = this.GetOneCellText(sheet, "A023");
            SetOneCellDayBalance("A023", "上缴现金额", NConvert.ToDecimal(strValue), "6");

            #endregion

            #region  缴支票额
            strValue = this.GetOneCellText(sheet, "A024");
            SetOneCellDayBalance("A024", "上缴支票额", NConvert.ToDecimal(strValue), "6");
            #endregion

            #region  缴银联额
            strValue = this.GetOneCellText(sheet, "A025");
            SetOneCellDayBalance("A025", "上缴银联额", NConvert.ToDecimal(strValue), "6");
            #endregion
        }
Beispiel #5
0
        /// <summary>
        /// 设置显示项目数据
        /// </summary>
        /// <param name="table"></param>
        protected virtual void SetDetial(DataTable table)
        {
            if (table.Rows.Count == 0)
            {
                return;
            }
            //清除数据
            if (ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Rows.Count > 0)
            {
                ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Rows.Remove(0, ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Rows.Count - 1);
            }
            //设置Farpoint的行数
            int     count      = table.Rows.Count;
            decimal countMoney = 0;

            if (count % 2 == 0)
            {
                ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Rows.Count = Convert.ToInt32(count / 2);
            }
            else
            {
                ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Rows.Count = Convert.ToInt32(count / 2) + 1;
            }

            //显示项目数据
            for (int i = 0; i < count; i++)
            {
                int index  = Convert.ToInt32(i / 2);
                int intMod = (i + 1) % 2;
                if (intMod > 0)
                {
                    ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Models.Span.Add(index, 0, 1, 2);
                    ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Cells[index, 0].Text = table.Rows[i][1].ToString();
                    ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Cells[index, 2].Text = table.Rows[i][2].ToString();
                }
                else
                {
                    ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Models.Span.Add(index, 3, 1, 2);
                    ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Cells[index, 3].Text = table.Rows[i][1].ToString();
                    ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Cells[index, 5].Text = table.Rows[i][2].ToString();
                }
                #region 设置实体
                dayBalance = new Neusoft.Report.Finance.FinOpb.Class.ClinicDayBalanceNew();
                dayBalance.InvoiceNO.ID   = table.Rows[i][0].ToString();
                dayBalance.InvoiceNO.Name = table.Rows[i][1].ToString();
                dayBalance.TotCost        = NConvert.ToDecimal(table.Rows[i][2]);
                dayBalance.TypeStr        = "4";
                dayBalance.SortID         = "TOT_COST";
                this.SetDayBalance();
                #endregion
                countMoney += Convert.ToDecimal(table.Rows[i][2]);
            }
            if (count % 2 > 0)
            {
                ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Models.Span.Add(ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Rows.Count - 1, 3, 1, 2);
            }
            //显示合计
            ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Rows.Count += 1;
            count = ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Rows.Count;
            ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Models.Span.Add(count - 1, 0, 1, 2);
            ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Cells[count - 1, 0].Text = "合计:";
            ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Models.Span.Add(count - 1, 2, 1, 4);
            ucClinicDayBalanceReportNew1.neuSpread1_Sheet1.Cells[count - 1, 2].Text = countMoney.ToString();
            this.d合计 = countMoney;
        }