Исполнитель: доделал вьюшки

This commit is contained in:
Yunusov_Niyaz 2024-05-01 18:07:51 +04:00
parent c2317aa6de
commit 717b2a3f2a
3 changed files with 132 additions and 1 deletions

View File

@ -0,0 +1,75 @@
@using VeterinaryContracts.ViewModels
@model List<PurchaseViewModel>
@{
ViewData["Title"] = "Home Page";
}
<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="CreateMedicine">Создать покупку</a>
</p>
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Лекарство
</th>
<th>
Количество
</th>
<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.DrugId)
</td>
<td>
@Html.DisplayFor(modelItem =>
item.Count)
</td>
<td>
@Html.DisplayFor(modelItem =>
item.Sum)
</td>
<td>
@Html.DisplayFor(modelItem =>
item.DateCreate)
</td>
<td>
@Html.DisplayFor(modelItem =>
item.DateImplement)
</td>
</tr>
}
</tbody>
</table>
}
</div>

View File

@ -7,7 +7,7 @@
</div>
<form method="post">
<div class="row">
<div class="col-4">Login:</div>
<div class="col-4">Логин:</div>
<div class="col-8"><input type="text" name="login" /></div>
</div>
<div class="row">

View File

@ -0,0 +1,56 @@
@using VeterinaryContracts.ViewModels
@model List<VisitViewModel>
@{
ViewData["Title"] = "Home Page";
}
<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="CreateMedicine">Создать визит</a>
<a asp-action="UpdateMedicine">Обновить визит</a>
<a asp-action="DeleteMedicine">Удалить визит</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.VisitName)
</td>
<td>
@Html.DisplayFor(modelItem =>
item.DateVisit)
</td>
</tr>
}
</tbody>
</table>
}
</div>