CourseWork_CompShop/ComputerShopProvider/ComputerShopClientApp/Views/Home/Assembly.cshtml

57 lines
911 B
Plaintext

@using ComputerShopContracts.ViewModels
@model List<AssemblyViewModel>
@{
ViewData["Title"] = "Assembly";
}
<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="CreateAssembly">Создать сборку</a>
</p>
<table class="table">
<thead>
<tr>
<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.AssemblyName)
</td>
<td>
@Html.DisplayFor(modelItem => item.Price)
</td>
</tr>
}
</tbody>
</table>
}
</div>