CourseWork_Bank/Bank/BankOperatorApp/Views/Home/CreditPrograms.cshtml

67 lines
1.5 KiB
Plaintext

@using BankContracts.ViewModels
@model List<CreditProgramViewModel>
@{
ViewData["Title"] = "CreditPrograms";
}
<div class="text-center">
<h1 class="display-4">Кредитные программы</h1>
</div>
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Авторизируйтесь</h3>
return;
}
<p>
<a asp-action="CreateCreditProgram"><button class="btn btn-primary">Создать кредитную программу</button></a>
</p>
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Название программы
</th>
<th>
Процент кредитования
</th>
<th>
ФИО оператора
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Percent)
</td>
<td>
@Html.DisplayFor(modelItem => item.BankOperatorFIO)
</td>
<td>
<a asp-action="CreditProgram" asp-route-id="@item.Id"><button class="btn btn-primary">Подробнее</button></a>
</td>
</tr>
}
</tbody>
</table>
}
</div>