Остался отчет
This commit is contained in:
parent
2e505618bc
commit
2a7782eea0
@ -120,5 +120,17 @@ namespace HardwareShopBusinessLogic.BusinessLogics.Storekeeper
|
||||
{
|
||||
return StatusUpdate(model, OrderStatus.Выдан);
|
||||
}
|
||||
|
||||
public bool Delete(OrderBindingModel model)
|
||||
{
|
||||
CheckModel(model, false);
|
||||
_logger.LogInformation("Delete. Id: {Id}", model.Id);
|
||||
if (_orderStorage.Delete(model) == null)
|
||||
{
|
||||
_logger.LogWarning("Delete operation failed");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,11 +10,16 @@ namespace HardwareShopClientApp.Controllers
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
public IActionResult CreateOrder()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
public IActionResult CreateGood()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
public IActionResult LinkBuilds()
|
||||
{
|
||||
return View();
|
||||
|
@ -10,29 +10,24 @@
|
||||
|
||||
|
||||
<div class="text-center">
|
||||
@{
|
||||
<p>
|
||||
<a asp-action="CreateComponent" class="mx-2">Создать комплектующее</a>
|
||||
<a asp-action="Components" class="mx-2">Изменить комплектующее</a>
|
||||
<a asp-action="Components" class="mx-2">Удалить комплектующее</a>
|
||||
<a asp-action="LinkBuilds" class="mx-2">Привязка сборок</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Название
|
||||
</th>
|
||||
<th>
|
||||
Цена
|
||||
</th>
|
||||
<th>
|
||||
Сборки
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
<p>
|
||||
<a asp-action="CreateComponent" class="mx-2">Создать комплектующее</a>
|
||||
<a href="#" class="mx-2">Изменить комплектующее</a>
|
||||
<a href="#" class="mx-2">Удалить комплектующее</a>
|
||||
<a asp-action="LinkBuilds" class="mx-2">Привязка сборок</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Название
|
||||
</th>
|
||||
<th>
|
||||
Цена
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label class="form-label">Стоимость</label>
|
||||
<input type="number" step="0.01" class="form-control" name="cost">
|
||||
<input type="number" step="0.01" class="form-control" name="cost" min="0.01">
|
||||
</div>
|
||||
<div class="col-sm-2 d-flex justify-content-evenly align-items-baseline">
|
||||
<button type="submit" class="btn btn-primary mt-3 px-4">Подтвердить</button>
|
||||
|
@ -14,13 +14,24 @@
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label class="form-label">Цена</label>
|
||||
<input type="number" step="0.01" class="form-control" name="price" readonly>
|
||||
<input type="number" step="0.01" class="form-control" name="price" readonly min="0.01">
|
||||
</div>
|
||||
<h1 class="display-6">Добавление комплектующих</h1>
|
||||
<div class="col-sm-3">
|
||||
<label class="form-label">Комплектующее</label>
|
||||
<select class="form-control" name="component"></select>
|
||||
<label class="form-label">Количество</label>
|
||||
<input type="number" class="form-control" name="count" min="1">
|
||||
<div class="d-flex justify-content-center">
|
||||
<button type="submit" class="btn btn-primary mt-3 px-4">Добавить</button>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="name" scope="col">Комплектующее</th>
|
||||
<th id="cost" scope="col">Стоимость</th>
|
||||
<th id="count" scope="col">Количество</th>
|
||||
<th id="sum" scope="col">Сумма</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label class="form-label">Количество</label>
|
||||
<input type="number" class="form-control" name="count">
|
||||
<input type="number" class="form-control" name="count" min="1">
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label class="form-label">Сумма</label>
|
||||
|
@ -9,28 +9,26 @@
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
@{
|
||||
<p>
|
||||
<a asp-action="CreateGood" class="mx-2">Создать товар</a>
|
||||
<a asp-action="Goods" class="mx-2">Изменить товар</a>
|
||||
<a asp-action="Goods" class="mx-2">Удалить товар</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Название
|
||||
</th>
|
||||
<th>
|
||||
Цена
|
||||
</th>
|
||||
<th>
|
||||
Комплектующие
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
<p>
|
||||
<a asp-action="CreateGood" class="mx-2">Создать товар</a>
|
||||
<a asp-action="Goods" class="mx-2">Изменить товар</a>
|
||||
<a asp-action="Goods" class="mx-2">Удалить товар</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Название
|
||||
</th>
|
||||
<th>
|
||||
Цена
|
||||
</th>
|
||||
<th>
|
||||
Комплектующие
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
@ -12,12 +12,20 @@
|
||||
<div class="col-sm-3">
|
||||
<label class="form-label">Комплектующее</label>
|
||||
<select class="form-control" name="component"></select>
|
||||
<label class="form-label">Сборка</label>
|
||||
<select class="form-control" name="build"></select>
|
||||
<label class="form-label">Количество</label>
|
||||
<input type="number" class="form-control" name="count" min="1">
|
||||
<div class="d-flex justify-content-center">
|
||||
<button type="submit" class="btn btn-primary mt-3 px-4">Привязать</button>
|
||||
</div>
|
||||
</div>
|
||||
<h1 class="display-6">Привязанные сборки</h1>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="name" scope="col">Сборка</th>
|
||||
<th id="price" scope="col">Цена</th>
|
||||
<th id="price" scope="col">Количество</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -5,5 +5,23 @@
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Список сборок</h1>
|
||||
</div>
|
||||
<h1 class="display-4">Получение списка сборок</h1>
|
||||
</div>
|
||||
|
||||
<form method="post" class="d-flex flex-column align-items-center">
|
||||
<h1 class="display-6">Выбранные товары</h1>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Товар
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col-sm-2 d-flex justify-content-evenly align-items-baseline">
|
||||
<button type="submit" class="btn btn-primary mt-3 px-4">Подтвердить</button>
|
||||
</div>
|
||||
</form>
|
@ -4,6 +4,47 @@
|
||||
Layout = "~/Views/Shared/_LayoutStorekeeper.cshtml";
|
||||
}
|
||||
|
||||
<div>
|
||||
привет, мы в заказах
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Заказы</h1>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="text-center">
|
||||
<p>
|
||||
<a asp-action="CreateOrder" class="mx-2">Создать заказ</a>
|
||||
<a href="#" class="mx-2">Удалить заказ</a>
|
||||
<a href="#" class="mx-2">Принят</a>
|
||||
<a href="#" class="mx-2">Выполняется</a>
|
||||
<a href="#" class="mx-2">Готов</a>
|
||||
<a href="#" class="mx-2">Выдан</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Номер
|
||||
</th>
|
||||
<th>
|
||||
Товар
|
||||
</th>
|
||||
<th>
|
||||
Количество
|
||||
</th>
|
||||
<th>
|
||||
Сумма
|
||||
</th>
|
||||
<th>
|
||||
Статус
|
||||
</th>
|
||||
<th>
|
||||
Дата создания
|
||||
</th>
|
||||
<th>
|
||||
Дата выполнения
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
@ -11,5 +11,6 @@ namespace HardwareShopContracts.BuisnessLogicsContracts
|
||||
bool TakeOrderInWork(OrderBindingModel model);
|
||||
bool FinishOrder(OrderBindingModel model);
|
||||
bool DeliveryOrder(OrderBindingModel model);
|
||||
bool Delete(OrderBindingModel model);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user