///
/// 分页获取数据
///
/// 查询条件
/// 排序字段名
/// 页大小
/// 要获取的页内容
///
public DataSet GetList(string strWhere, string OrderfldName, int PageSize, int PageIndex,out int allOut)
{
SqlParameter[] parameters = {
new SqlParameter("@tblName", SqlDbType.VarChar, 255),
new SqlParameter("@fldName", SqlDbType.VarChar, 255),
new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
new SqlParameter("@OrderfldName", SqlDbType.VarChar, 255),
new SqlParameter("@PageSize", SqlDbType.Int),
new SqlParameter("@PageIndex", SqlDbType.Int),
new SqlParameter("@TotalCount", SqlDbType.Int)//OutPut
};
parameters[0].Value = "Ex_Class";
parameters[1].Value = "id,group_id,parent_id,class_name,remark,clevel,depth,order_num,islock,operator_time,operator_id";
parameters[2].Value = strWhere;
parameters[3].Value = OrderfldName;
parameters[4].Value = PageSize;
parameters[5].Value = PageIndex;
parameters[6].Direction = ParameterDirection.Output;//OutPut
DataSet ds = SqlHelper.ExecuteDataSet(CommandType.StoredProcedure, "UP_GetRecordByPageOrder", parameters);
allOut = int.Parse(parameters[6].Value.ToString());//赋值
return ds;
}