Coursach/Course/ImplementerApp/Views/Home/ProductMachineAdd.cshtml

31 lines
937 B
Plaintext
Raw Normal View History

@using Contracts.ViewModels
@model List<MachineViewModel>
@{
ViewData["Title"] = "Product-Add-Machine";
}
<div class="text-center">
<h1 class="display-4">Изделие - @ViewBag.Product</h1>
</div>
<div class="container">
<h1>Список изделий</h1>
<div class="row">
@foreach (var machine in Model)
{
<div class="col-md-4">
<div class="card mb-4">
<div class="card-body">
<h5 class="card-title">@machine.Title</h5>
<form asp-controller="Cart" asp-action="AddToCart" method="post">
<input type="hidden" name="productId" value="@machine.Id" />
<button type="submit" class="btn btn-primary">Выбрать</button>
</form>
</div>
</div>
</div>
}
</div>
</div>