Esempio n. 1
0
        public void Initialize()
        {
            DBPrincipal principal = _container.Resolve <DBPrincipal>();

            if (principal.IsInRole(UserRoleNames.Admin))
            {
                _regionManager.RegisterViewWithRegion(RegionNames.MainNavigationRegion,
                                                      typeof(Views.PeopleNavigationItem));
            }

            _container.RegisterType <Object, Views.PeopleMain>(PeopleViewNames.PeopleMainView);

            _container.RegisterType <ViewModels.PeopleMainViewModel>();
        }
Esempio n. 2
0
        public OrganizationEditViewModel(DBPrincipal principal) : base()
        {
            _editMode  = false;
            _principal = principal;

            _save = new DelegateCommand(
                () =>
            {
                _organizationInstance.Update();
                _roleList.Update();

                EditMode = false;
            },
                () => _editMode);

            _startEdit = new DelegateCommand(
                () =>
            {
                EditMode = true;
            },
                () => !_editMode);
        }