47 lines
1.8 KiB
Plaintext

@using ServiceStationContracts.ViewModels
@model List<CarViewModel>
@{
ViewData["Title"] = "CreateDefect";
}
<form method="post">
<div class="w-50 container justify-content-center align-items-center">
<div class="form-group py-2">
<label>Тип неисправности</label>
<input type="text" id="defectType" placeholder="Введите тип неисправности" name="defectType" class="form-control" />
</div>
<div class="form-group py-2">
<label>Цена неисправности</label>
<input type="number" min="100" step="100" id="defectPrice" placeholder="Введите цену" name="defectPrice" 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 car in Model)
{
<tr>
<td class="align-middle">
<div class="form-check">
<input type="checkbox" class="form-check-input" name="car[]" value="@car.Id" id="@car.Id">
</div>
</td>
<td class="align-middle">@Html.DisplayFor(modelItem => car.CarNumber)</td>
<td class="align-middle">@Html.DisplayFor(modelItem => car.CarBrand)</td>
</tr>
}
</tbody>
</table>
<br>
<div>
<input type="submit" value="Сохранить" class="btn btn-secondary text-center" />
</div>
</div>
</form>