Esempio n. 1
0
 /// <summary>
 /// 分页数据绑定(列表控件和数据控件)
 /// </summary>
 /// <param name="ctrl">绑定控件</param>
 /// <param name="source">数据源</param>
 /// <param name="pager">分页控件</param>
 public static void BindControl(Repeater ctrl, DataSet source, AspNetPager pager)
 {
     if (source.Tables.Count < 1)
         return;
     ctrl.DataSource = source.Tables[0];
     ctrl.DataBind();
     pager.RecordCount = Convert.ToInt32(source.Tables[1].Rows[0][0]);
     pager.SetRewriteUrl();
 }
Esempio n. 2
0
 /// <summary>
 /// 分页数据绑定(列表控件和数据控件)
 /// </summary>
 /// <param name="ctrl"></param>
 /// <param name="source"></param>
 /// <param name="RecordCount"></param>
 /// <param name="pager"></param>
 public static void BindControl(Repeater ctrl, object source, int RecordCount, AspNetPager pager)
 {
     ctrl.DataSource = source;
     ctrl.DataBind();
     pager.RecordCount = RecordCount;
     pager.SetRewriteUrl();
 }