コード例 #1
0
ファイル: TeamShow.aspx.cs プロジェクト: windygu/bbl
        /// <summary>
        /// 初使化列表
        /// </summary>
        private void bind()
        {
            EyouSoft.BLL.TourStructure.Tour TourBll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo, true);
            //查询实体附值
            qesModel.AreaId         = Utils.GetInt(Utils.GetQueryStringValue("areaid"), 0);
            qesModel.CheckDateEnd   = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("cetime"));
            qesModel.CheckDateStart = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("cstime"));
            qesModel.CompanyId      = CurrentUserCompanyID;
            qesModel.DepartIds      = Utils.GetIntArray(Utils.GetQueryStringValue("depid"), ",");
            qesModel.LeaveDateEnd   = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("letime"));
            qesModel.LeaveDateStart = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("lstime"));
            qesModel.OrderIndex     = 0;
            qesModel.SaleIds        = Utils.GetIntArray(Utils.GetQueryStringValue("saleman"), ",");
            qesModel.CurrYear       = Utils.GetInt(Utils.GetQueryStringValue("year"));
            qesModel.CurrMonth      = Utils.GetInt(Utils.GetQueryStringValue("month"));
            int type = Utils.GetInt(Utils.GetQueryStringValue("type"), -1);

            if (type > -1)
            {
                qesModel.TourType = (EyouSoft.Model.EnumType.TourStructure.TourType)type;
            }
            int atype = Utils.GetInt(Utils.GetQueryStringValue("atype"), -1);

            if (atype == 2)
            {
                qesModel.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.单项服务;
            }

            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
            IList <EyouSoft.Model.TourStructure.LBLYTJTours> list = null;

            list = TourBll.GetToursLYTJ(this.SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, qesModel);
            len  = list == null ? 0 : list.Count;
            this.rptList.DataSource = list;
            this.rptList.DataBind();
            BindPage();
        }
コード例 #2
0
        private void IntiTourPerList()
        {
            EyouSoft.BLL.TourStructure.Tour TourBll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            //查询实体
            //默认获取当年的数据
            DateTime?CurrStartTime = new DateTime(DateTime.Now.Year, 1, 1);
            DateTime?CurrEndTime   = new DateTime(DateTime.Now.Year, 12, 31);

            EyouSoft.Model.StatisticStructure.QueryEarningsStatistic model = new EyouSoft.Model.StatisticStructure.QueryEarningsStatistic();
            PageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
            TourType  = Utils.GetQueryStringValue("TourType");
            if (Utils.GetQueryStringValue("AreaId") == "0")
            {
                TourType = "2";
            }
            if (Request.QueryString["IsByTime"] != null && Request.QueryString["IsByTime"] == "1")
            {
                LeaveTourStartDate = Utils.GetDateTimeNullable(Request.QueryString["LeaveTourStartDate"], CurrStartTime);
                LeaveTourEndDate   = Utils.GetDateTimeNullable(Request.QueryString["LeaveTourEndDate"], CurrEndTime);
            }
            else
            {
                LeaveTourStartDate = Utils.GetDateTimeNullable(Request.QueryString["LeaveStartDate"]);
                LeaveTourEndDate   = Utils.GetDateTimeNullable(Request.QueryString["LeaveEndDate"]);
            }

            CheckStartDate = Utils.GetDateTimeNullable(Request.QueryString["CheckStartTime"]);
            CheckEndDate   = Utils.GetDateTimeNullable(Request.QueryString["CheckEndTime"]);
            AreaId         = Utils.GetInt(Utils.GetQueryStringValue("AreaId"), 0);
            DepartId       = Utils.GetQueryStringValue("DepartId");
            Year           = Utils.GetInt(Request.QueryString["CuYear"], 0); //年份
            Month          = Utils.GetInt(Request.QueryString["CuMoth"], 0); //月份

            if (TourType != "" && int.Parse(TourType) > 0)
            {
                model.TourType = (EyouSoft.Model.EnumType.TourStructure.TourType) int.Parse(TourType);
            }
            model.OrderIndex     = 0;
            model.LeaveDateStart = LeaveTourStartDate;
            model.LeaveDateEnd   = LeaveTourEndDate;
            model.CheckDateStart = CheckStartDate;
            model.CheckDateEnd   = CheckEndDate;
            model.AreaId         = AreaId;
            model.CurrYear       = Year;
            model.CurrMonth      = Month;
            model.DepartIds      = Utils.GetIntArray(DepartId, ",");
            list = TourBll.GetToursLYTJ(this.SiteUserInfo.CompanyID, PageSize, PageIndex, ref RecordCount, model);
            if (list != null && list.Count > 0)
            {
                this.crp_GetTourDetailList.DataSource = list;
                this.crp_GetTourDetailList.DataBind();
                BindPage();
                this.tbl_ExportPage.Visible = true;
            }
            else
            {
                this.crp_GetTourDetailList.EmptyText = "<tr><td colspan='8' bgcolor='#e3f1fc' height='50px' align='center'>暂时没有数据!</td></tr>";
                this.tbl_ExportPage.Visible          = false;
            }
            //释放资源
            list    = null;
            model   = null;
            TourBll = null;
        }