Exemplo n.º 1
0
 void OnAdd()
 {
     var roleDetailsViewModel = new RoleDetailsViewModel();
     if (DialogService.ShowModalWindow(roleDetailsViewModel))
     {
         FiresecManager.SecurityConfiguration.UserRoles.Add(roleDetailsViewModel.Role);
         var roleViewModel = new RoleViewModel(roleDetailsViewModel.Role);
         Roles.Add(roleViewModel);
         SelectedRole = roleViewModel;
         ServiceFactory.SaveService.SecurityChanged = true;
     }
 }
Exemplo n.º 2
0
 public void Initialize()
 {
     Roles = new ObservableCollection<RoleViewModel>();
     foreach (var role in FiresecManager.SecurityConfiguration.UserRoles)
         Roles.Add(new RoleViewModel(role));
     SelectedRole = Roles.FirstOrDefault();
 }