Формы добил, остались отчеты

This commit is contained in:
Artyom_Yashin 2024-05-26 12:41:35 +04:00
parent 1b12da5d98
commit de87360d25
4 changed files with 4 additions and 8 deletions

View File

@ -23,10 +23,7 @@ namespace BankClientApp
var result = response.Result.Content.ReadAsStringAsync().Result;
if (response.Result.IsSuccessStatusCode)
{
return JsonConvert.DeserializeObject<T>(result, new JsonSerializerSettings {
TypeNameHandling = Newtonsoft.Json.TypeNameHandling.All,
NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
});
return JsonConvert.DeserializeObject<T>(result);
}
else
{

View File

@ -353,7 +353,7 @@ namespace BankClientApp.Controllers
return Redirect("~/Home/Enter");
}
ViewBag.Operations = APIClient.GetRequest<List<OperationViewModel>>($"api/operation/getoperationlist?clientid={APIClient.Client.Id}");
ViewBag.Transfers = APIClient.GetRequest<List<TransferViewModel>>($"api/transfer/gettransferlist");
ViewBag.Transfers = APIClient.GetRequest<List<TransferViewModel>>($"api/transfer/getfulltransferlist");
return View();
}
@ -480,7 +480,6 @@ namespace BankClientApp.Controllers
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
}
var result = APIClient.GetRequest<RequestViewModel>($"api/request/getrequest?requestid={requestId}");
result.CardRequests = null;
if (result == null)
{
return default;

View File

@ -55,7 +55,7 @@
};
}
check();
$('#card').on('change', function () {
$('#operation').on('change', function () {
check();
});
</script>

View File

@ -49,7 +49,7 @@
data: { requestId: request },
success: function (result) {
$.map(result, function (n) {
$(`option[value=${n}]`).attr("selected", "selected")
$(`#cards option[value=${n}]`).attr("selected", "selected")
});
}
});