//绑定 public void Bind() { int currentpage = Convert.ToInt32(Request["CurrentPage"]); int check = 1; currentpage = (currentpage < 1) ? 1 : currentpage; if (this.Pager1.CurrentIndex > 0) { currentpage = this.Pager1.CurrentIndex; } int pageSize = this.Pager1.PageSize; QPS.NEW.BLL.Room rm = new QPS.NEW.BLL.Room(); ds = rm.Select(pageSize, currentpage); dgExamProj.DataSource = ds; this.Pager1.ItemCount = rm.GetCount(); dgExamProj.DataBind(); }