Example #1
0
        private void InitEmpProfitStaticlist()
        {
            #region 获取参数
            DepartName         = Utils.GetQueryStringValue("DepartName");
            DepartId           = Utils.GetQueryStringValue("DepartId");
            PageIndex          = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
            Accounter          = Utils.GetQueryStringValue("Accounter");
            AccounterId        = Utils.GetQueryStringValue("AccounterId");
            LeaveStartTourDate = Utils.GetDateTimeNullable(Request.QueryString["LeaveTourStartDate"]);
            LeaveEndTourDate   = Utils.GetDateTimeNullable(Request.QueryString["LeaveTourEndDate"]);
            SignBillStartDate  = Utils.GetDateTimeNullable(Request.QueryString["SignBillStartDate"]);
            SignBillStartDate  = Utils.GetDateTimeNullable(Request.QueryString["SignBillEndDate"]);
            Salser             = Utils.GetQueryStringValue("Salser");
            SalserId           = Utils.GetQueryStringValue("SalserId");
            #endregion

            #region 实体赋值
            EyouSoft.Model.StatisticStructure.QueryPersonnelStatistic model = new EyouSoft.Model.StatisticStructure.QueryPersonnelStatistic();
            model.CompanyId      = SiteUserInfo.CompanyID;
            model.LeaveDateStart = LeaveStartTourDate;
            model.LeaveDateEnd   = LeaveEndTourDate;
            model.CheckDateStart = SignBillStartDate;
            model.CheckDateEnd   = SignBillEndDate;
            model.DepartIds      = Utils.GetIntArray(DepartId, ",");
            //设置查询model的ComputeOrderType值
            EyouSoft.Model.EnumType.CompanyStructure.ComputeOrderType?computerOrderType = new EyouSoft.BLL.CompanyStructure.CompanySetting().GetComputeOrderType(SiteUserInfo.CompanyID);
            if (computerOrderType.HasValue)
            {
                model.ComputeOrderType = computerOrderType.Value;
            }
            if (AccounterId != "")
            {
                model.LogisticsIds = Utils.GetIntArray(AccounterId, ",");
            }
            if (SalserId != "")
            {
                model.SaleIds = Utils.GetIntArray(SalserId, ",");
            }
            model.OrderIndex = 1;
            #endregion

            #region 初始化表单
            this.txtLeaveTourStartDate.Value          = LeaveStartTourDate.HasValue ? LeaveStartTourDate.Value.ToString("yyyy-MM-dd") : "";
            this.txtLeaveTourEndDate.Value            = LeaveEndTourDate.HasValue ? LeaveEndTourDate.Value.ToString("yyyy-MM-dd") : "";
            this.txtSignBillStartDate.Value           = SignBillStartDate.HasValue ? SignBillStartDate.Value.ToString("yyyy-MM-dd") : "";
            this.txtSignBillEndDate.Value             = SignBillEndDate.HasValue ? SignBillEndDate.Value.ToString("yyyy-MM-dd") : "";
            this.UCSelectDepartment.GetDepartmentName = DepartName;
            this.UCSelectDepartment.GetDepartId       = DepartId;
            SelectSalser.OperName    = Salser;
            SelectSalser.OperId      = SalserId;
            SelectAccounter.OperName = Accounter;
            SelectAccounter.OperId   = AccounterId;
            #endregion

            EyouSoft.BLL.StatisticStructure.PersonnelStatistic EmployeeAchiveBLL = new EyouSoft.BLL.StatisticStructure.PersonnelStatistic(this.SiteUserInfo);
            //底层方法
            if (Request.QueryString["isAll"] != null && Utils.InputText(Request.QueryString["isAll"]) == "1")
            {
                PageSize = int.MaxValue - 1;
            }
            EmpProfitStaList = EyouSoft.Common.Function.SelfExportPage.GetList <EyouSoft.Model.StatisticStructure.PersonnelProfitStatistic>(PageIndex, PageSize, out RecordCount, EmployeeAchiveBLL.GetPersonnelProfitStatistic(model));
            if (EmpProfitStaList != null && EmpProfitStaList.Count != 0)
            {
                this.tbl_ExPageEmpProfit.Visible  = true;
                this.crp_EmpProfitList.DataSource = EmpProfitStaList;
                this.crp_EmpProfitList.DataBind();
                BindPage();//绑定分页
            }
            else
            {
                this.tbl_ExPageEmpProfit.Visible = false;
                this.crp_EmpProfitList.EmptyText = "<tr bgcolor='#e3f1fc'><td colspan='7' height='50px' id=\"EmptyData\" align='center'>暂时没有数据!</td></tr>";
            }
            model             = null;
            EmployeeAchiveBLL = null;
        }
