コード例 #1
0
        // GET: Client
        public ActionResult Index(int page, DateTime?addedDate)
        {
            var pageSize         = 10;
            var events           = _eventServices.GetPaginatedList(pageSize, addedDate, page);
            var clientsViewModel = _mapper.Map <PaginatedList <EventViewModel> >(events);

            clientsViewModel.PageIndex  = events.PageIndex;
            clientsViewModel.TotalPages = events.TotalPages;

            return(View(clientsViewModel));
        }