немного апи
This commit is contained in:
parent
2386fa98e7
commit
a230039ed0
49
git/JurasicZoo/ZooClientApp/Views/Home/CreateRoute.cshtml
Normal file
49
git/JurasicZoo/ZooClientApp/Views/Home/CreateRoute.cshtml
Normal file
@ -0,0 +1,49 @@
|
||||
@{
|
||||
ViewData["Title"] = "CreateRoute";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Создание маршрута</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Название:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Заповедники:</div>
|
||||
<div class="col-8">
|
||||
<select name="pets" class="form-control" multiple size="6" id="preserves">
|
||||
@foreach (var preserve in ViewBag.Preserves)
|
||||
{
|
||||
<option value="@preserve.Id">@preserve.PreserveName</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Дата:</div>
|
||||
<div class="col-8">
|
||||
<input type="datetime-local" id="datetime" name="datetime" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4">
|
||||
<input type="submit" value="Создать" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@section Scripts
|
||||
{
|
||||
<script>
|
||||
$('#drug').on('change', function () {
|
||||
check();
|
||||
});
|
||||
$('#count').on('change', function () {
|
||||
check();
|
||||
});
|
||||
</script>
|
||||
}
|
@ -4,72 +4,14 @@
|
||||
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="Create">Создать Маршруты</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.RouteName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem =>
|
||||
item.DateStart)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem =>
|
||||
item.DateFinish)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem =>
|
||||
item.RoutePrice)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem =>
|
||||
item.Status)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
<h1 class="display-4">Приложение "Зоопарк "Юрский период". Клиент"</h1>
|
||||
<div class="list-group">
|
||||
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="IndexDoctorVisit">Посещения врача</a>
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="IndexDrugPurchase">Покупки лекарств</a>
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Политика</a>
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Reports">Отчеты</a>
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Enter">Вход</a>
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Register">Регистрация</a>
|
||||
</div>
|
||||
</div>
|
56
git/JurasicZoo/ZooClientApp/Views/Home/IndexRoute.cshtml
Normal file
56
git/JurasicZoo/ZooClientApp/Views/Home/IndexRoute.cshtml
Normal file
@ -0,0 +1,56 @@
|
||||
@using ZooContracts.ViewModels
|
||||
|
||||
@model List<RouteViewModel>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Routes";
|
||||
}
|
||||
|
||||
<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="CreateRoute">Создать маршрут</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.RoutePrice)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DateStart)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user