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

51 lines
884 B
Plaintext

@using BankContracts.ViewModels
@model List<CurrencyViewModel>
@{
ViewData["Title"] = "Home Page";
}
<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="CreateCurrency"><button class="btn btn-primary">Создать валюту</button> </a>
</p>
<table class="table">
<thead>
<tr>
<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>
</tr>
}
</tbody>
</table>
}
</div>