public ActionResult EditMenu(MenuDTO menu, Guid?module, Guid?parent)
        {
            return(HttpHandleExtensions.AjaxCallGetResult(() =>
            {
                menu.Permissions = new Collection <PermissionDTO>();
                if (module.HasValue)
                {
                    menu.Module = _moduleService.FindBy(module.Value);
                }
                if (parent.HasValue)
                {
                    menu.Parent = _menuService.FindBy(parent.Value);
                }

                if (menu.Id == Guid.Empty)
                {
                    _menuService.Add(menu);
                    this.JsMessage = MessagesResources.Add_Success;
                }
                else
                {
                    _menuService.Update(menu);
                    this.JsMessage = MessagesResources.Update_Success;
                }
                base.ClearCacheMenus();
                // 更新所有登陆用户缓存,以更新菜单信息
                AuthorizeManager.ClearAllCache();

                return Json(new AjaxResponse
                {
                    Succeeded = true,
                    RedirectUrl = Url.Action("Index")
                });
            }));
        }
        public ActionResult RemoveMenu(Guid id)
        {
            return(HttpHandleExtensions.AjaxCallGetResult(() =>
            {
                _menuService.Remove(id);
                base.ClearCacheMenus();
                // 更新所有登陆用户缓存,以更新菜单信息
                AuthorizeManager.ClearAllCache();

                this.JsMessage = MessagesResources.Remove_Success;
                return Json(new AjaxResponse
                {
                    Succeeded = true,
                    RedirectUrl = Url.Action("Index")
                }, JsonRequestBehavior.AllowGet);
            }));
        }