Example #1
0
        public async Task <PagedResult <Document> > RetrievePersonnelDocuments(int personnelId, Paging paging = null, List <OrderBy> orderBy = null)
        {
            var documents = await _dataService.RetrievePagedResultAsync <DocumentDetail>(d => d.PersonnelId == personnelId.ToString(), orderBy, paging);

            var searchResults = _mapper.Map <IEnumerable <Document> >(documents.Items);

            return(PagedResult <Document> .Create(searchResults, documents.CurrentPage, documents.ResultsPerPage, documents.TotalPages, documents.TotalResults));
        }
Example #2
0
        public async Task <PagedResult <Personnel> > RetrievePersonnels(List <OrderBy> orderBy = null, Paging paging = null)
        {
            var personnel = await _dataService.RetrievePagedResultAsync <Personnel>(e => true, orderBy, paging);

            return(personnel);
        }