Ejemplo n.º 1
0
        private void GetUsers()
        {
            _UserViewModels.Clear();

            foreach (var c in _Service.GetAllUsers())
            {
                _UserViewModels.Add(new UserItemViewModel(c.Id, c.FirstName, c.LastName));
            }

            OnPropertyChanged(nameof(UserViewModels));
        }
Ejemplo n.º 2
0
        public void GetUsersTest()
        {
            UserCRUD userService = new UserCRUD(new TestDataRepository());

            userService.AddUser(16, "Wartłomiej", "Błodarski");
            userService.AddUser(19, "Kaciej", "Mopa");
            userService.AddUser(22, "Wartłomiej", "Bubicki");

            IEnumerable <UserDTO> users = userService.GetAllUsers();

            Assert.AreEqual(users.Count(), 3);

            userService.DeleteUser(16);
            userService.DeleteUser(19);
            userService.DeleteUser(22);
        }
Ejemplo n.º 3
0
        public static ObservableCollection <UserModel> GetUsers()
        {
            models = (ObservableCollection <UserModel>)UserCRUD.GetAllUsers();

            return(models);
        }
Ejemplo n.º 4
0
 public IList <User> GetAllUsers(string sortOrder, string searchString)
 {
     return(userTableActions.GetAllUsers(sortOrder, searchString));
 }