Почти доделал
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
@model IEnumerable<ComputerStoreContracts.ViewModels.ProductViewModel>
|
||||
|
||||
<div class="container mt-5">
|
||||
<h4>Готовые товары</h4>
|
||||
<a asp-action="Create" class="btn btn-success mb-3">Создать товар</a>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Название</th>
|
||||
<th>Цена</th>
|
||||
<th>Действия</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.Id</td>
|
||||
<td>@item.Name</td>
|
||||
<td>@item.Price</td>
|
||||
<td>
|
||||
<a asp-action="Link" asp-route-id="@item.Id" class="btn btn-primary btn-sm">Связать с Партией товаров</a>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-primary btn-sm">Редактировать</a>
|
||||
<form asp-action="Delete" method="post" style="display:inline">
|
||||
<input type="hidden" name="id" value="@item.Id" />
|
||||
<button type="submit" class="btn btn-danger btn-sm">Удалить</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
Reference in New Issue
Block a user