62,046
社区成员
发帖
与我相关
我的任务
分享
/// <summary>
/// 绑定新闻
/// </summary>
protected void DBView()
{
DataTable newsList = TuanNewsService.GetAllNews().Tables[0];
PagedDataSource pds = new PagedDataSource();
pds.DataSource = newsList.DefaultView;
anpTuanNews.RecordCount = newsList.Rows.Count;
pds.CurrentPageIndex = anpTuanNews.CurrentPageIndex - 1;
pds.PageSize = anpTuanNews.PageSize;
pds.AllowPaging = true;
this.rptTypeNews.DataSource = pds;
this.rptTypeNews.DataBind();
//var newsList = SqlHelper.GetDataSet(sql).Tables[0];
}