Example #1
0
        public ActionResult LoadMenus()
        {
            var FilterDefinition = new
            {
                ApplicationID = string.Empty
            };
            string json = Request["data"];

            var Filter = JsonConvert.DeserializeAnonymousType(json, FilterDefinition);

            List <SysMenu> menus  = SysMenuService.LoadAllMenusWithPermission(Filter.ApplicationID);
            var            result = from m in menus
                                    select new
            {
                id     = m.SysNo,
                text   = m.MenuName,
                parent = m.ParentSysNo,
                data   = m
            };

            return(Json(new AjaxResult
            {
                Success = true,
                Data = result
            }, JsonRequestBehavior.AllowGet));
        }