- /// <summary>
- /// 分页获取数据列表
- /// </summary>
- /// <param name="strWhere">条件,以and开头</param>
- /// <param name="orderby">排序方式</param>
- /// <param name="pageindex">当前页-1</param>
- /// <param name="pagesize">分页尺寸</param>
- /// <returns></returns>
- public DataSet GetListByPage(string strWhere, string orderby, int pageindex, int pagesize)
- {
- string tablename = "t_JinYinShangHu";
- StringBuilder strSql = new StringBuilder();
- strSql.Append("select top " + pagesize + " * from " + tablename + " where id not in ");
- strSql.Append(" (");
- strSql.Append(" select top " + pageindex * pagesize + " id from " + tablename + " order by " + orderby);
- strSql.Append(" )");
- strSql.Append(strWhere);
- strSql.Append(" order by " + orderby);
- return DbHelperSQL.Query(strSql.ToString());
- }