46 lines
1.9 KiB
Plaintext

@using ServiceStationContracts.ViewModels
@model List<SparePartViewModel>
@{
ViewData["Title"] = "CreateRepair";
}
<form method="post">
<div class="w-25 container justify-content-center align-items-center">
<div class="form-group py-2">
<label>Название ремонта</label>
<input type="text" id="repairName" placeholder="Введите название ремонта" name="repairName" class="form-control" />
</div>
<div class="form-group py-2">
<label>Стоимость ремонта</label>
<input type="number" min="100" step="100" id="repairPrice" placeholder="Введите стоимость ремонта" name="repairPrice" class="form-control" />
</div>
<table class="table">
<thead>
<tr>
<th scope="col">№</th>
<th scope="col">Название запчасти</th>
<th scope="col">цена запчасти</th>
</tr>
</thead>
<tbody>
@foreach (var sparepart in Model)
{
<tr>
<td class="align-middle">
<div class="form-check">
<input type="checkbox" class="form-check-input" name="sparepart[]" value="@sparepart.Id" id="@sparepart.Id">
</div>
</td>
<td class="align-middle">@Html.DisplayFor(modelItem => sparepart.SparePartName)</td>
<td class="align-middle">@Html.DisplayFor(modelItem => sparepart.SparePartPrice)</td>
</tr>
}
</tbody>
</table>
<br>
<div class="text-center pb-3">
<input type="submit" value="Сохранить" class="btn btn-outline-dark text-center w-100" />
</div>
</div>
</form>