Exemple #1
0
        public EventMilestonesViewModel GetEventMilestones(ListInputModel listInputModel, EventMilestoneFilterInputModel eventMilestoneFilterInputModel)
        {
            var eventMilestones = _adminApplicationService.GetEventMilestones(_listInputModelToListInputInfoMapper.Map(listInputModel),
                                                                              _eventMilestoneFilterInputModelToEventMilestoneFilterInputInfoMapper.Map(eventMilestoneFilterInputModel)).ToArray();

            return(new EventMilestonesViewModel
            {
                EventMilestones =
                    eventMilestones.Skip(listInputModel.Index).Take(listInputModel.PageCount)
                    .Select(eventMilestone => _eventMilestoneInfoToEventMilestoneViewModelMapper.Map(eventMilestone)),
                TotalNumberOfEventMilestones = eventMilestones.Count()
            });
        }
Exemple #2
0
        public UsersViewModel GetUsers(string fullname, string username, ListInputModel listInputModel)
        {
            var users = _adminApplicationService.GetUsers(fullname, username, _listInputModelToListInputInfoMapper.Map(listInputModel)).ToArray();

            return(new UsersViewModel
            {
                Users = users.Skip(listInputModel.Index).Take(listInputModel.PageCount)
                        .Select(user => new UserViewModel
                {
                    Id = user.Id,
                    FullName = user.FullName,
                    Email = user.Email,
                    Username = user.Username,
                    IsActive = user.IsActive,
                    RoleId = user.Role.Id
                }),
                TotalNumberOfUsers = users.Count()
            });
        }