コード例 #1
0
        private void setPartyCustomActions(bool isgroup, string groupId)
        {
            userService.GetAllUserActionTypes((res, exp) => appController.BeginInvokeOnDispatcher(() =>
            {
                HideBusyIndicator();
                if (exp == null)
                {
                    res.ForEach(c =>
                    {
                        UserActions.Add((int)c, true);
                    });


                    PrivilegeList.Where(all => UserActions.Where(c => c.Value).Select(c => c.Key).Contains((int)all.ActionType))
                    .ToList().ForEach(p => p.IsGrant = true);

                    PrivilegeList.Where(all => UserActions.Where(c => !c.Value).Select(c => c.Key).Contains((int)all.ActionType))
                    .ToList().ForEach(p => p.IsGrant = false);
                }
                else
                {
                    appController.HandleException(exp);
                }
            }), Party.PartyName, isgroup, groupId);

            //PrivilegeList.Where(all => Party.CustomActions.Where(c => c.Value).Select(c => c.Key).Contains(all.ActionType.Id))
            //     .ToList().ForEach(p => p.IsGrant = true);

            // PrivilegeList.Where(all => Party.CustomActions.Where(c => !c.Value).Select(c => c.Key).Contains(all.ActionType.Id))
            //     .ToList().ForEach(p => p.IsDeny = true);
        }
コード例 #2
0
ファイル: MainWindowVM.cs プロジェクト: mehabadi/HPMS
 private void setFiltering()
 {
     userService.GetAllUserActionTypes((res, exp) =>
     {
         if (exp != null)
         {
             //appController.HandleException(exp);
         }
         else
         {
             userAuthorizedActions = res;
         }
     }, LogonUser.Username, false, string.Empty);
 }