public UserListModel InitializeUserListModel(UserQueryItem userQueryItem) { var model = new UserListModel(); model.Users = _userRepository.Query(userQueryItem); model.UserSearchModel.UserQueryItem = userQueryItem; var roleUserRepository = new RoleUserRepository(); model.RoleUsers = roleUserRepository.GetRoleUsersByUserIds(model.Users.Select(o => o.Id)); return model; }
public UserListModel InitializeSelectUserByDepartmentsModel(UserQueryItem queryItem) { var model = new UserListModel(); var users = _userRepository.Query(queryItem); model.Users = users; model.UserSearchModel.UserQueryItem = queryItem; return model; }