string sqlString = String.Format("SELECT * FROM V_XSOA_OASEARCH WHERE BT LIKE '%{0}%'",searchName);
DataTable dt = BP.DA.DBAccess.RunSQLReturnTable(sqlString);
this.AspNetPager1.RecordCount = dt.Rows.Count;//绑定总数量
this.AspNetPager1.AlwaysShow = true;
//先声明一个分页类对象
PagedDataSource ps = new PagedDataSource();
ps.AllowPaging = true;
ps.PageSize = this.AspNetPager1.PageSize;
ps.CurrentPageIndex = this.AspNetPager1.CurrentPageIndex - 1;
ps.DataSource = dt.DefaultView;
this.rp_sarch.DataSource = ps;
this.rp_sarch.DataBind();
DataTable dt = BP.DA.DBAccess.RunSQLReturnTable(sqlString);
this.AspNetPager1.RecordCount = dt.Rows.Count;//绑定总数量
this.AspNetPager1.AlwaysShow = true;
//先声明一个分页类对象
PagedDataSource ps = new PagedDataSource();
ps.AllowPaging = true;
ps.PageSize = this.AspNetPager1.PageSize;
ps.CurrentPageIndex = this.AspNetPager1.CurrentPageIndex - 1;
ps.DataSource = dt.DefaultView;
this.rp_sarch.DataSource = ps;
this.rp_sarch.DataBind();