private void ExamPaperBindData() { Entities.QueryExamPaper query = new Entities.QueryExamPaper(); #region 条件 int intVal = 0; DateTime dateVal = new DateTime(); if (PaperName != string.Empty) { query.Name = PaperName; } if (Catage != string.Empty && int.TryParse(Catage, out intVal)) { query.ECID = intVal; } if (Catage != "") { query.ECIDStr = Catage; } if (State != string.Empty) { query.Status = State; } if (CreateUser != string.Empty && CreateUser != "-1") { query.CreaetUserID = CreateUser; } if (!string.IsNullOrEmpty(BGID)) { query.BGID = int.Parse(BGID); } #endregion DataTable dt = BLL.ExamPaper.Instance.GetExamPaper(query, "CreateTime DESC", BLL.PageCommon.Instance.PageIndex, pageSize, out RecordCount); if (dt != null && dt.Rows.Count > 0) { Rpt_ExamPaper.DataSource = dt; Rpt_ExamPaper.DataBind(); litPagerDown.Text = BLL.PageCommon.Instance.LinkStringByPost(BLL.Util.GetUrl(), GroupLength, RecordCount, pageSize, BLL.PageCommon.Instance.PageIndex, 1); } }
private void BindData() { Entities.QueryExamPaper query = new Entities.QueryExamPaper(); #region 条件 int intVal = 0; DateTime dateVal = new DateTime(); if (PaperName != string.Empty) { query.Name = PaperName; } if (Catage != string.Empty && int.TryParse(Catage, out intVal)) { query.ECID = intVal; } if (Catage != string.Empty && Catage != "-1") { query.ECID = int.Parse(Catage); } if (ECIDStr != string.Empty) { query.ECIDStr = ECIDStr; } if (BeginTime != string.Empty && DateTime.TryParse(BeginTime, out dateVal)) { query.CreateBeginTime = dateVal; } if (EndTime != string.Empty && DateTime.TryParse(EndTime, out dateVal)) { query.CreateEndTime = dateVal; } if (State != string.Empty) { query.Status = State; } if (BGID != string.Empty) { int _bgid = 0; if (int.TryParse(BGID, out _bgid)) { query.BGID = _bgid; } } if (CreateUser != string.Empty && CreateUser != "-1") { query.CreaetUserID = CreateUser; } #endregion DataTable dt = BLL.ExamPaper.Instance.GetExamPaper(query, "CreateTime DESC", BLL.PageCommon.Instance.PageIndex, PageSize, out RecordCount); if (dt != null && dt.Rows.Count > 0) { repeaterTableList.DataSource = dt; repeaterTableList.DataBind(); AjaxPager_Custs.PageSize = PageSize; AjaxPager_Custs.InitPager(RecordCount); } }