/// <summary>
        /// 获取用户列表
        /// </summary>
        /// <param name="page"></param>
        /// <returns></returns>
        public RequestResult QueryUserRoleList(ReqBasePage page, string userId)
        {
            var roleList = _roleShareBll.GetPageList(x => !x.RoleId.Equals(""), x => x.RoleSeq, out int total, page.pageSize, page.pageIndex);
            var pageList = ResBasePage <Sys_Role> .GetInstance(roleList, total);

            return(RequestResult.Success(ExecutSuccessMsgEnum.QuerySuccess.GetRemark(), pageList));
        }
Esempio n. 2
0
        public ActionResult QueryUserList(ReqBasePage page)
        {
            var userId   = Session[ConstString.SysUserLoginId];
            var userList = _userShareBll.GetPageList(x => !x.UserId.Equals(""), x => x.UserSeq, out int total, page.pageSize, page.pageIndex);
            var pageList = ResBasePage <Sys_User> .GetInstance(userList, total);

            var result = RequestResult.Success(ExecutSuccessMsgEnum.QuerySuccess.GetRemark(), pageList);

            return(RequestAction(result));
        }
Esempio n. 3
0
        /// <summary>
        /// 获取菜单列表
        /// </summary>
        /// <param name="page"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        public RequestResult QueryNavMenuList(ReqBasePage page, string userId)
        {
            //用户菜单信息
            var userMenus = _navMenuBll.GetNavMenuByUserId(userId);

            userMenus.ForEach(x =>
            {
                x.Url       = x.Url ?? "#";
                x.IconClass = x.IconClass ?? "icon icon-target";
                x.IconUrl   = string.Format("<i class='{0}'></i>", x.IconClass);
            });
            var menuList = userMenus.OrderBy(x => x.Seq)
                           .Skip((page.pageIndex - 1) * page.pageSize)
                           .Take(page.pageSize).ToList();
            var pageList = ResBasePage <Sys_NavMenu> .GetInstance(menuList, userMenus.Count);

            ResMessage.CreatMessage(ResultTypeEnum.Success, null, pageList);
            return(RequestResult.Success("", pageList));
        }
Esempio n. 4
0
        /// <summary>
        /// API获取菜单列表
        /// </summary>
        /// <param name="page"></param>
        /// <returns></returns>
        public ResMessage APIQueryNavMenus(ReqBasePage page)
        {
            //用户菜单信息
            var userMenus = _menuShareBll.LoadEntities();
            var menuList  = userMenus.OrderBy(x => x.Seq)
                            .Skip((page.pageIndex - 1) * page.pageSize)
                            .Take(page.pageSize).ToList();
            var userMenuAPI = menuList.Select(x => new ResUserMenuAPI
            {
                MenuId      = x.MenuId,
                MenuName    = x.MenuName,
                ParentMenId = x.ParentMenId,
                Level       = x.Level,
                Url         = x.Url,
                IconClass   = x.IconClass,
                IconUrl     = x.IconUrl,
                Seq         = x.Seq ?? 0
            }).ToList();
            var pageList = ResBasePage <ResUserMenuAPI> .GetInstance(userMenuAPI, userMenus.Count);

            return(ResMessage.CreatMessage(ResultTypeEnum.Success, null, pageList));
        }