54 lines
2.0 KiB
Plaintext
54 lines
2.0 KiB
Plaintext
@using ServiceStationContracts.ViewModels;
|
||
@using ServiceStationDataModels.Models;
|
||
|
||
@{
|
||
ViewData["Title"] = "AddCarToTechnicalWork";
|
||
}
|
||
|
||
@model Tuple<List<TechnicalWorkViewModel>, List<CarViewModel>>
|
||
|
||
<div class="container">
|
||
<h2>Добавление машин к ТО:</h2>
|
||
<form method="post">
|
||
<div class="form-group">
|
||
<label for="technicalWork">Выберите ТО</label>
|
||
<select id="technicalWork" name="technicalWork" class="form-control">
|
||
@foreach (var technicalWork in Model.Item1)
|
||
{
|
||
<option value="@technicalWork.Id">@Html.DisplayFor(modelItem => technicalWork.WorkType)</option>
|
||
}
|
||
</select>
|
||
</div>
|
||
<div class="form-group">
|
||
<label for="car">Выберите машины</label>
|
||
<table class="table mb-0">
|
||
<thead>
|
||
<tr>
|
||
<th scope="col"></th>
|
||
<th scope="col">Номер</th>
|
||
<th scope="col">Марка</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@foreach (var car in Model.Item2)
|
||
{
|
||
<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>
|
||
</div>
|
||
<br>
|
||
<div>
|
||
<input type="submit" value="Добавить" class="btn btn-secondary" />
|
||
</div>
|
||
</form>
|
||
</div>
|