NHibernate初学三之条件查询(Criteria Queries)与AspNetPager分页实例(四)

2014-11-24 01:37:21 · 作者: · 浏览: 3
}
复制代码
2.4 UI层结合AspNetPager不带条件
复制代码
private void BindData()
{
ModelLibrary.Pagination.PageInfo pi = new ModelLibrary.Pagination.PageInfo(typeof(SchoolModel), this.AspNetPager2.CurrentPageIndex);
new PaginationBLL().GetToPager(pi);
this.AspNetPager2.RecordCount = pi.RecordCount;
this.DataList1.DataSource = pi.List;
this.DataList1.DataBind();
this.Label1.Text = "当前第" + this.AspNetPager2.CurrentPageIndex + "页 总" + pi.PageCount + "页";
}
protected void AspNetPager2_PageChanged(object sender, EventArgs e)
{
BindData();
}