Private void databind (ilist <loginlog> datasource, int count)
{
Pageddatasource PPS = new pageddatasource ();
PPS. datasource = datasource;
PPS. allowpaging = true;
PPS. pagesize = 10;
PPS. currentpageindex = index;
Viewstate ["allpage"] = maid. pagecount;
If (index = 0)
{
This. Imuple. visible = false;
This. imgfrist. visible = false;
}
Else if (index = PPS. pagecount-1)
{
This. imgnext. visible = false;
This. imgend. visible = false;
}
If (count = 0)
{
This. lblcount. text = "Sorry, there is no record you want to query ;";
This. Imuple. visible = false;
This. imgfrist. visible = false;
This. imgnext. visible = false;
This. imgend. visible = false;
}
Else if (count <= 10)
{
This. lblcount. text = "total" + count + "current" + (PPs. currentpageindex + 1) + "/" + PPS. pagecount + "page ";
This. Imuple. visible = false;
This. imgfrist. visible = false;
This. imgnext. visible = false;
This. imgend. visible = false;
}
Else
{
This. lblcount. text = "total" + count + "current" + (PPs. currentpageindex + 1) + "/" + PPS. pagecount + "page ";
}
This. gridview1.datasource = pds;
This. gridview1.databind ();
}