public void MultipleComplexObjects_WithLists_CloneSuccesful() { var reports = new List <DayReport>(); for (int i = 0; i < 2; i++) { var report = new DayReport { ActiveUsers = new List <User>(), AdminLogin = new Login("username", "password"), Url = "url" }; for (int j = 0; j < 2; j++) { report.ActiveUsers.Add(new User { Address = new Address { AddressName = $"Address{j}", Apartment = j, Id = Guid.NewGuid() }, LoginInfo = new Login($"user{j}", "pass"), Name = $"name{j}" }); } reports.Add(report); } ValidateObjects(reports, reports.DeepCloneList <DayReport, List <DayReport> >()); }
public void Initialize(DayReport order = null) { try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } if (order != null) { this.curDayReport = order; } else { //不传就是当日结存。 this.curDayReport = CommonGlobalCache.ServerProxy.GetTodayDayReport(CommonGlobalCache.CurrentShopID); } if (this.curDayReport == null) { return; } this.BindingSource(); } catch (Exception ex) { ShowError(ex); } finally { UnLockPage(); } }
public void SingleComplexObject_WithList_CloneSuccesful() { var report = new DayReport { AdminLogin = new Login("admin", "pass"), Url = "url", ActiveUsers = new List <User>() }; for (int i = 0; i < 2; i++) { report.ActiveUsers.Add(new User { Address = new Address { AddressName = $"Address{i}", Apartment = i, Id = Guid.NewGuid() }, LoginInfo = new Login($"user{i}", "pass"), Name = $"name{i}" }); } var clone = report.DeepClone(); ValidateObjects(report, clone); }
public void CreateDayReport(string name) { var report = new DayReport(Id, LastReportTime()); _dayReports.Add(report); report.CreateReport(name); }
private static PdfPTable GenerateReportTable(DayReport report) { PdfPTable table = new PdfPTable(5); string[] headerTitles = { "Product", "Quantity", "Unit Price", "Location", "Sum" }; foreach (var title in headerTitles) { Phrase phrase = new Phrase(title); phrase.Font = FontFactory.GetFont("Arial", 14, Font.BOLD); PdfPCell cell = new PdfPCell(phrase); cell.BackgroundColor = new BaseColor(175, 166, 166); table.AddCell(cell); cell.Padding = 0; } foreach (var sale in report.Sales) { table.AddCell(sale.ProductName); table.AddCell(sale.MeasureFormatted); table.AddCell(sale.UnitPrice.ToString()); table.AddCell(sale.Supermarket); table.AddCell(sale.Sum.ToString()); } PdfPCell footerCell = new PdfPCell(new Phrase("Total sum for " + report.FormattedDate + ": ")); footerCell.Colspan = 4; footerCell.HorizontalAlignment = 2; table.AddCell(footerCell); table.AddCell(new Phrase(report.TotalSum.ToString())); return(table); }
private void BindGridView() { if (this.drpStore.SelectedValue == "0") { this.PrintfError("请选择仓库"); return; } if (CheckUI()) { try { DataSet ds = DayReport.GetDayReport(this.drpStore.SelectedValue, this.txtTime.Text, (this.drpOrderBy.SelectedValue == "0") ? "" : this.drpOrderBy.SelectedValue); SetSum(ds); this.grdDayReport.DataSource = ds; this.grdDayReport.DataBind(); } catch { this.PrintfError("数据访问错误!"); return; } } else { this.PrintfError("日期格式不对!"); return; } }
public void DayReportConstructorTest() { Day daySelected = null; // TODO: initialisez à une valeur appropriée DayReport target = new DayReport(daySelected); Assert.Inconclusive("TODO: implémentez le code pour vérifier la cible"); }
public static List <DayReport> GetDayReports() { var query = SessionState.db.Sales.Include("Supermarket").Include("Products").GroupBy(s => s.Date); List <DayReport> reports = new List <DayReport>(); foreach (var saleDate in query) { DayReport dayReport = new DayReport(); dayReport.Sales = new List <PdfSaleReport>(); dayReport.FormattedDate = saleDate.Key.ToShortDateString(); double totalSum = 0; foreach (var sale in saleDate) { PdfSaleReport view = new PdfSaleReport(); var product = SessionState.db.Products.Find(sale.ProductId); view.MeasureFormatted = string.Format("{0} {1}", sale.Quantity, product.Measure.MeasureName); view.ProductName = product.ProductName; view.Sum = sale.Sum; view.Supermarket = SessionState.db.Supermarkets.Find(sale.SupermarketId).Name; // workaround view.UnitPrice = sale.UnitPrice; totalSum += sale.Sum; dayReport.Sales.Add(view); } dayReport.TotalSum = totalSum; reports.Add(dayReport); } return(reports); }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (!DataGridViewUtil.CheckPerrmisson(this, sender, e)) { return; } if (e.RowIndex < 0 || e.ColumnIndex < 0) { return; } try { List <DayReport> curDayReportListSource = (List <DayReport>) this.dataGridView1.DataSource; DayReport item = curDayReportListSource[e.RowIndex]; switch (this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value) { case "明细": if (this.DetailClick != null) { this.DetailClick(item, this); } break; } } catch (Exception ex) { CommonGlobalUtil.WriteLog(ex); } }
public void Add(DayReport <T> dayReport) { string shortDateString = dayReport.Date.ToShortDateString(); foreach (var report in dayReport.Reports) { Add(shortDateString, report.Text, (report.End - report.Start).TotalHours); } }
public void FormatHourTest1() { Day daySelected = new Day(0);; // TODO: initialisez à une valeur appropriée DayReport target = new DayReport(daySelected); // TODO: initialisez à une valeur appropriée int Time = 90; // TODO: initialisez à une valeur appropriée string expected = "1H30"; // TODO: initialisez à une valeur appropriée string actual; actual = target.FormatHour(Time); Assert.AreEqual(expected, actual); }
public void MartianTimeTest() { Day daySelected = new Day(1); // TODO: initialisez à une valeur appropriée DayReport target = new DayReport(daySelected); // TODO: initialisez à une valeur appropriée double SecondsBegin = 3600; // TODO: initialisez à une valeur appropriée string expected = "24:01:01"; // TODO: initialisez à une valeur appropriée string actual; actual = target.MartianTime(SecondsBegin); Assert.AreEqual(expected, actual); Assert.Inconclusive("Vérifiez l\'exactitude de cette méthode de test."); }
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; // row.ReadOnly = true; DayReport order = (DayReport)row.DataBoundItem; if (shopIDDataGridViewTextBoxColumn.Index == e.ColumnIndex) { e.Value = CommonGlobalCache.GetShopName(order.ShopID); } DataGridViewUtil.CellFormatting_ReportShowZero(e, ReportShowZero); }
private void dataGridView2_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { DataGridView view = (DataGridView)sender; DataGridViewRow row = view.Rows[e.RowIndex]; // row.ReadOnly = true; DayReport order = (DayReport)row.DataBoundItem; switch (e.RowIndex) { case 0: row.HeaderCell.Value = "充值"; if (SalesInGiftTicket.Index == e.ColumnIndex || dataGridViewTextBoxColumn6.Index == e.ColumnIndex || dataGridViewTextBoxColumn7.Index == e.ColumnIndex) { e.Value = "-"; } break; case 1: row.HeaderCell.Value = "收入"; break; case 2: row.HeaderCell.Value = "退货"; if (SalesInGiftTicket.Index == e.ColumnIndex) { e.Value = "-"; } break; case 3: row.HeaderCell.Value = "小计"; if (Column2.Index == e.ColumnIndex) { e.Value = string.Empty; } break; default: break; } //小计 总额 始终显示,其他为零不显示 if (row.HeaderCell.Value.ToString() == "小计" && Revenue.Index == e.ColumnIndex) { } else { DataGridViewUtil.CellFormatting_ReportShowZero(e, ReportShowZero); } }
public DayReportDetailCtrl(DayReport order = null, CJBasic.Action <List <Guide>, BaseUserControl> dayReportDetailCtrl_GuideInited = null) { InitializeComponent(); this.GuideInited += dayReportDetailCtrl_GuideInited; this.Initialize(order); if (order == null) { MenuPermission = RolePermissionMenuEnum.当日结存; } else { MenuPermission = RolePermissionMenuEnum.日结存查询; } }
private void BindGridViewError() { try { string sql = GetWhereError(); DataSet ds = DayReport.QueryLOG(sql, "", this.PageControl1.GetPageSize(), this.PageControl1.GetCurrPage()); this.grdLog.DataSource = ds; this.grdLog.DataBind(); } catch { this.PrintfError("数据访问错误!"); } }
public DayReportOnlineDetailCtrl(DayReport order = null) { InitializeComponent(); this.Initialize(order); if (order == null) { MenuPermission = RolePermissionMenuEnum.当日结存; } else { MenuPermission = RolePermissionMenuEnum.日结存查询; } // new DataGridViewPagingSumCtrl(dataGridView2).Initialize(); // new DataGridViewPagingSumCtrl(dataGridView1).Initialize(); }
//设置分页控件显示 private void SetPageCountView() { try { string sqlWhere = GetWhere(); int outCount; int pageCount = DayReport.GetLogPageCount(sqlWhere, PageControl1.GetPageSize(), out outCount); PageControl1.SetInitView(pageCount, outCount); } catch { this.PrintfError("数据访问错误,请重试!"); return; } }
public void Add(DayReport <T> dayReport) { string shortDateString = dayReport.Date.ToShortDateString(); var data = DayReports.FirstOrDefault(el => el.Date == dayReport.Date); if (data == null) { DayReports.Add(data = new DayReport <T>() { Date = dayReport.Date }); } data.Reports.AddRange(dayReport.Reports); }
public void Print(DayReport retailCostume, DayReport czmx, DayReport yysr, DayReport total) { InteractResult <PrintTemplateInfo> result = CommonGlobalCache.ServerProxy.GetPrintTemplateInfo(PrintTemplateType.DayReport); if (result.ExeResult == ExeResult.Success) { PrintTemplateInfo PTemplateInfo = result.Data; this.CurrentPTemplate = PTemplateInfo; this.retailCostume = retailCostume; this.cz = czmx; this.sr = yysr; this.total = total; PrintHelper printer = new PrintHelper(RetailCostume_PrintPage2); printer.printDocument.DefaultPageSettings.Margins = new Margins(1, 1, 5, 1); printer.printDocument.DefaultPageSettings.PaperSize = new PaperSize(retailCostume.ReportDate.ToString(), PrintHelper.GetInch(8), 800); printer.DirectlyPrint(CurrentPTemplate.PrintCount); } }
public void Initialize(DayReport order = null) { try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } if (order != null) { this.curDayReport = order; } else { //不传就是当日结存。 this.curDayReport = CommonGlobalCache.ServerProxy.GetTodayDayReport(CommonGlobalCache.CurrentShopID); } if (this.curDayReport == null) { return; } if (this.curDayReport.ManualConfirm || !IsPos) { this.richTextBox_Remark.ReadOnly = true; } else { this.skinLabel_Operator.Visible = false; } this.BindingSource(); BaseButton_Search_Click(null, null); } catch (Exception ex) { ShowError(ex); } finally { UnLockPage(); } }
public List <string> DayReport_guneAitCalisanIsimleri(string date) { return(DayReport.guneAitCalisanIsimleri(date)); }
public DataTable DayReport_raporlariGetir() { dataTable = DayReport.raporlariGetir(); dataTable.TableName = "DayReport"; return(dataTable); }
//DayReport --------------------------------------------------------------------------------------------------> public DataTable DayReport_guneAitRaporGetir(string date) { dataTable = DayReport.guneAitRaporGetir(date); dataTable.TableName = "DayReport"; return(dataTable); }
protected override void Awake() { base.Awake(); instance = this; }
private void BindingSource() { this.skinLabel_shop.Text = "店铺:" + CommonGlobalCache.GetShopName(curDayReport.ShopID); this.skinLabelDate.Text = "日期:" + curDayReport.ReportDate; this.skinLabel_SalesCount.Text = curDayReport.SalesCount.ToString(); this.skinLabel_RefundCount.Text = curDayReport.RefundCount.ToString(); skinLabel_QuantityOfSale.Text = (curDayReport.QuantityOfSale + curDayReport.EmQuantityOfSale).ToString(); skinLabelCostumeMoney.Text = (curDayReport.SalesTotalMoney - curDayReport.CarriageCost).ToString(); skinLabelCarriageCost.Text = curDayReport.CarriageCost.ToString(); skinLabel_QuantityOfRefund.Text = (curDayReport.QuantityOfRefund * -1 + curDayReport.EmQuantityOfRefund * -1).ToString(); DayReport[] reportDetails = new DayReport[] { curDayReport }; List <DayReport> reports = new List <DayReport>(); // reports.Add(curDayReport); //充值 DayReport cz = new DayReport(); cz.SalesInAlipay = curDayReport.RechargeInAlipay; cz.SalesInBankCard = curDayReport.RechargeInBankCard; cz.SalesInCash = curDayReport.RechargeInCash; cz.SalesInWeiXin = curDayReport.RechargeInWeiXin; cz.TotalRecharge = curDayReport.TotalRecharge; cz.SalesInGiftTicket = curDayReport.SalesInGiftTicket; reports.Add(cz); //收入 DayReport sr = new DayReport(); sr.SalesInAlipay = curDayReport.SalesInAlipay; sr.SalesInBankCard = curDayReport.SalesInBankCard; sr.SalesInCash = curDayReport.SalesInCash; sr.SalesInWeiXin = curDayReport.SalesInWeiXin; sr.SalesInVipBalance = curDayReport.SalesInVipBalance; sr.SalesInVipIntegration = curDayReport.SalesInVipIntegration; sr.TotalRecharge = curDayReport.SalesTotalMoney; sr.SalesInGiftTicket = curDayReport.SalesInGiftTicket; reports.Add(sr); //退货 DayReport refund = new DayReport(); refund.SalesInCash = curDayReport.RefundInCash; refund.SalesInWeiXin = curDayReport.RefundInWeiXin; refund.SalesInVipBalance = curDayReport.RefundInVipBalance; refund.SalesInVipIntegration = curDayReport.RefundInVipIntegration; refund.TotalRecharge = curDayReport.RefundTotalMoney; reports.Add(refund); //小计 DayReport sum = new DayReport(); sum.SalesInCash = sr.SalesInCash + cz.SalesInCash + refund.SalesInCash; sum.SalesInAlipay = sr.SalesInAlipay + cz.SalesInAlipay + refund.SalesInAlipay; sum.SalesInBankCard = sr.SalesInBankCard + cz.SalesInBankCard + refund.SalesInBankCard; sum.SalesInWeiXin = sr.SalesInWeiXin + cz.SalesInWeiXin + refund.SalesInWeiXin; sum.SalesInVipBalance = sr.SalesInVipBalance + cz.SalesInVipBalance + refund.SalesInVipBalance; sum.SalesInVipIntegration = sr.SalesInVipIntegration + cz.SalesInVipIntegration + refund.SalesInVipIntegration; sum.TotalRecharge = sr.TotalRecharge + cz.TotalRecharge + refund.TotalRecharge; sum.SalesInGiftTicket = sr.SalesInGiftTicket; reports.Add(sum); yysr = sr; czmx = cz; total = sum; this.dataGridView2.DataSource = reports; }
/// <summary> /// 根据SQL查询日结信息 /// </summary> /// <param name="sql">SQL语句</param> /// <param name="args">参数</param> /// <returns>成功:返回住院日结实体集合 失败 null</returns> private ArrayList QueryDayReportsBySql(string sql, params string[] args) { if (this.ExecQuery(sql, args) == -1) { return(null); } ArrayList alDayReport = new ArrayList(); //日结集合 DayReport dayReport = null; //日结实体 try { //循环读取数据 while (this.Reader.Read()) { dayReport = new DayReport(); //统计序号 dayReport.StatNO = this.Reader[0].ToString(); //开始时间 dayReport.BeginDate = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[1].ToString()); //结束日期 dayReport.EndDate = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[2].ToString()); //操作员代码 dayReport.Oper.ID = this.Reader[3].ToString(); //统计时间 dayReport.Oper.OperTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[4].ToString()); //收取预交金金额 dayReport.PrepayCost = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[5].ToString()); //借方支票金额 dayReport.DebitCheckCost = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[6].ToString()); //借方银行卡金额 dayReport.DebitBankCost = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[7].ToString()); //结算预交金金额 dayReport.BalancePrepayCost = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[8].ToString()); //贷方支票金额 dayReport.LenderCheckCost = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[9].ToString()); //贷方银行卡金额 dayReport.LenderBankCost = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[10].ToString()); //公费记帐金额 dayReport.BursaryPubCost = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[11].ToString()); //市医保帐户支付金额 dayReport.CityMedicarePayCost = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[12].ToString()); //市医保统筹金额 dayReport.CityMedicarePubCost = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[13].ToString()); //省医保帐户支付金额 dayReport.ProvinceMedicarePayCost = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[14].ToString()); //省医保统筹金额 dayReport.ProvinceMedicarePubCost = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[15].ToString()); //库存金额(上缴金额) dayReport.TurnInCash = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[16].ToString()); //预交金发票张数 dayReport.PrepayInvCount = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[17].ToString()); //结算发票张数 dayReport.BalanceInvCount = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[18].ToString()); //作废预交金发票号码 dayReport.PrepayWasteInvNO = this.Reader[19].ToString(); //作废结算发票号码 dayReport.BalanceWasteInvNO = this.Reader[20].ToString(); //作废预交金发票张数 dayReport.PrepayWasteInvCount = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[21].ToString()); //作废结算发票张数 dayReport.BalanceWasteInvCount = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[22].ToString()); //预交金发票区间 dayReport.PrepayInvZone = this.Reader[23].ToString(); //结算发票区间 dayReport.BalanceInvZone = this.Reader[24].ToString(); //收费员科室 dayReport.Oper.Dept.ID = this.Reader[25].ToString(); dayReport.BalanceCost = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[26].ToString()); alDayReport.Add(dayReport); }//循环结束 this.Reader.Close(); return(alDayReport); } catch (Exception e) { this.Err = e.Message; this.WriteErr(); if (!this.Reader.IsClosed) { this.Reader.Close(); } return(null); } }
private void BindingSource() { // if (!String.IsNullOrEmpty(curDayReport.EMallShopID) && curDayReport.EMallShopID == CommonGlobalCache.CurrentShopID) //{ this.skinToolTip1.SetToolTip(this.skinLabel_QuantityOfSale, "线下" + curDayReport.QuantityOfSale + "件,线上" + curDayReport.EmQuantityOfSale + "件"); skinLabel_QuantityOfSale.ForeColor = Color.Blue; this.skinToolTip1.SetToolTip(this.skinLabel_QuantityOfRefund, "线下" + (curDayReport.QuantityOfRefund * -1) + "件,线上" + (curDayReport.EmQuantityOfRefund * -1) + "件"); skinLabel_QuantityOfRefund.ForeColor = Color.Blue; // } // this.skinLabel_State.Text = "状态:" + (this.curDayReport.ManualConfirm ? "已结存" : "未结存"); this.skinLabel_shop.Text = "店铺:" + CommonGlobalCache.GetShopName(curDayReport.ShopID); this.skinLabel_Operator.Text = "操作人:" + CommonGlobalCache.GetUserName(curDayReport.AdminUserID); this.skinLabelDate.Text = "日期:" + curDayReport.ReportDate; this.skinLabel_SalesCount.Text = ValidateUtil.ZeroToEmpty(curDayReport.SalesCount.ToString(), reportShowZero); this.skinLabel_RefundCount.Text = ValidateUtil.ZeroToEmpty(curDayReport.RefundCount.ToString(), reportShowZero); skinLabel_NotConfirmedCount.Text = "未确认单据:" + ValidateUtil.ZeroToEmpty(curDayReport.NotConfirmedCount.ToString(), reportShowZero); this.richTextBox_Remark.Text = curDayReport.Remarks; ///库存 this.skinLabel_PreTotalCount.Text = ValidateUtil.ZeroToEmpty(curDayReport.PreTotalCount.ToString(), reportShowZero); skinLabel_PurchaseInCount.Text = ValidateUtil.ZeroToEmpty(curDayReport.PurchaseInCount.ToString(), reportShowZero); skinLabel_AllocateInCount.Text = ValidateUtil.ZeroToEmpty(curDayReport.AllocateInCount.ToString(), reportShowZero); skinLabel_CheckStoreLostCount.Text = ValidateUtil.ZeroToEmpty(curDayReport.CheckStoreLostCount.ToString(), reportShowZero); skinLabel_CheckStoreWinCount.Text = ValidateUtil.ZeroToEmpty(curDayReport.CheckStoreWinCount.ToString(), reportShowZero); skinLabel_AllocateOutCount.Text = ValidateUtil.ZeroToEmpty(curDayReport.AllocateOutCount.ToString(), reportShowZero); skinLabel_returnCount.Text = ValidateUtil.ZeroToEmpty(curDayReport.ReturnCount.ToString(), reportShowZero); // skinLabel_DiffAdjustCount.Text = ValidateUtil.ZeroToEmpty(curDayReport.DiffAdjustCount.ToString(), reportShowZero); skinLabel_ScrapOutCount.Text = ValidateUtil.ZeroToEmpty(curDayReport.ScrapOutCount.ToString(), reportShowZero); skinLabel_QuantityOfSale.Text = (curDayReport.QuantityOfSale + curDayReport.EmQuantityOfSale).ToString(); skinLabel_TotalCount.Text = ValidateUtil.ZeroToEmpty(curDayReport.TotalCount.ToString(), reportShowZero); skinLabel_PreCash.Text = ValidateUtil.ZeroToEmpty(curDayReport.PreCash.ToString(), reportShowZero); skinLabel_CashCurrent.Text = ValidateUtil.ZeroToEmpty(curDayReport.CashCurrent.ToString(), reportShowZero); skinLabel_CashDeliverUp.Text = ValidateUtil.ZeroToEmpty(Math.Abs(curDayReport.CashDeliverUp).ToString(), reportShowZero); skinLabel_CashOut.Text = ValidateUtil.ZeroToEmpty(Math.Abs(curDayReport.CashOut).ToString(), reportShowZero); skinLabel_RechargeInCash.Text = ValidateUtil.ZeroToEmpty(curDayReport.RechargeInCash.ToString(), reportShowZero); skinLabel_SalesInCash.Text = ValidateUtil.ZeroToEmpty(curDayReport.SalesInCash.ToString(), reportShowZero); skinLabel_QuantityOfRefund.Text = ValidateUtil.ZeroToEmpty((curDayReport.QuantityOfRefund * -1 + curDayReport.EmQuantityOfRefund * -1).ToString(), reportShowZero); skinLabel_RefundInCash.Text = ValidateUtil.ZeroToEmpty((curDayReport.RefundInCash * -1).ToString(), reportShowZero); // skinLabel_Revenue.Text = curDayReport.Revenue.ToString(); skinLabel_CashInOthers.Text = ValidateUtil.ZeroToEmpty(curDayReport.CashInOthers.ToString(), reportShowZero); skinLabelPdDeliver.Text = ValidateUtil.ZeroToEmpty(curDayReport.PfDeliveryCount.ToString(), reportShowZero); skinLabelPfReturn.Text = ValidateUtil.ZeroToEmpty(curDayReport.PfReturnCount.ToString(), reportShowZero); //if (CommonGlobalUtil.IsPfEnable() && curDayReport.ShopID == CommonGlobalCache.GeneralStoreShopID) //{ // panelPf.Visible = true; //} //else { // panelPf.Visible = false; //} DayReport[] reportDetails = new DayReport[] { curDayReport }; // this.dataGridView1.DataSource = reportDetails; // this.dataGridView2.DataSource = reportDetails; List <DayReport> reports = new List <DayReport>(); // reports.Add(curDayReport); //充值 DayReport cz = new DayReport(); cz.SalesInAlipay = curDayReport.RechargeInAlipay; cz.SalesInBankCard = curDayReport.RechargeInBankCard; cz.SalesInCash = curDayReport.RechargeInCash; cz.SalesInWeiXin = curDayReport.RechargeInWeiXin; cz.TotalRecharge = curDayReport.TotalRecharge; cz.SalesInGiftTicket = curDayReport.SalesInGiftTicket; cz.SalesInMoneyOther = curDayReport.SalesInMoneyOther; reports.Add(cz); //收入 DayReport sr = new DayReport(); sr.SalesInAlipay = curDayReport.SalesInAlipay; sr.SalesInBankCard = curDayReport.SalesInBankCard; sr.SalesInCash = curDayReport.SalesInCash; sr.SalesInWeiXin = curDayReport.SalesInWeiXin; sr.SalesInVipBalance = curDayReport.SalesInVipBalance; sr.SalesInVipIntegration = curDayReport.SalesInVipIntegration; sr.TotalRecharge = curDayReport.SalesTotalMoney; sr.SalesInGiftTicket = curDayReport.SalesInGiftTicket; sr.SalesInMoneyOther = curDayReport.SalesInMoneyOther; reports.Add(sr); //退货 DayReport refund = new DayReport(); refund.SalesInCash = curDayReport.RefundInCash; refund.SalesInVipBalance = curDayReport.RefundInVipBalance; refund.SalesInVipIntegration = curDayReport.RefundInVipIntegration; refund.TotalRecharge = curDayReport.RefundTotalMoney; refund.SalesInBankCard = curDayReport.RefundInBankCard; refund.SalesInWeiXin = curDayReport.RefundInWeiXin; refund.SalesInAlipay = curDayReport.RefundInAlipay; refund.SalesInMoneyOther = curDayReport.SalesInMoneyOther; reports.Add(refund); //小计 DayReport sum = new DayReport(); sum.SalesInCash = sr.SalesInCash + cz.SalesInCash + refund.SalesInCash; sum.SalesInAlipay = sr.SalesInAlipay + cz.SalesInAlipay + refund.SalesInAlipay; sum.SalesInBankCard = sr.SalesInBankCard + cz.SalesInBankCard + refund.SalesInBankCard; sum.SalesInWeiXin = sr.SalesInWeiXin + cz.SalesInWeiXin + refund.SalesInWeiXin; sum.SalesInVipBalance = sr.SalesInVipBalance + cz.SalesInVipBalance + refund.SalesInVipBalance; sum.SalesInVipIntegration = sr.SalesInVipIntegration + cz.SalesInVipIntegration + refund.SalesInVipIntegration; sum.TotalRecharge = sr.TotalRecharge + cz.TotalRecharge + refund.TotalRecharge; sum.SalesInGiftTicket = sr.SalesInGiftTicket; refund.SalesInMoneyOther = sr.SalesInMoneyOther + cz.SalesInMoneyOther + refund.SalesInMoneyOther; reports.Add(sum); yysr = sr; czmx = cz; total = sum; this.dataGridView2.DataSource = reports; skinLabel_Donate4Recharge.Text = "赠送金额:" + curDayReport.Donate4Recharge; }