Exemplo n.º 1
0
        public UserGroupsViewModel(UserSecurityAdminViewModel model, Dispatcher d)
        {
            _parentModel = model;            
            _dispatcher = d;            

            CancelCommand = new RelayCommand(CancelAction);
            CancelCommand.IsEnabled = true;

            GetGroupsCommand = new RelayCommand(GetGroupsAction);
            GetGroupsCommand.IsEnabled = false;

            SaveCommand = new RelayCommand(SaveAction);
            SaveCommand.IsEnabled =false;

            UserGroups = new ObservableCollection<Group>();
            IsUsersFound = false;
        }
Exemplo n.º 2
0
        public GroupViewModel(UserSecurityAdminViewModel model, StringBuilder log,Dispatcher d,string adminGroup)
        {
            _parentModel = model;
      
            _log = log;
            _dispatcher = d;

            CancelCommand = new RelayCommand(CancelAction);
            CancelCommand.IsEnabled = true;

            SearchCommand = new RelayCommand(SearchAction);
            SearchCommand.IsEnabled = true;

            CreateCommand = new RelayCommand(CreateAction);
            CreateCommand.IsEnabled = true;

            EditGroupCommand = new RelayCommand(EditGroupAction);
            EditGroupCommand.IsEnabled = false;

            NewGroupCommand = new RelayCommand(NewGroupAction);
            NewGroupCommand.IsEnabled = false;

            SaveCommand = new RelayCommand(SaveAction);
            SaveCommand.IsEnabled = true;            
         
            _groupServiceAgent = model.UserGroupServiceAgent;

            GroupPermissionLevels = new ObservableCollection<PermissionLevel>();
            NewGroupPermissionLevels = new ObservableCollection<PermissionLevel>();
            EditGroupPermissionLevels = new ObservableCollection<PermissionLevel>();
            SelectedGroupPermissionLevels = new ObservableCollection<PermissionLevel>();
            OriginalSelectedGroupPermissionLevels = new ObservableCollection<PermissionLevel>();

            LoadPermissionlevels();
            LoadSiteUrls();
                         
            _group = new bCheck.Admin.Data.Group();                                   
            _peopleServiceAgent = new PeopleEditorServiceAgent(_parentModel._siteURL, log);

            _adminGroup = adminGroup;
            LoadDefaultGroupOwner(adminGroup);
        }
Exemplo n.º 3
0
        public GroupUsersViewModel(UserSecurityAdminViewModel model, Dispatcher d)
        {
            _parentModel = model;
            _dispatcher = d;

            CancelCommand = new RelayCommand(CancelAction);
            CancelCommand.IsEnabled = true;

            RemoveUserCommand = new RelayCommand(RemoveUserAction);
            RemoveUserCommand.IsEnabled = true;

            AddUserCommand = new RelayCommand(AddUserAction);
            AddUserCommand.IsEnabled = false;

            GroupUsersCommand = new RelayCommand(GetGroupUsersAction);
            GroupUsersCommand.IsEnabled = false;

            GroupUsers = new ObservableCollection<User>();

            dialogService = new DialogService();
            dialogService.Width = 350;
            dialogService.Height = 140;
        }
Exemplo n.º 4
0
        public ViewAllPermissionViewModel(UserSecurityAdminViewModel model, StringBuilder log, Dispatcher d)
        {
            _parentModel = model;
            _log = log;
            _dispatcher = d;

            GoCommand = new RelayCommand(GoAction);
            GoCommand.IsEnabled = true;

            CancelCommand = new RelayCommand(CancelAction);
            CancelCommand.IsEnabled = true;

            InitializeCommand = new RelayCommand(InitializeViewAllAction);
            InitializeCommand.IsEnabled = true;

            SiteUrls = new List<string>();
            
            _parentModel.UserGroupServiceAgent.GetSubSiteList((list, e) => {
                SiteUrls.Add(Constants.Select);
                foreach (string s in list)                
                    SiteUrls.Add(s);                
            });
        }