Beispiel #1
0
        public ActionResult Index()
        {
            // var menulist = _menuService.GetAll().ToList().Select(p => p.SysMenuId);
            var mylist = from p in _groupmenuService.GetAll().Where(p => p.SysGroupId == Loginer.GroupId)
                         select new SysMenu
            {
                SysMenuId = p.SysMenu.SysMenuId,
                Icon      = p.SysMenu.Icon,
                Fid       = p.SysMenu.Fid,
                Name      = p.SysMenu.Name,
                IsEnable  = p.SysMenu.IsEnable,
                Url       = p.SysMenu.Url
            };

            return(View(mylist.ToList()));
        }
Beispiel #2
0
        public JsonResult GetGroupMenus(int groupId = 0)
        {
            var list = _sysGroupMenuService.GetAll().Where(p => p.SysGroupId == groupId).ToList();

            return(Json(list, JsonRequestBehavior.AllowGet));
        }