}
}
//计算共有多少记录
public int sumcount()
{
int intCount;
string strCount = "select count(*) as co from ty_mpsearch where spflbh="+id;
OleDbCommand MyComm = new OleDbCommand(strCount,MyConn);
OleDbDataReader dr = MyComm.ExecuteReader();
if(dr.Read())
{
intCount = Int32.Parse(dr["co"].ToString());
}
else
{
intCount = 0;
}
dr.Close();
return intCount;
}
public void ListBind()
{
int StartIndex;
//设定导入的起终地址
StartIndex = CurrentPage*PageSize;
string strSel = "select * from ty_mpsearch where spflbh="+id;
DataSet ds = new DataSet();
OleDbDataAdapter MyAdapter = new OleDbDataAdapter(strSel,MyConn);
MyAdapter.Fill(ds,StartIndex,PageSize,"Score");
Private Function DLBindPage()
Dim Ps As New PagedDataSource
Dim lstrsql As String
Dim DT As DataTable
lstrsql = "select * from vw_ess_enterprise_ad t"
DT = DB.getDataTable(lstrsql)
Ps.DataSource = DT.DefaultView
Ps.AllowPaging = True
Ps.PageSize = 80
Dim currentpage As Integer
If Not Request.QueryString("Page") Is Nothing Then
currentpage = Convert.ToInt32(Request.QueryString("Page"))
Else
currentpage = 1
End If
Ps.CurrentPageIndex = currentpage - 1
If Not Ps.IsFirstPage Then
lnkPrev.NavigateUrl = Request.CurrentExecutionFilePath + "?Page=" + Convert.ToString(currentpage - 1) + "&p=" + Request("p")
End If
If Not Ps.IsLastPage Then
lnkNext.NavigateUrl = Request.CurrentExecutionFilePath + "?Page=" + Convert.ToString(currentpage + 1) + "&p=" + Request("p")
End If