//1. 获取用户菜单权限 public static void GetUserMenuPermission(V_UserMenuPermission Menu) { CurrentMenu = Menu; //权限检查发现有变更时,权限需要重新从服务器获取 if (SMT.SAAS.Main.CurrentContext.AppContext.IsPermUpdate) { pmClient.GetEntityPermissionByUserAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.SysUserID, Menu.ENTITYMENUID); return; } //判断是否已存在此权限 if (CheckUserPermissionIsExit(Menu)) { if (OnGetUserMenuPermissionCompleted != null) { OnGetUserMenuPermissionCompleted(null, EventArgs.Empty); } } else { if (!V_UserPermUILocalVM.IsExists(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID, Menu.ENTITYMENUID)) { pmClient.GetEntityPermissionByUserAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.SysUserID, Menu.ENTITYMENUID); return; } GetPermissionInfoUIByLocal(Menu); } }
private void GetPermissionInfoUI() { if (V_UserPermUILocalVM.IsExists(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID) == false) { _services.GetUserMenuPermission(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.SysUserID, _currentClickModule.ModuleID); } else { //权限检查发现有变更时,权限需要重新从服务器获取 if (SMT.SAAS.Main.CurrentContext.AppContext.IsPermUpdate) { _services.GetUserMenuPermission(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.SysUserID, _currentClickModule.ModuleID); return; } if (V_UserPermUILocalVM.IsExists(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID, _currentClickModule.ModuleID) == false) { _services.GetUserMenuPermission(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.SysUserID, _currentClickModule.ModuleID); return; } GetPermissionInfoUIByLocal(); } }