Example #2
0
        private void InitEmpIncomeStaticlist()
        {
            EyouSoft.BLL.StatisticStructure.PersonnelStatistic EmployeeAchiveBLL = new EyouSoft.BLL.StatisticStructure.PersonnelStatistic(this.SiteUserInfo);
            //获取当月开始时间 本月的第一天
            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);
            Accounter          = Utils.GetQueryStringValue("Accounter");
            AccounterId        = Utils.GetQueryStringValue("AccounterId");
            LeaveTourStartDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("LeaveTourStartDate")) == null ? CurrStartTime : Utils.GetDateTimeNullable(Utils.GetQueryStringValue("LeaveTourStartDate"));
            LeaveTourEndDate   = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("LeaveTourEndDate")) == null ? CurrEndTime : Utils.GetDateTimeNullable(Utils.GetQueryStringValue("LeaveTourEndDate"));
            SignBillStartDate  = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("SignBillStartDate")) == null ? CurrStartTime : Utils.GetDateTimeNullable(Utils.GetQueryStringValue(("SignBillStartDate")));
            SignBillEndDate    = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("SignBillEndDate")) == null ? CurrEndTime : Utils.GetDateTimeNullable(Utils.GetQueryStringValue("SignBillEndDate"));
            Salser             = Utils.GetQueryStringValue("Salser");
            DepartName         = Utils.GetQueryStringValue("DepartName");
            DepartId           = Utils.GetQueryStringValue("DepartId");
            RoyaltyRatio       = Utils.GetQueryStringValue("RoyaltyRatio");
            SalserId           = Utils.GetQueryStringValue("SalserId");
            EyouSoft.Model.StatisticStructure.QueryPersonnelStatistic model = new EyouSoft.Model.StatisticStructure.QueryPersonnelStatistic();
            model.LeaveDateStart = LeaveTourStartDate;
            model.LeaveDateEnd   = LeaveTourEndDate;
            model.CheckDateStart = SignBillStartDate;
            model.CheckDateEnd   = SignBillEndDate;
            model.CompanyId      = this.CurrentUserCompanyID;
            model.DepartIds      = Utils.GetIntArray(DepartId, ",");
            //设置查询model的ComputeOrderType值
            EyouSoft.Model.EnumType.CompanyStructure.ComputeOrderType?computerOrderType = new EyouSoft.BLL.CompanyStructure.CompanySetting().GetComputeOrderType(SiteUserInfo.CompanyID);
            if (computerOrderType.HasValue)
            {
                model.ComputeOrderType = computerOrderType.Value;
            }
            if (AccounterId != "")
            {
                model.LogisticsIds = Utils.GetIntArray(AccounterId, ",");
            }
            if (SalserId != "")
            {
                model.SaleIds = Utils.GetIntArray(SalserId, ",");
            }
            model.OrderIndex = 0;
            #region 初始化文本框
            this.txtLeaveTourStartDate.Value          = LeaveTourStartDate.HasValue ? LeaveTourStartDate.Value.ToString("yyyy-MM-dd") : "";
            this.txtLeaveTourEndDate.Value            = LeaveTourEndDate.HasValue ? LeaveTourEndDate.Value.ToString("yyyy-MM-dd") : "";
            this.txtSignBillStartDate.Value           = SignBillStartDate.HasValue ? SignBillStartDate.Value.ToString("yyyy-MM-dd") : "";
            this.txtSignBillEndDate.Value             = SignBillEndDate.HasValue ? SignBillEndDate.Value.ToString("yyyy-MM-dd") : "";
            this.txtRoyaltyRatio.Value                = RoyaltyRatio;
            this.UCSelectDepartment.GetDepartmentName = DepartName;
            this.UCSelectDepartment.GetDepartId       = DepartId;
            SelectSalser.OperName    = Salser;
            SelectSalser.OperId      = SalserId;
            SelectAccounter.OperName = Accounter;
            SelectAccounter.OperId   = AccounterId;
            #endregion
            if (Request.QueryString["isExport"] != null && Utils.InputText(Request.QueryString["isExport"]) == "1")
            {
                PageSize = int.MaxValue - 1;
            }

            EmpIncomList = EyouSoft.Common.Function.SelfExportPage.GetList <EyouSoft.Model.StatisticStructure.PersonnelIncomeStatistic>(PageIndex, PageSize, out RecordCount, EmployeeAchiveBLL.GetPersonnelIncomeStatistic(model));
            if (EmpIncomList != null && EmpIncomList.Count != 0)
            {
                this.tbl_ExPageEmp.Visible        = true;
                this.crp_EmpIncomeList.DataSource = EmpIncomList;
                this.crp_EmpIncomeList.DataBind();
                BindPage();//绑定分页
            }
            else
            {
                this.tbl_ExPageEmp.Visible       = false;
                this.crp_EmpIncomeList.EmptyText = "<tr bgcolor=\"#e3f1fc\"><td colspan='6' id=\"EmptyData\" align='center'>暂时没有数据!</td></tr>";
            }
            //释放资源
            EmployeeAchiveBLL = null;
            model             = null;
        }