Пример #1
0
        public JsonResult Add(AddViewModel model)
        {
            var identity = new AspNetIdentiyAuthorizeRelay <SysUser>();

            identity.CreateMenu(this.CurrentUserId, model.SysMenu, model.SysMenu.Permission);
            return(Json(ResultType.Success, WebBackOperateTipUtils.ADD_SUCCESS));
        }
Пример #2
0
        public JsonResult Add(MenuModel model)
        {
            var     identity = new AspNetIdentiyAuthorizeRelay <SysUser>(CurrentDb);
            int     pId      = model.PId;
            SysMenu menu     = new SysMenu();

            menu.PId         = pId;
            menu.Name        = model.Name;
            menu.Url         = model.Url;
            menu.Description = model.Description;
            identity.CreateMenu(menu, model.Permission);
            return(Json(ResultType.Success, ManagerOperateTipUtils.ADD_SUCCESS));
        }