示例#1
0
        /// <summary>
        /// 根据条件分页及查询总数
        /// </summary>
        /// <param name="predicate">条件表达式树</param>
        /// <param name="page">第几页</param>
        /// <param name="row">每页显示多少条</param>
        /// <param name="orderBy">排序规则</param>
        /// <returns></returns>
        public PageList <sys_menulist> GetMenuPageList(Expression <Func <sys_menu, bool> > predicate, int page, int row, string orderBy)
        {
            PageList <sys_menulist> pageList = new PageList <sys_menulist>();

            pageList.code = 0;
            pageList.msg  = "获取成功";
            int totalNumber = 0;

            pageList.data  = _Sys_MenuRepositoryS.GetMenuPageList(predicate, page, row, orderBy, ref totalNumber);
            pageList.count = totalNumber;
            return(pageList);
        }
示例#2
0
        /// <summary>
        /// 根据条件分页及查询总数
        /// </summary>
        /// <param name="predicate">条件表达式树</param>
        /// <param name="page">第几页</param>
        /// <param name="row">每页显示多少条</param>
        /// <param name="orderBy">排序规则</param>
        /// <returns></returns>
        public PageList <sys_menulist> GetMenuPageList(Expression <Func <sys_menu, bool> > predicate, int page, int row, string orderBy)
        {
            PageList <sys_menulist> pageList = new PageList <sys_menulist>();

            pageList.page      = page;
            pageList.pageCount = (pageList.total / row);
            int totalNumber = 0;

            pageList.rows  = _Sys_MenuRepositoryS.GetMenuPageList(predicate, page, row, orderBy, ref totalNumber);
            pageList.total = totalNumber;
            return(pageList);
        }