fix transfer filtration
This commit is contained in:
parent
85103d6345
commit
080aeb4058
@ -226,8 +226,9 @@ namespace BankManagersClientApp.Controllers
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
ViewBag.Accounts = APIClient.GetRequest<List<AccountViewModel>>($"api/account/getaccountlist?managerid={APIClient.Client.Id}");
|
||||
return View();
|
||||
ViewBag.SenderAccounts = APIClient.GetRequest<List<AccountViewModel>>($"api/account/getaccountlist?managerid={APIClient.Client.Id}");
|
||||
ViewBag.RecipientAccounts = APIClient.GetRequest<List<AccountViewModel>>("api/account/getaccountlist");
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
@ -256,8 +257,9 @@ namespace BankManagersClientApp.Controllers
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
ViewBag.Transfers = APIClient.GetRequest<List<TransferViewModel>>($"api/transfer/gettransferlist?managerid={APIClient.Client.Id}");
|
||||
ViewBag.Accounts = APIClient.GetRequest<List<AccountViewModel>>($"api/account/getaccountlist?managerid={APIClient.Client.Id}");
|
||||
return View();
|
||||
ViewBag.SenderAccounts = APIClient.GetRequest<List<AccountViewModel>>($"api/account/getaccountlist?managerid={APIClient.Client.Id}");
|
||||
ViewBag.RecipientAccounts = APIClient.GetRequest<List<AccountViewModel>>("api/account/getaccountlist");
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
|
@ -15,14 +15,14 @@
|
||||
<div class="col-4">Номер счета отправителя:</div>
|
||||
<div class="col-8">
|
||||
<select name="senderaccount" id="senderaccount" class="form-control"
|
||||
asp-items="@(new SelectList(@ViewBag.Accounts, "Id", "Number"))"></select>
|
||||
asp-items="@(new SelectList(@ViewBag.SenderAccounts, "Id", "Number"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Номер счета получателя:</div>
|
||||
<div class="col-8">
|
||||
<select name="recipientaccount" id="recipientaccount" class="form-control"
|
||||
asp-items="@(new SelectList(@ViewBag.Accounts, "Id", "Number"))"></select>
|
||||
asp-items="@(new SelectList(@ViewBag.RecipientAccounts, "Id", "Number"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
@ -25,13 +25,13 @@
|
||||
<div class="row">
|
||||
<div class="col-4">Отправитель:</div>
|
||||
<div class="col-8">
|
||||
<select id="senderaccount" name="senderaccount" class="form-control" asp-items="@(new SelectList(@ViewBag.Accounts, "Id", "Number"))"></select>
|
||||
<select id="senderaccount" name="senderaccount" class="form-control" asp-items="@(new SelectList(@ViewBag.SenderAccounts, "Id", "Number"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Получатель:</div>
|
||||
<div class="col-8">
|
||||
<select id="recipientaccount" name="recipientaccount" class="form-control" asp-items="@(new SelectList(@ViewBag.Accounts, "Id", "Number"))"></select>
|
||||
<select id="recipientaccount" name="recipientaccount" class="form-control" asp-items="@(new SelectList(@ViewBag.RecipientAccounts, "Id", "Number"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
@ -21,7 +21,7 @@ namespace BankRestApi.Controllers
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public List<AccountViewModel>? GetAccountList(int managerId)
|
||||
public List<AccountViewModel>? GetAccountList(int? managerId)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user