Case_accounting/CaseAccounting/CaseAccountingProviderView/Views/Home/Deals.cshtml

65 lines
1.5 KiB
Plaintext
Raw Normal View History

@{
ViewData["Title"] = "Договора";
}
<div class="text-center">
<h1 class="display-4">Договора</h1>
</div>
<div class="text-center">
@{
if (ViewBag.Deals == null)
{
<h3 class="display-4">Войдите в аккаунт</h3>
return;
}
<div>
<a class="btn btn-success" asp-controller="Deal" asp-action="Create">Создать дело</a>
</div>
<table class="table">
<thead>
<tr>
<th>
Предмет договора
</th>
<th>
Обязанности
</th>
<th>
Дата составления
</th>
<th>
Изменить запись
</th>
<th>
Удалить запись
</th>
</tr>
</thead>
<tbody>
@foreach (var item in ViewBag.Deals)
{
<tr class="d-table-row">
<td>
@item.Subject
</td>
<td>
@item.Responsibilities
</td>
<td>
@item.Date.ToString("yyyy-MM-dd")
</td>
<td>
<a id="update-button-@item.Id" class="btn btn-warning" asp-controller="Deal" asp-action="Update" asp-route-id="@item.Id">Изменить</a>
</td>
<td>
<a id="remove-button-@item.Id" class="btn btn-danger remove-btn" data-id="@item.Id">Удалить</a>
</td>
</tr>
}
</tbody>
</table>
}
</div>
<script src="~/js/deal/deals.js" asp-append-version="true"></script>