Debiting operation.

This commit is contained in:
Programmist73 2023-05-16 20:11:29 +04:00
parent 55147dbf29
commit d0ec922743
2 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,5 @@
using BankYouBankruptContracts.BindingModels;
using BankYouBankruptBusinessLogic.BusinessLogics;
using BankYouBankruptContracts.BindingModels;
using BankYouBankruptContracts.BusinessLogicsContracts;
using BankYouBankruptContracts.SearchModels;
using BankYouBankruptContracts.ViewModels;
@ -140,6 +141,11 @@ namespace BankYouBankruptRestApi.Controllers
try
{
_cashLogic.Create(CashWithdrawal);
_accountLogic.ChangeBalance(new AccountSearchModel
{
Id = CashWithdrawal.AccountId
}, CashWithdrawal.Sum * -1);
}
catch (Exception ex)
{

View File

@ -64,7 +64,7 @@ namespace BankYouBankruptRestApi.Controllers
try
{
_debitingLogic.Create(model);
}
}
catch (Exception ex)
{
_logger.LogError(ex, "Ошибка создания запроса на снятие наличных");