public async Task <ISingleResponse <vmTransactionPrepareRequest> > PrepareTransactionRelatedRequestAsync(int currentUid)
        {
            var response = new SingleResponse <vmTransactionPrepareRequest>();

            try
            {
                // Retrieve PaymentMethods list
                response.Model.PaymentMethods = await PaymentMethodRepository.GetListPaymentMethodAsync();

                // Retrieve PaymentPayors list
                response.Model.PaymentPayors = await PaymentPayorRepository.GetListPaymentPayorAsync(currentUid);

                // Retrieve TransactionCategorys list
                response.Model.TransactionCategorys = await TransactionCategoryRepository.GetListTransactionCategoryAsync();

                // Retrieve TransactionTypes list
                response.Model.TransactionTypes = await TransactionTypeRepository.GetListTransactionTypeAsync();
            }
            catch (Exception ex)
            {
                response.SetError(ex);
            }

            return(response);
        }
Пример #2
0
        public async Task <IListResponse <vmPaymentPayorListRequest> > GetListPaymentPayorAsync(int createdBy)
        {
            var response = new ListResponse <vmPaymentPayorListRequest>();

            try
            {
                var listPaymentPayorFromDb = await PaymentPayorRepository.GetListPaymentPayorAsync(createdBy, includeRelationship : true);

                response.Model   = _mapper.Map <IEnumerable <PaymentPayor>, IEnumerable <vmPaymentPayorListRequest> >(listPaymentPayorFromDb);
                response.Message = ResponseMessageDisplay.Success;
            }
            catch (Exception ex)
            {
                response.SetError(ex);
            }

            return(response);
        }