Ejemplo n.º 1
0
        //Tries to delete the user with the specified RFID.
        //Notifies the messenger if the deletion is succsesful and closes the Window
        //If the deletion is not succesful the user will be notified with a message in the current Window
        private void RemoveUserMethod()
        {
            var user = _userService.DeleteUserRfid(RFID);

            RFID = string.Empty;
            if (user != null)
            {
                Messenger.Default.Send <NotificationMessage>(new NotificationMessage($"{user.FirstName} {user.LastName} has been removed"));
                _dialogService.CloseRemoveUserDialog();
            }
            else
            {
                Result = "The User could not be found";
            }
        }