private void BindPerDepartmentStaticList() { EyouSoft.BLL.StatisticStructure.InayatStatistic InayaStaBLL = new EyouSoft.BLL.StatisticStructure.InayatStatistic(this.SiteUserInfo); #region URL参数检测、查询实体赋值 ////获取当月开始时间 本月的第一天 //DateTime? CurrStartTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); ////当月结束时间 本月的最后一天 //DateTime? CurrEndTime = CurrStartTime.Value.AddMonths(1).AddDays(-1); PageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1); Salser = Utils.GetQueryStringValue("Salser"); SalserID = Utils.GetQueryStringValue("SalserId"); OrderStartTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("OrderStartTime")); OrderEndTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("OrderEndTime")); RouteAreaId = Utils.GetQueryStringValue("RouteAreaId"); EyouSoft.Model.StatisticStructure.QueryInayatStatistic QueryInayatStaticModel = new EyouSoft.Model.StatisticStructure.QueryInayatStatistic(); //设置查询model的ComputeOrderType值 EyouSoft.Model.EnumType.CompanyStructure.ComputeOrderType?computerOrderType = new EyouSoft.BLL.CompanyStructure.CompanySetting().GetComputeOrderType(SiteUserInfo.CompanyID); if (computerOrderType.HasValue) { QueryInayatStaticModel.ComputeOrderType = computerOrderType.Value; } if (SalserID != "") { QueryInayatStaticModel.SaleIds = Utils.GetIntArray(SalserID, ","); } if (RouteAreaId != "" && RouteAreaId != "0") { QueryInayatStaticModel.AreaId = int.Parse(RouteAreaId); } QueryInayatStaticModel.OrderIndex = 2; QueryInayatStaticModel.CompanyId = CurrentUserCompanyID; #region 出团时间查询 by txb 2011.6.20 QueryInayatStaticModel.LeaveDateStart = OrderStartTime; QueryInayatStaticModel.LeaveDateEnd = OrderEndTime; #endregion QueryInayatStaticModel.TourType = (EyouSoft.Model.EnumType.TourStructure.TourType?)Utils.GetEnumValue(typeof(EyouSoft.Model.EnumType.TourStructure.TourType), Utils.GetQueryStringValue("tourtype"), null); #endregion #region 表单控件初始化 this.txtOrderStarTime.Value = OrderStartTime.HasValue ? OrderStartTime.Value.ToString("yyyy-MM-dd") : ""; this.txtOrderEndTime.Value = OrderEndTime.HasValue ? OrderEndTime.Value.ToString("yyyy-MM-dd") : ""; if (RouteAreaId != "") { this.RouteAreaList1.RouteAreaId = int.Parse(RouteAreaId); } this.SelectSalser.OperName = Salser; this.SelectSalser.OperId = SalserID; #endregion InayaDepartList = InayaStaBLL.GetInayaDepartStatistic(QueryInayatStaticModel); SumAllPeopleNum(InayaDepartList); InayaDepartList = EyouSoft.Common.Function.SelfExportPage.GetList <EyouSoft.Model.StatisticStructure.InayaDepartStatistic>(PageIndex, PageSize, out RecordCount, InayaDepartList); if (Utils.GetInt(Request.QueryString["IsCartogram"], 0) == 1) //统计图异步请求时无须绑定列表 { return; } #region 列表绑定 if (InayaDepartList != null && InayaDepartList.Count != 0) { if (Request.QueryString["isExport"] != null && Utils.InputText(Request.QueryString["isExport"]) == "1") { this.tbl_PageInfo.Visible = false; } else { this.tbl_PageInfo.Visible = true; } this.crp_PerDepartStaList.DataSource = InayaDepartList; this.crp_PerDepartStaList.DataBind(); BindPage();//绑定分页 } else { this.tbl_PageInfo.Visible = false; this.crp_PerDepartStaList.EmptyText = "<tr bgcolor='#e3f1fc'><td height='50px' colspan='4' id=\"EmptyData\" height='50px' align='center'>暂时没有数据!</td></tr>"; } #endregion }
private void InitPerAreaStaticlist() { #region 获取参数 DepartmentName = Utils.GetQueryStringValue("DepartName"); DepartId = Utils.GetQueryStringValue("DepartId"); PageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1); OrderStarTime = Utils.GetDateTimeNullable(Request.QueryString["StartTime"]); OrderEndTime = Utils.GetDateTimeNullable(Request.QueryString["EndTime"]); Salser = Utils.GetQueryStringValue("Salser"); SalserID = Utils.GetQueryStringValue("SalserId"); #endregion #region 查询Model赋值 EyouSoft.BLL.StatisticStructure.InayatStatistic InayaStaBLL = new EyouSoft.BLL.StatisticStructure.InayatStatistic(this.SiteUserInfo); EyouSoft.Model.StatisticStructure.QueryInayatStatistic QueryModel = new EyouSoft.Model.StatisticStructure.QueryInayatStatistic();//查询实体 QueryModel.OrderIndex = 0; #region 出团时间查询 by txb 2011.6.20 QueryModel.LeaveDateStart = OrderStarTime; QueryModel.LeaveDateEnd = OrderEndTime; #endregion QueryModel.CompanyId = this.SiteUserInfo.CompanyID;//当前用户公司ID //设置查询model的ComputeOrderType值 EyouSoft.Model.EnumType.CompanyStructure.ComputeOrderType?computerOrderType = new EyouSoft.BLL.CompanyStructure.CompanySetting().GetComputeOrderType(SiteUserInfo.CompanyID); if (computerOrderType.HasValue) { QueryModel.ComputeOrderType = computerOrderType.Value; } if (SalserID != "") { QueryModel.SaleIds = Utils.GetIntArray(SalserID, ","); } if (DepartId != "") { QueryModel.DepartIds = Utils.GetIntArray(DepartId, ","); } QueryModel.TourType = (EyouSoft.Model.EnumType.TourStructure.TourType?)Utils.GetEnumValue(typeof(EyouSoft.Model.EnumType.TourStructure.TourType), Utils.GetQueryStringValue("tourtype"), null); #endregion #region 初始化表单 this.txtAreaStarTime.Value = OrderStarTime.HasValue ? OrderStarTime.Value.ToString("yyyy-MM-dd") : ""; this.txtAreaEndTime.Value = OrderEndTime.HasValue ? OrderEndTime.Value.ToString("yyyy-MM-dd") : ""; this.UCselectDepart.GetDepartmentName = DepartmentName; this.UCselectDepart.GetDepartId = DepartId; this.selectSals.OperName = Salser; this.selectSals.OperId = SalserID; #endregion #region 获取列表数据 PerAreaStaList = InayaStaBLL.GetInayaAreatStatistic(QueryModel); //计算合计人数 SumAllPeopleNum(PerAreaStaList); PerAreaStaList = EyouSoft.Common.Function.SelfExportPage.GetList <EyouSoft.Model.StatisticStructure.InayaAreatStatistic>(PageIndex, PageSize, out RecordCount, PerAreaStaList); if (Utils.GetInt(Request.QueryString["IsCartogram"], 0) == 1) { return; } if (PerAreaStaList != null && PerAreaStaList.Count != 0) { this.tbl_ExportPage.Visible = true; this.crp_PerAreaStaList.DataSource = PerAreaStaList; this.crp_PerAreaStaList.DataBind(); BindPage();//绑定分页 } else { this.tbl_ExportPage.Visible = false; this.crp_PerAreaStaList.EmptyText = "<tr bgcolor='#e3f1fc'><td id=\"EmptyData\" colspan='5' height='50px' align='center'>暂时没有数据!</td></tr>"; } #endregion #region 释放资源 InayaStaBLL = null; QueryModel = null; #endregion }
private void InitPerTimeStaticlist() { #region URL参数检测、查询实体赋值 EyouSoft.BLL.StatisticStructure.InayatStatistic InayaStaBLL = new EyouSoft.BLL.StatisticStructure.InayatStatistic(this.SiteUserInfo); DepartName = Utils.GetQueryStringValue("DepartName"); //部门名称 DepartId = Utils.GetQueryStringValue("DepartId"); //部门ID PageIndex = Utils.GetInt(Request.QueryString["Page"], 1); RouteAreaId = Utils.GetQueryStringValue("RouteAreaId"); Salser = Utils.GetQueryStringValue("Salser"); SalserID = Utils.GetQueryStringValue("SalserId"); EyouSoft.Model.StatisticStructure.QueryInayatStatistic QueryModel = new EyouSoft.Model.StatisticStructure.QueryInayatStatistic(); QueryModel.CompanyId = CurrentUserCompanyID; QueryModel.OrderIndex = 4; //设置查询model的ComputeOrderType值 EyouSoft.Model.EnumType.CompanyStructure.ComputeOrderType?computerOrderType = new EyouSoft.BLL.CompanyStructure.CompanySetting().GetComputeOrderType(SiteUserInfo.CompanyID); if (computerOrderType.HasValue) { QueryModel.ComputeOrderType = computerOrderType.Value; } if (SalserID != "") { QueryModel.SaleIds = Utils.GetIntArray(SalserID, ","); } if (DepartId != "") { QueryModel.DepartIds = Utils.GetIntArray(DepartId, ","); } if (RouteAreaId != "" && RouteAreaId != "0") { QueryModel.AreaId = int.Parse(RouteAreaId); } QueryModel.TourType = (EyouSoft.Model.EnumType.TourStructure.TourType?)Utils.GetEnumValue(typeof(EyouSoft.Model.EnumType.TourStructure.TourType), Utils.GetQueryStringValue("tourtype"), null); #endregion #region 初始化表单 if (RouteAreaId != "") { this.RouteAreaList1.RouteAreaId = int.Parse(RouteAreaId); } this.UCSelectDepartment1.GetDepartmentName = DepartName; this.UCSelectDepartment1.GetDepartId = DepartId; this.SelectSalser.OperName = Salser; this.SelectSalser.OperId = SalserID; #endregion InayaTimeList = InayaStaBLL.GetInayaTimeStatistic(QueryModel); SumAllPeopleNum(InayaTimeList); InayaTimeList = EyouSoft.Common.Function.SelfExportPage.GetList <EyouSoft.Model.StatisticStructure.InayaTimeStatistic>(PageIndex, PageSize, out RecordCount, InayaTimeList); if (Utils.GetInt(Request.QueryString["IsCartogram"], 0) == 1) //异步请求统计图时不执行列表绑定 { return; } #region 列表绑定 if (InayaTimeList != null && InayaTimeList.Count != 0) { this.tblExporPageSelect.Visible = true; this.crp_PerTimeStaList.DataSource = InayaTimeList; this.crp_PerTimeStaList.DataBind(); BindPage();//绑定分页 } else { this.tblExporPageSelect.Visible = false; this.crp_PerTimeStaList.EmptyText = "<tr><td height='50px' bgColor='#e3f1fc' colspan='3' id=\"EmptyData\" height='50px' align='center'>暂时没有数据!</td></tr>"; } #endregion QueryModel = null; InayaStaBLL = null; }