/// <summary> /// 初始化列表数据 /// </summary> private void InitData() { _pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); SumMoney = new Model.StatStructure.MReconciliationTongJi(); int sunCompanyId = Utils.GetInt(Utils.GetQueryStringValue("SunCompanyId")); if (sunCompanyId <= 0 || !CheckGrant(Model.EnumType.PrivsStructure.Privs.统计分析_收入对账单_查看全部)) { sunCompanyId = UtilsCommons.GetFirstDepartId(SiteUserInfo.CompanyId, SiteUserInfo.DeptId); } var list = new BLL.StatStructure.BStatistics().GetReconciliationRestAmountLst( SiteUserInfo.CompanyId, _pageSize, _pageIndex, ref _recordCount, sunCompanyId, this.GetSearchModel(), ref SumMoney); rptRestAmount.DataSource = list; rptRestAmount.DataBind(); //绑定分页 BindPage(); }
/// <summary> /// 导出Excel /// </summary> private void ListToExcel() { int toXlsRecordCount = UtilsCommons.GetToXlsRecordCount(); if (toXlsRecordCount < 1) { ResponseToXls(string.Empty); } var s = new StringBuilder(); SumMoney = new Model.StatStructure.MReconciliationTongJi(); s.Append("部门\t销售员\t应收款\t已收款\t未收\n"); int sunCompanyId = Utils.GetInt(Utils.GetQueryStringValue("SunCompan")); if (sunCompanyId <= 0 || !CheckGrant(Model.EnumType.PrivsStructure.Privs.统计分析_收入对账单_查看全部)) { sunCompanyId = UtilsCommons.GetFirstDepartId(SiteUserInfo.CompanyId, SiteUserInfo.DeptId); } var list = new BLL.StatStructure.BStatistics().GetReconciliationLst( SiteUserInfo.CompanyId, toXlsRecordCount, 1, ref _recordCount, sunCompanyId, this.GetSearchModel(), ref SumMoney); if (list != null && list.Any()) { foreach (var t in list) { s.AppendFormat( "{0}\t{1}\t{2}\t{3}\t{4}\n", t.DeptName, t.SellerName, UtilsCommons.GetMoneyString(t.TotalAmount, ProviderToMoney), UtilsCommons.GetMoneyString(t.InAmount, ProviderToMoney), UtilsCommons.GetMoneyString(t.RestAmount, ProviderToMoney)); } s.AppendFormat( "{0}\t{1}\t{2}\t{3}\t{4}\n", " ", "合计:", UtilsCommons.GetMoneyString(SumMoney.TotalAmount, ProviderToMoney), UtilsCommons.GetMoneyString(SumMoney.InAmount, ProviderToMoney), UtilsCommons.GetMoneyString(SumMoney.RestAmount, ProviderToMoney)); } ResponseToXls(s.ToString()); }
/// <summary> /// 初始化列表数据 /// </summary> private void InitData() { _pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); SumMoney = new Model.StatStructure.MReconciliationTongJi(); var list = new BLL.StatStructure.BStatistics().GetReconciliationLst( SiteUserInfo.CompanyId, _pageSize, _pageIndex, ref _recordCount, FenGongSiId, this.GetSearchModel(), ref SumMoney); rptIncome.DataSource = list; rptIncome.DataBind(); //绑定分页 BindPage(); }
/// <summary> /// 导出Excel /// </summary> private void ListToExcel() { int toXlsRecordCount = UtilsCommons.GetToXlsRecordCount(); if (toXlsRecordCount < 1) { ResponseToXls(string.Empty); } var s = new StringBuilder(); SumMoney = new Model.StatStructure.MReconciliationTongJi(); int sunCompanyId = Utils.GetInt(Utils.GetQueryStringValue("SunCompanyId")); if (sunCompanyId <= 0 || !CheckGrant(Model.EnumType.PrivsStructure.Privs.统计分析_收入对账单_查看全部)) { sunCompanyId = UtilsCommons.GetFirstDepartId(SiteUserInfo.CompanyId, SiteUserInfo.DeptId); } s.Append("序号\t订单号\t线路名称\t出团时间\t客户单位\t人数\t应收款\t已收款\t未收款\n"); var list = new BLL.StatStructure.BStatistics().GetReconciliationRestAmountLst( SiteUserInfo.CompanyId, toXlsRecordCount, 1, ref _recordCount, sunCompanyId, this.GetSearchModel(), ref SumMoney); if (list != null && list.Any()) { int index = 1; foreach (var t in list) { s.AppendFormat( "{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\n", index, t.OrderCode, t.RouteName, UtilsCommons.GetDateString(t.LDate, ProviderToDate), t.BuyCompanyName, t.PeopleNum, UtilsCommons.GetMoneyString(t.TotalAmount, ProviderToMoney), UtilsCommons.GetMoneyString(t.InAmount, ProviderToMoney), UtilsCommons.GetMoneyString(t.RestAmount, ProviderToMoney)); index++; } s.AppendFormat( "{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\n", " ", " ", " ", " ", " ", "合计:", UtilsCommons.GetMoneyString(SumMoney.TotalAmount, ProviderToMoney), UtilsCommons.GetMoneyString(SumMoney.InAmount, ProviderToMoney), UtilsCommons.GetMoneyString(SumMoney.RestAmount, ProviderToMoney)); } ResponseToXls(s.ToString()); }