/// <summary> /// 初始化 /// </summary> private void DataInit() { //获取分页参数并强转 pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); #region 搜索实体 //搜索实体 MWorkPlanSearch modelsearch = new MWorkPlanSearch(); //标题 string txtTitle = Utils.GetQueryStringValue("txtTitle"); if (!string.IsNullOrEmpty(txtTitle)) { modelsearch.Title = txtTitle; } //计划人 string txtName = Utils.GetQueryStringValue("txtName"); if (!string.IsNullOrEmpty(txtName)) { modelsearch.OperatorName = txtName; } //时间 DateTime?txtBegin = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtBegin")); modelsearch.IssueTimeS = txtBegin; //结束时间 DateTime?txtEnd = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtEnd")); modelsearch.IssueTimeE = txtEnd; #endregion //实例化业务层 BIndividual bllBIndividual = new BIndividual(); IList <MWorkPlan> list = bllBIndividual.GetWorkPlanLst(SiteUserInfo.CompanyId, pageSize, pageIndex, ref recordCount, modelsearch); if (list.Count > 0 && list != null) { this.rptList.DataSource = list; this.rptList.DataBind(); //绑定分页 BindPage(); } else { this.lblMsg.Text = "没有相关数据!"; this.ExporPageInfoSelect1.Visible = false; } }