This commit is contained in:
Artyom_Yashin 2024-05-26 14:35:30 +04:00
commit 9831008fc4
2 changed files with 22 additions and 1 deletions

View File

@ -396,6 +396,21 @@ namespace BankManagersClientApp.Controllers
Response.Redirect("Withdrawals");
}
[HttpGet]
public WithdrawalViewModel? GetWithdrawal(int withdrawalId)
{
if (APIClient.Client == null)
{
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
}
var result = APIClient.GetRequest<WithdrawalViewModel>($"api/withdrawal/getwithdrawal?withdrawalid={withdrawalId}");
if (result == null)
{
return default;
}
return result;
}
[HttpGet]
public List<int> GetAccounts(int withdrawalId)
{

View File

@ -59,7 +59,13 @@
}
});
$.ajax({
});
method: "GET",
url: "/Home/GetWithdrawal",
data: { withdrawalId: withdrawal },
success: function (result) {
$('#sum').val(result.sum)
}
})
};
}
check();