Create views for client app
This commit is contained in:
parent
c24ef8e895
commit
aa93c93775
@ -0,0 +1,24 @@
|
||||
@{
|
||||
ViewData["Title"] = "ClientCreate";
|
||||
}
|
||||
|
||||
<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="phonenumber" /></div>
|
||||
</div>
|
||||
<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-8"></div>
|
||||
<div class="col-4">
|
||||
<input type="submit" value="Регистрация"
|
||||
class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1,47 @@
|
||||
@using CarShowroomDataModels.Views
|
||||
@{
|
||||
ViewData["Title"] = "ClientUpdate";
|
||||
}
|
||||
<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="phonenumber" /></div>
|
||||
</div>
|
||||
<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-8"></div>
|
||||
<div class="col-4">
|
||||
<input type="submit" value="C"
|
||||
class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts
|
||||
{
|
||||
<script>
|
||||
function check() {
|
||||
var client = $('#client').val();
|
||||
if (client) {
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
url: "/Home/GetClient",
|
||||
data: { clientId: client },
|
||||
success: function (result) {
|
||||
$('#number').val(result.item1.number);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
check();
|
||||
$('#client').on('change', function () {
|
||||
check();
|
||||
});
|
||||
</script>
|
||||
}
|
49
CarShowroom/CarShowroomManagerApp/Views/Home/Clients.cshtml
Normal file
49
CarShowroom/CarShowroomManagerApp/Views/Home/Clients.cshtml
Normal file
@ -0,0 +1,49 @@
|
||||
@using CarShowroomDataModels.Views
|
||||
@model List<ClientView>
|
||||
@{
|
||||
ViewData["Title"] = "Clients";
|
||||
}
|
||||
<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="ClientCreate">Создать перевод</a>
|
||||
<a asp-action="ClientUpdate">Обновить перевод</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.PhoneNumber)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
</div>
|
20
CarShowroom/CarShowroomManagerApp/Views/Home/Enter.cshtml
Normal file
20
CarShowroom/CarShowroomManagerApp/Views/Home/Enter.cshtml
Normal file
@ -0,0 +1,20 @@
|
||||
@{
|
||||
ViewData["Title"] = "Enter";
|
||||
}
|
||||
<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="login" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Пароль:</div>
|
||||
<div class="col-8"><input type="password" name="password" /></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>
|
@ -1,8 +1,54 @@
|
||||
@{
|
||||
ViewData["Title"] = "Home Page";
|
||||
@using CarShowroomDataModels.Views
|
||||
@model List<SaleView>
|
||||
@{
|
||||
ViewData["Title"] = "Sales";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Welcome</h1>
|
||||
<p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
|
||||
<h1 class="display-4">Продажи</h1>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
@{
|
||||
if (Model == null)
|
||||
{
|
||||
<h3 class="display-4">Авторизируйтесь</h3>
|
||||
return;
|
||||
}
|
||||
<p>
|
||||
<a asp-action="SaleCreate">Создать продажу</a>
|
||||
<a asp-action="SaleDelete">Удалить продажу</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<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.Cost)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem =>
|
||||
item.EmployeeName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem =>
|
||||
item.ClientName)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
</div>
|
||||
|
@ -1,6 +1,31 @@
|
||||
@{
|
||||
@using CarShowroomDataModels.Views
|
||||
@model EmployeeView
|
||||
@{
|
||||
ViewData["Title"] = "Privacy Policy";
|
||||
}
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
|
||||
<p>Use this page to detail your site's privacy policy.</p>
|
||||
<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="login"
|
||||
value="@Model.Email" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Пароль:</div>
|
||||
<div class="col-8">
|
||||
<input type="password" name="password"
|
||||
value="@Model.Password" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">ФИО:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="fio"
|
||||
value="@Model.Name" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -0,0 +1,42 @@
|
||||
@{
|
||||
ViewData["Title"] = "SaleCreate";
|
||||
}
|
||||
<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="number" name="sum" id="sum" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Автомобили:</div>
|
||||
<div class="col-8">
|
||||
<select name="cars" id="cars" class="form-control" multiple size="5">
|
||||
@foreach (var car in ViewBag.Cars)
|
||||
{
|
||||
<option value="@car.Id">@car.Name</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Услуги:</div>
|
||||
<div class="col-8">
|
||||
<select name="services" id="services" class="form-control" multiple size="5">
|
||||
@foreach (var service in ViewBag.Services)
|
||||
{
|
||||
<option value="@service.Id">@service.Name</option>
|
||||
}
|
||||
</select>
|
||||
</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>
|
@ -0,0 +1,18 @@
|
||||
@{
|
||||
ViewData["Title"] = "SaleDelete";
|
||||
}
|
||||
<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">
|
||||
<select id="sale" name="sale" class="form-control" asp-items="@(new SelectList(@ViewBag.Sales, "Id", "Id"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4"></div>
|
||||
<div class="col-8"><input type="submit" value="Удалить" class="btn btn-danger" /></div>
|
||||
</div>
|
||||
</form>
|
@ -18,12 +18,18 @@
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
|
||||
<ul class="navbar-nav flex-grow-1">
|
||||
<ul class="navbar-nav flex-grow-1">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Enter">Вход</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Продажи</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Clients">Клиенты</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Личный кабинет</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user