Coursach/Course/ImplementerApp/Views/Home/ProductMachineAdd.cshtml
2024-05-26 23:23:24 +04:00

32 lines
1.0 KiB
Plaintext

@using Contracts.ViewModels
@model List<MachineViewModel>
@{
ViewData["Title"] = "Product-Add-Machine";
}
<div class="text-center">
<h1 class="display-4">Изделие - @ViewBag.Product.Name</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-action="ProductMachineAdd" method="post">
<input type="hidden" name="productId" value="@ViewBag.Product.Id"/>
<input type="hidden" name="machineId" value="@machine.Id" />
<button type="submit" class="btn btn-primary">Выбрать</button>
</form>
</div>
</div>
</div>
}
</div>
</div>