asp.net repeater sql分页
public static List<empextender> getAllemp(int PageSize,int PageIndex)
{
string sql = "select * from (select empname,empid,sex,row_number() over(order by empid asc) rn from andy_shen_emp_infomation)"
+" where rownum<=:PageSize "
+"and empid not in"
+"(select empid from (select empname,empid,sex,row_number() over(order by empid asc) rn from andy_shen_emp_infomation)"
+ " where rn <=(:PageSize*:PageIndex))"
+ "and rn<=(:PageSize*:PageIndex*2) and rn>=(:PageSize*:PageIndex) ";
List<empextender> list = new List<empextender>();
OracleParameter[] para = new OracleParameter[] {
new OracleParameter(":PageSize",PageSize),
new OracleParameter(":PageIndex",PageIndex),
};
DataSet ds = OracleHelper.getDataSet(OracleHelper.web2Constring, sql, CommandType.Text, para);
foreach (DataRow dr in ds.Tables[0].Rows)
{
empextender var = new empextender();