Merge branch 'ManagersApp' of https://git.is.ulstu.ru/Artyom_Yashin/PIbd-23_Yashin_A_Zakharov_R_CourseWork_Bank into ManagersApp
This commit is contained in:
commit
9831008fc4
@ -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)
|
||||
{
|
||||
|
@ -59,7 +59,13 @@
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
});
|
||||
method: "GET",
|
||||
url: "/Home/GetWithdrawal",
|
||||
data: { withdrawalId: withdrawal },
|
||||
success: function (result) {
|
||||
$('#sum').val(result.sum)
|
||||
}
|
||||
})
|
||||
};
|
||||
}
|
||||
check();
|
||||
|
Loading…
Reference in New Issue
Block a user