PIbd-21_Medvedkov_Coursach/ComputerShopImplementerApp/Views/Home/IndexRequest.cshtml

55 lines
983 B
Plaintext
Raw Normal View History

2024-05-02 00:46:54 +04:00
@using ComputerShopContracts.ViewModels
@model List<RequestViewModel>
@{
ViewData["Title"] = "Requests";
}
<div class="text-center">
<h1 class="display-4">Заявки</h1>
</div>
<div class="text-center">
@{
<p>
<a asp-action="CreateRequest">Создать заявку</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.DateRequest)
</td>
<td>
@Html.DisplayFor(modelItem => item.AssemblyId)
</td>
<td>
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Удалить</a>
</td>
</tr>
}
</tbody>
</table>
}
</div>