+ @{
+ if (Model == null)
+ {
+
Авторизируйтесь
+ return;
+ }
+
+ // !!!ДОБАВИТЬ ЭТИ МЕТОДЫ В HOME КОНТРОЛЛЕР И ТАКИЕ ЖЕ СТРАНИЦЫ
+
+ Создать заявку
+ Связать заявку со сборкой
+ Обновить заявку
+ Удалить заявку
+
+
+
+
+
+ Номер
+ |
+
+ Дата оформления
+ |
+
+ ФИО клиента-заявителя
+ |
+
+ Название сборки
+ |
+
+ Стоимость сборки
+ |
+
+
+
+ @foreach (var item in Model)
+ {
+
+
+ @Html.DisplayFor(modelItem => item.Id)
+ |
+
+ @Html.DisplayFor(modelItem => item.DateRequest)
+ |
+
+ @Html.DisplayFor(modelItem => item.ClientFIO)
+ |
+
+ @Html.DisplayFor(modelItem => item.Assembly.AssemblyName)
+ |
+
+ @Html.DisplayFor(modelItem => item.Assembly.Price)
+ |
+
+ }
+
+
+ }
+
+
+
diff --git a/ComputerShopImplementerApp/Views/Home/Shipments.cshtml b/ComputerShopImplementerApp/Views/Home/Shipments.cshtml
new file mode 100644
index 0000000..544e6fe
--- /dev/null
+++ b/ComputerShopImplementerApp/Views/Home/Shipments.cshtml
@@ -0,0 +1,62 @@
+@using ComputerShopContracts.ViewModels
+
+@model List
+@* !!!ТУТ СКОРЕЕ ВСЕГО НАДО ПОМЕНЯТЬ *@
+@{
+ ViewData["Title"] = "Shipments";
+}
+
+
+
Партии товаров
+
+
+
+
+ @{
+ if (Model == null)
+ {
+
Авторизируйтесь
+ return;
+ }
+
+ // !!!ДОБАВИТЬ ЭТИ МЕТОДЫ В HOME КОНТРОЛЛЕР И ТАКИЕ ЖЕ СТРАНИЦЫ
+
+ Создать партию товаров
+ Обновить партию товаров
+ Удалить партию товаров
+
+
+
+
+
+ Номер
+ |
+
+ Поставщик
+ |
+
+ Дата поставки
+ |
+
+
+
+ @foreach (var item in Model)
+ {
+
+
+ @Html.DisplayFor(modelItem => item.Id)
+ |
+
+ @Html.DisplayFor(modelItem => item.ProviderName)
+ |
+
+ @Html.DisplayFor(modelItem => item.DateShipment)
+ |
+
+ }
+
+
+ }
+
+
+
diff --git a/ComputerShopImplementerApp/Views/Home/UpdateOrder.cshtml b/ComputerShopImplementerApp/Views/Home/UpdateOrder.cshtml
new file mode 100644
index 0000000..721ad72
--- /dev/null
+++ b/ComputerShopImplementerApp/Views/Home/UpdateOrder.cshtml
@@ -0,0 +1,107 @@
+@using ComputerShopDataModels.Enums;
+@{
+ ViewData["Title"] = "Update order";
+}
+
+
+
+
+
diff --git a/ComputerShopImplementerApp/Views/Home/UpdateRequest.cshtml b/ComputerShopImplementerApp/Views/Home/UpdateRequest.cshtml
new file mode 100644
index 0000000..c5e524c
--- /dev/null
+++ b/ComputerShopImplementerApp/Views/Home/UpdateRequest.cshtml
@@ -0,0 +1,96 @@
+@{
+ ViewData["Title"] = "Update request";
+}
+
+
Изменение заявки
+
+
+
+
+
diff --git a/ComputerShopImplementerApp/Views/Home/UpdateShipment.cshtml b/ComputerShopImplementerApp/Views/Home/UpdateShipment.cshtml
new file mode 100644
index 0000000..7517363
--- /dev/null
+++ b/ComputerShopImplementerApp/Views/Home/UpdateShipment.cshtml
@@ -0,0 +1,103 @@
+@{
+ ViewData["Title"] = "Update shipment";
+}
+
+
Изменение партии товаров
+
+
+
+
+
\ No newline at end of file
diff --git a/ComputerShopImplementerApp/Views/Shared/_Layout.cshtml b/ComputerShopImplementerApp/Views/Shared/_Layout.cshtml
index c6dc9c6..415e4fa 100644
--- a/ComputerShopImplementerApp/Views/Shared/_Layout.cshtml
+++ b/ComputerShopImplementerApp/Views/Shared/_Layout.cshtml
@@ -17,10 +17,20 @@
+ @* !!!Тут изменять asp-action и мб удалить "Личные данные" *@
-
- Заказы
+ Главная
+
+ -
+ Заказы
+
+ -
+ Партии товаров
+
+ -
+ Заявки
-
Личные данные
diff --git a/ComputerShopRestApi/ComputerShopRestApi.csproj b/ComputerShopRestApi/ComputerShopRestApi.csproj
index 9339130..e8029d3 100644
--- a/ComputerShopRestApi/ComputerShopRestApi.csproj
+++ b/ComputerShopRestApi/ComputerShopRestApi.csproj
@@ -19,6 +19,7 @@
+
diff --git a/ComputerShopRestApi/Controllers/OrderController.cs b/ComputerShopRestApi/Controllers/OrderController.cs
index c6ded8f..cd4014a 100644
--- a/ComputerShopRestApi/Controllers/OrderController.cs
+++ b/ComputerShopRestApi/Controllers/OrderController.cs
@@ -3,6 +3,7 @@ using ComputerShopContracts.BusinessLogicContracts;
using ComputerShopContracts.SearchModels;
using ComputerShopContracts.ViewModels;
using ComputerShopDatabaseImplement.Models;
+using ComputerShopDataModels.Enums;
using Microsoft.AspNetCore.Mvc;
namespace ComputerShopRestApi.Controllers
@@ -57,6 +58,16 @@ namespace ComputerShopRestApi.Controllers
}
}
+ //МБ ИЗМЕНИТЬ IEnumerable на List
+ //!!!ПОТОМ УДАЛИТЬ
+ //[HttpGet]
+ //public IEnumerable GetOrderStatuses()
+ //{
+ // // Получаем все значения из перечисления и возвращаем как список строк
+ // var allStatuses = Enum.GetValues(typeof(OrderStatus)).Cast().Select(status => status.ToString());
+ // return allStatuses;
+ //}
+
[HttpPost]
public void CreateOrder(OrderBindingModel model)
{
@@ -84,7 +95,8 @@ namespace ComputerShopRestApi.Controllers
}
}
- [HttpDelete]
+ //[HttpDelete]
+ [HttpPost]
public void DeleteOrder(OrderBindingModel model)
{
try
diff --git a/ComputerShopRestApi/Controllers/RequestController.cs b/ComputerShopRestApi/Controllers/RequestController.cs
index 4508d30..da3e4da 100644
--- a/ComputerShopRestApi/Controllers/RequestController.cs
+++ b/ComputerShopRestApi/Controllers/RequestController.cs
@@ -102,7 +102,7 @@ namespace ComputerShopRestApi.Controllers
}
}
- [HttpDelete]
+ [HttpPost]
public void DeleteRequest(RequestBindingModel model)
{
try
diff --git a/ComputerShopRestApi/Controllers/ShipmentController.cs b/ComputerShopRestApi/Controllers/ShipmentController.cs
index 2e4cc9f..623aa9d 100644
--- a/ComputerShopRestApi/Controllers/ShipmentController.cs
+++ b/ComputerShopRestApi/Controllers/ShipmentController.cs
@@ -87,7 +87,7 @@ namespace ComputerShopRestApi.Controllers
}
}
- [HttpDelete]
+ [HttpPost]
public void DeleteShipment(ShipmentBindingModel model)
{
try
diff --git a/ComputerShopRestApi/Program.cs b/ComputerShopRestApi/Program.cs
index 7c64ca5..0b621f8 100644
--- a/ComputerShopRestApi/Program.cs
+++ b/ComputerShopRestApi/Program.cs
@@ -2,12 +2,18 @@ using ComputerShopBusinessLogic.BusinessLogics;
using ComputerShopContracts.BusinessLogicContracts;
using ComputerShopContracts.StorageContracts;
using ComputerShopDatabaseImplement.Implements;
+using ComputerShopDatabaseImplement.Models;
+using ComputerShopDataModels.Models;
using Microsoft.OpenApi.Models;
var Builder = WebApplication.CreateBuilder(args);
Builder.Logging.SetMinimumLevel(LogLevel.Trace);
Builder.Logging.AddLog4Net("log4net.config");
+//!!!
+//Builder.Services.AddTransient();
+//Builder.Services.AddTransient();
+//Builder.Services.AddTransient();
Builder.Services.AddTransient();
Builder.Services.AddTransient();