Exemple #1
0
        ////////////////////  USER  //////////////////
        private void ExecuteNewUserCommand(Object obj)
        {
            AddUserController addUserController = new AddUserController();
            User user = addUserController.AddUser();

            if (user == null)
            {
                return;
            }
            socket.AddUser(user);
            //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();
        }
Exemple #2
0
        public void ExecuteNewUserCommand(Object obj)
        {
            AddUserController addUserController = App.Container.Resolve <AddUserController>();
            User user = addUserController.AddUser();

            if (user == null)
            {
                return;
            }
            var result = socket.AddUser(user);

            if (result == false)
            {
                MessageBox.Show("Fehler beim hinzufügen des Benutzers!");
            }
            parent.restartUserCommmand();
        }