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>(); }
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); }