public void EditDeviceUser() { if (SelectedDeviceUser != null) { var userDetailsViewModel = new UserDetailsViewModel(SelectedDeviceUser.GuardUser); if (DialogService.ShowModalWindow(userDetailsViewModel)) { SelectedDeviceUser.GuardUser = userDetailsViewModel.GuardUser; ServiceFactory.SaveService.FSChanged = true; } } }
void OnAdd() { var userDetailsViewModel = new UserDetailsViewModel(); if (DialogService.ShowModalWindow(userDetailsViewModel)) { FiresecManager.GuardUsers.Add(userDetailsViewModel.GuardUser); var userViewModel = new UserViewModel(userDetailsViewModel.GuardUser); AvailableUsers.Add(userViewModel); ServiceFactory.SaveService.FSChanged = true; } }
void OnEdit() { var userDetailsViewModel = new UserDetailsViewModel(SelectedAvailableUser.GuardUser); if (DialogService.ShowModalWindow(userDetailsViewModel)) { SelectedAvailableUser.GuardUser = userDetailsViewModel.GuardUser; ServiceFactory.SaveService.FSChanged = true; } }