62,074
社区成员
发帖
与我相关
我的任务
分享
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//txtStartDate.Text = DateTime.Now.ToString("yyyy-MM-") + "01";
//txtEndDate.Text = DateTime.Now.ToString("yyyy-MM-dd");
BindServerList();
AndroidDataBind();
}
}
private void AndroidDataBind()
{
string sql = "select acf.*,ali.userid,ali.LockDateTime,ali.AndroidStatus,ats.Accounts,gri.ServerName from AndroidConfigure acf,AndroidLockInfo ali,THPlatformDBLink.THPlatformDB.dbo.GameRoomInfo gri,AccountsInfo ats where acf.BatchID=ali.BatchID and acf.ServerID=gri.ServerID and ali.userid=ats.userid ";
sql += " " + this.SearchItems + " ";
sql += this.Orderby;
DataSet ds = AccountInfoHelper.Query(sql);
PagedDataSource pds = new PagedDataSource();
pds.AllowPaging = true;
pds.PageSize = anpNews.PageSize;
pds.CurrentPageIndex = anpNews.CurrentPageIndex - 1;
pds.DataSource = ds.Tables[0].DefaultView;
anpNews.RecordCount = pds.DataSourceCount;
this.rptAndroid.DataSource = pds;
this.rptAndroid.DataBind();
}
private void AndroidDataBind()
{
string sql = "select acf.*,ali.userid,ali.LockDateTime,ali.AndroidStatus,ats.Accounts,gri.ServerName from AndroidConfigure acf,AndroidLockInfo ali,THPlatformDBLink.THPlatformDB.dbo.GameRoomInfo gri,AccountsInfo ats where acf.BatchID=ali.BatchID and acf.ServerID=gri.ServerID and ali.userid=ats.userid ";
sql += " " + this.SearchItems + " ";
sql += this.Orderby;
DataSet ds = AccountInfoHelper.Query(sql);
this.rptAndroid.DataSource = pds.table[0];
this.rptAndroid.DataBind();
}
分页前端控制 不就行了