public async Task <ListFundTransactionHistoryModel> GetsFundTransactionHistory(int pageIndex, int pageSize, SearchBalanceFund searchBalanceFund = null)
        {
            var listFundTransactionHistoryModel = new ListFundTransactionHistoryModel();
            var listTransactionHistory          = await _fundTransactionHistoryManager.GetsFundTransactionHistory(pageSize, pageIndex, searchBalanceFund);

            listFundTransactionHistoryModel.ListFundTransactionHistory = _mapper.Map <List <FundTransactionHistory>, List <FundTransactionHistoryModel> >(listTransactionHistory);
            listFundTransactionHistoryModel.TotalCount = _fundTransactionHistoryManager.GetsFundTransactionHistory(searchBalanceFund).Result.Count();
            return(listFundTransactionHistoryModel);
        }
Example #2
0
        public async Task <IActionResult> List(int pageSize = 0, int pageIndex = 0)
        {
            var size = pageSize > 0 ? pageSize : _configuration.GetValue <int>("PagingConfig:PageSize");
            var page = pageIndex > 0 ? pageIndex : 1;

            // Giao dịch quỹ
            var modelFund = new SearchBalanceFund();

            modelFund.Status = EditStatus.Updating;
            var listFundTransactionHistory  = _fundTransactionHistoryService.GetsFundTransactionHistory(page, size, modelFund).Result;
            var fundTransactionHistoryModel = new ListFundTransactionHistoryModel();

            fundTransactionHistoryModel           = listFundTransactionHistory;
            fundTransactionHistoryModel.PageIndex = page;
            fundTransactionHistoryModel.PageSize  = size;
            ViewBag.FundTransactionHistoryModel   = fundTransactionHistoryModel;
            ViewBag.SearchBalanceFund             = new SearchBalanceFund()
            {
                AmountFrom = null, AmountTo = null, Funds = listFundTransactionHistory.ListFundTransactionHistory.Select(x => x.Fund)
            };

            // Giao dịch khách hàng
            var transactionHistoryModel = await _transactionHistoryService.GetListTransactionHistoryForTask(size, page, searchTransactionHistory : new SearchTransactionHistory());

            transactionHistoryModel.PageIndex = page;
            transactionHistoryModel.PageSize  = size;
            ViewBag.TransactionHistoryModel   = transactionHistoryModel;

            // Task hoàn thành
            var model = new TasksCompletedModel();

            model.TasksCompleted    = new List <TaskCompletedModel>();
            model.PageIndex         = page;
            model.PageSize          = size;
            ViewBag.TaskModel       = model;
            ViewBag.SearchTaskModel = new SearchTask();

            return(View());
        }