Exemplo n.º 1
0
        public PagedList <SystemRole> selectRole(Expression <Func <SystemRole, bool> > criteria1, bool pager, int?index, int?size)
        {
            PagedList <SystemRole> list;

            if (pager)
            {
                list = _SystemRoleService.GetWhere(criteria1).OrderBy(r => r.RoleName).ToPagedList(index ?? 1, size == null ? 5 : int.Parse(size.ToString()));
            }
            else
            {
                list = (PagedList <SystemRole>)_SystemRoleService.GetWhere(criteria1).OrderBy(r => r.RoleName).ToList();
            }

            return(list);
        }