/// <summary> /// 绑定列表数据 /// </summary> /// <param name="pageIndex"></param> private void BindNews(int pageIndex) { AdoHelper adoHelper = AdoHelper.CreateHelper("DB_Instance"); string filter = SetFilter(); string sort = "createtime desc"; this.pageBar.PageIndex = pageIndex; int pageSize = this.pageBar.PageSize; int count = 0; DataTable dtAll = adoHelper.ExecuteSqlDataset("select * from T_Test_Queston where " + filter + " order by " + sort).Tables[0]; DataTable dt = PubFunction.LocalPaging(dtAll, "1=1", sort, pageSize, pageIndex, ref count); this.gvArticleList.DataSource = dt; this.gvArticleList.DataBind(); this.pageBar.RecordCount = count; //保存状态 SaveSessionStatus(); }