PIbd-21_CourseWork_Polyclin.../Polyclinic/PolyclinicWebView/Views/Home/Medicaments.cshtml

55 lines
1.5 KiB
Plaintext

@using PolyclinicContracts.ViewModels
@model List<MedicamentViewModel>
@{
ViewData["Title"] = "Medicaments";
}
<div class="text-center">
<h1 class="display-4">Препараты</h1>
</div>
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Авторизируйтесь</h3>
return;
}
<p>
<a asp-action="CreateMedicament">Создать препарат</a>
</p>
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Название препарата
</th>
<th>
Комментарий
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem =>
item.Id)
</td>
<td>
@Html.DisplayFor(modelItem =>
item.Name)
</td>
<td>
@Html.DisplayFor(modelItem =>
item.Comment)
</td>
</tr>
}
</tbody>
</table>
}
</div>