Ejemplo n.º 1
0
        void OnAdd()
        {
            var userDetailsViewModel = new UserDetailsViewModel();
			if (DialogService.ShowModalWindow(userDetailsViewModel))
            {
                FiresecManager.SecurityConfiguration.Users.Add(userDetailsViewModel.User);
                var userViewModel = new UserViewModel(userDetailsViewModel.User);
                Users.Add(userViewModel);
                SelectedUser = userViewModel;
                ServiceFactory.SaveService.SecurityChanged = true;
            }
        }
Ejemplo n.º 2
0
		void OnEdit()
		{
			var userDetailsViewModel = new UserDetailsViewModel(SelectedUser.User);
			if (DialogService.ShowModalWindow(userDetailsViewModel))
			{
				ClientManager.SecurityConfiguration.Users.Remove(SelectedUser.User);
				SelectedUser.User = userDetailsViewModel.User;
				ClientManager.SecurityConfiguration.Users.Add(SelectedUser.User);

				ServiceFactory.SaveService.SecurityChanged = true;
			}
		}