Ejemplo n.º 1
0
        public async Task <TransactionReportResult> GetPaginatedAsync(
            int currentPage, int pageSize,
            DateTime from, DateTime to)
        {
            var(skip, take) = PagingUtils.GetNextPageParameters(currentPage, pageSize);

            var reports = await _transactionReportRepository.GetPaginatedAsync(skip, take, from, to);

            return(new TransactionReportResult
            {
                CurrentPage = currentPage,
                PageSize = pageSize,
                TotalCount = reports.Count,
                TransactionReports = reports
            });
        }
Ejemplo n.º 2
0
        public async Task <TransactionReportResult> GetPaginatedAsync(
            int currentPage, int pageSize,
            DateTime from, DateTime to, string[] partnerIds, Guid?campaignId,
            string transactionType = null, string status = null)
        {
            var(skip, take) = PagingUtils.GetNextPageParameters(currentPage, pageSize);

            var reports = await _transactionReportRepository.GetPaginatedAsync(skip, take, from, to, partnerIds,
                                                                               transactionType, status, campaignId);

            return(new TransactionReportResult
            {
                CurrentPage = currentPage,
                PageSize = pageSize,
                TotalCount = reports.Count,
                TransactionReports = reports
            });
        }