2024-05-01 19:43:56 +04:00
|
|
|
@using ComputerHardwareStoreContracts.ViewModels
|
|
|
|
@model List<ComponentViewModel>
|
|
|
|
@{
|
|
|
|
ViewData["Title"] = "Components";
|
|
|
|
}
|
|
|
|
<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 class="text-decoration-none me-3 text-black h5" asp-action="CreateComponent">Создать комплектующее</a>
|
|
|
|
<a class="text-decoration-none me-3 text-black h5" asp-action="UpdateComponent">Изменить комплектующее</a>
|
|
|
|
<a class="text-decoration-none me-3 text-black h5" asp-action="ComponentToBuild">Привязать комплектующее к сборке</a>
|
|
|
|
<a class="text-decoration-none text-black h5" asp-action="DeleteComponent">Удалить комплектующее</a>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<table class="componentTable">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>
|
|
|
|
Номер
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Название
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Цена
|
|
|
|
</th>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tbody>
|
|
|
|
@foreach (var component in Model)
|
|
|
|
{
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
@Html.DisplayFor(modelItem => component.Id)
|
|
|
|
</td>
|
|
|
|
<td>
|
2024-05-28 20:21:49 +04:00
|
|
|
@Html.DisplayFor(modelItem => component.Name)
|
2024-05-01 19:43:56 +04:00
|
|
|
</td>
|
|
|
|
<td>
|
2024-05-28 20:21:49 +04:00
|
|
|
@Html.DisplayFor(modelItem => component.Cost)
|
2024-05-01 19:43:56 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
}
|
|
|
|
</tbody>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
}
|
|
|
|
</div>
|