protected void BindSum(EyouSoft.Model.StatisticStructure.QueryAccountAgeStatistic model) { Decimal total = 0; //总收入 Decimal ys = 0; //应收 Decimal ws = 0; //未收 //BLL声明 EyouSoft.BLL.StatisticStructure.StatAllIncome IncomeBLL = new EyouSoft.BLL.StatisticStructure.StatAllIncome(SiteUserInfo); //获取总计数据 IncomeBLL.GetAllTotalAmount(model, ref total, ref ys); if (total != 0) { res = true; } //计算未收金额 ws = total - ys; //总金额赋值 this.sum_total.Text = "¥" + EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(total.ToString()).ToString("0.00")); //应收金额赋值 this.sum_ys.Text = "¥" + EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(ys.ToString()).ToString("0.00")); //未收金额赋值_已结清 this.sum_ws_account.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(ws.ToString()).ToString("0.00")); //未收金额赋值_所有 this.sum_ws_noaccount.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(ws.ToString()).ToString("0.00")); //设置字体颜色 this.sum_total.ForeColor = Color.Red; //设置字体颜色 this.sum_ys.ForeColor = Color.Red; }
private void InitIncDepartAreaStaticlist() { #region 获取参数 PageIndex = Utils.GetInt(Request.QueryString["Page"], 1); TourType = Utils.GetQueryStringValue("TourType"); RouteArea = Utils.GetQueryStringValue("RouteArea"); Salser = Utils.GetQueryStringValue("Salser"); SalserID = Utils.GetQueryStringValue("SalserId"); LeaveTourStarDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("LeaveTourStartDate")); LeaveTourEndDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("LeaveTourEndDate")); CompanyName = Utils.GetQueryStringValue("CompanyName"); isAccount = Utils.GetQueryStringValue("IsAccount"); #endregion //私有变量 EyouSoft.BLL.StatisticStructure.StatAllIncome IncomeBLL = new EyouSoft.BLL.StatisticStructure.StatAllIncome(SiteUserInfo); #region 实体赋值 EyouSoft.Model.StatisticStructure.QueryAccountAgeStatistic model = new EyouSoft.Model.StatisticStructure.QueryAccountAgeStatistic(); model.CompanyId = this.SiteUserInfo.CompanyID; model.SaleIds = Utils.GetIntArray(SalserID, ","); if (TourType != "" && TourType != "-1") { model.TourType = (EyouSoft.Model.EnumType.TourStructure.TourType) int.Parse(TourType); } if (RouteArea != "" && RouteArea != "0") { model.AreaId = int.Parse(RouteArea); } //设置查询model的ComputeOrderType值 EyouSoft.Model.EnumType.CompanyStructure.ComputeOrderType?computerOrderType = new EyouSoft.BLL.CompanyStructure.CompanySetting().GetComputeOrderType(SiteUserInfo.CompanyID); if (computerOrderType.HasValue) { model.ComputeOrderType = computerOrderType.Value; } model.LeaveDateStart = LeaveTourStarDate; model.LeaveDateEnd = LeaveTourEndDate; model.BuyCompanyName = CompanyName; if (isAccount == "-1") { model.IsAccount = null; } else if (isAccount == "0") { model.IsAccount = true; } else if (isAccount == "1") { model.IsAccount = false; } BindSum(model); #endregion #region 表单初始化 if (TourType != "") { this.TourTypeList1.TourType = int.Parse(TourType); } if (RouteArea != "") { this.RouteAreaList1.RouteAreaId = int.Parse(RouteArea); } this.SelectSalser.OperName = Salser; this.SelectSalser.OperId = SalserID; this.txtLeaveTourStarTime.Value = LeaveTourStarDate.HasValue ? LeaveTourStarDate.Value.ToString("yyyy-MM-dd") : ""; this.txtLeaveTourEndTime.Value = LeaveTourEndDate.HasValue ? LeaveTourEndDate.Value.ToString("yyyy-MM-dd") : ""; this.txt_com.Value = CompanyName; if (isAccount != "") { this.drpIsAccount.SelectedValue = isAccount; } #endregion //调用底层方法 IncomeDepartList = IncomeBLL.GetList(PageSize, PageIndex, ref RecordCount, model); //如果为统计图异步请求时,不执行列表绑定 if (Utils.GetInt(Request.QueryString["IsCartogram"], 0) == 1) { return; } #region 列表绑定 if (IncomeDepartList != null && IncomeDepartList.Count != 0) { this.tbl_ExportPage.Visible = true; this.crp_IncDepartStaList.DataSource = IncomeDepartList; this.crp_IncDepartStaList.DataBind(); BindPage();//绑定分页 } else { this.tbl_ExportPage.Visible = false; this.crp_IncDepartStaList.EmptyText = "<tr bgcolor='#e3f1fc'><td colspan='4' id=\"EmptyData\" height='50px' align='center'>暂时没有数据!</td></tr>"; } #endregion }