示例#1
0
 public void ExecuteDeleteUserCommand(Object obj)
 {
     if (userViewModel.SelectedUser != null)
     {
         var result = socket.DeleteUser(userViewModel.SelectedUser);
         if (result == false)
         {
             MessageBox.Show("Fehler beim Löschen des Benutzers!");
         }
         parent.restartUserCommmand();
     }
 }
示例#2
0
 private void ExecuteDeleteUserCommand(Object obj)
 {
     if ((fleetManagementViewModel.ActiveViewModel as UserViewModel).SelectedUser != null)
     {
         socket.DeleteUser((fleetManagementViewModel.ActiveViewModel as UserViewModel).SelectedUser);
         //Fetch new Users
         fleetManagementViewModel.ActiveViewModel = new UserViewController().Initialize();
         (fleetManagementViewModel.ActiveViewModel as UserViewModel).Users = new ObservableCollection <User>(socket.getAllUsers());
         //Change Entry List
         (fleetManagementViewModel.ActiveViewModel as UserViewModel).entryUsers = (fleetManagementViewModel.ActiveViewModel as UserViewModel).Users.ToList();
     }
 }