69 lines
1.4 KiB
Plaintext
Raw Normal View History

2024-08-22 20:40:32 +04:00
@using ServiceStationContracts.ViewModels
@{
2024-04-30 21:22:23 +03:00
ViewData["Title"] = "Home Page";
}
2024-08-22 20:40:32 +04:00
@model List<WorkViewModel>
2024-04-30 21:22:23 +03:00
<div class="text-center">
<h1 class="display-4">Список работ</h1>
</div>
<div class="text-center">
@{
if (Model == null) {
2024-08-22 20:40:32 +04:00
<h3 class="display-4">Авторизируйтесь</h3>
2024-04-30 21:22:23 +03:00
return;
}
2024-08-22 20:40:32 +04:00
<p>
<a asp-action="CreateWork">Создать работу</a>
</p>
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Дата работы
</th>
<th>
Стоимость работы
</th>
<th>
Номер задания
</th>
<th>
2024-08-23 19:44:26 +04:00
Задание
2024-08-22 20:40:32 +04:00
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<th>
@Html.DisplayFor(modelItem => item.Id)
</th>
<th>
@Html.DisplayFor(modelItem => item.Date)
</th>
<th>
@Html.DisplayFor(modelItem => item.Price)
</th>
<th>
2024-08-23 19:44:26 +04:00
@Html.DisplayFor(modelItem => item.TaskByWorkId)
2024-08-22 20:40:32 +04:00
</th>
<th>
@Html.DisplayFor(modelItem => item.TaskName)
</th>
2024-08-23 19:44:26 +04:00
<td>
<a class="btn btn-primary btn-sm" asp-action="EditWork" style="background-color:orange" asp-route-ID=" @item.Id">Изменить</a>
<a class="btn btn-primary btn-sm" asp-action="DeleteWork" style="background-color:red;" asp-route-ID="@item.Id">Удалить</a>
</td>
2024-08-22 20:40:32 +04:00
</tr>
}
</tbody>
</table>
2024-04-30 21:22:23 +03:00
}
2024-08-22 20:40:32 +04:00
</div>