/// <summary> /// 查询的数据 /// </summary> /// <param name="id">额外的参数</param> /// <param name="page">页码</param> /// <param name="rows">每页显示的行数</param> /// <param name="order">排序字段</param> /// <param name="sort">升序asc(默认)还是降序desc</param> /// <param name="search">查询条件</param> /// <param name="total">结果集的总数</param> /// <returns>结果集</returns> public List <SysException> GetByParam(string id, int page, int rows, string order, string sort, string search, ref int total) { IQueryable <SysException> queryData = repository.DaoChuData(db, order, sort, search); total = queryData.Count(); if (total > 0) { if (page <= 1) { queryData = queryData.Take(rows); } else { queryData = queryData.Skip((page - 1) * rows).Take(rows); } } return(queryData.ToList()); }
/// <summary> /// 导出Flexigrid中查询的数据 /// </summary> /// <param name="param">客户端传进的数据</param> /// <param name="id">额外的参数</param> /// <returns></returns> public SysException[] DaoChu(string id, FlexigridParam param) { return(repository.DaoChuData(db, param).ToArray()); }