public async Task <ActionResult> Withdraw(SortModel model) { int pageSize = 15; var outcomes = await _outcomeRepository.GetOutcomeTransactionsPaged(model.Page, pageSize); var itemsCount = await _outcomeRepository.GetCountOfOutcomeTransactions(); OutcomeTransactionsViewModel viewModel = new OutcomeTransactionsViewModel() { PageViewModel = new PageViewModel(itemsCount, model.Page, pageSize), OutcomeTransactions = outcomes ?? new List <OutcomeTransactionTableModel>() }; return(View(viewModel)); }
public async Task <IActionResult> Index(SortModel model) { int pageSize = 15; var outcomeTransactions = await _outcomeTransactionsRepository.GetOutcomeTransactionsPaged(model.Page, pageSize); var usersCount = await _outcomeTransactionsRepository.GetCountOfOutcomeTransactions(); OutcomeTransactionsViewModel viewModel = new OutcomeTransactionsViewModel() { PageViewModel = new PageViewModel(usersCount, model.Page, pageSize), OutcomeTransactions = outcomeTransactions ?? new List <OutcomeTransactionTableModel>() }; return(View("Views/Admin/OutcomeTransactions.cshtml", viewModel)); }