From 948d0515be9572f3ac627db8bc4de1343e58693c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A2=D0=B0=D0=B1=D0=B5=D0=B5=D0=B2=20=D0=90=D0=BB=D0=B5?= =?UTF-8?q?=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80?= Date: Sun, 21 Apr 2024 15:33:17 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=B2?= =?UTF-8?q?=20=D1=81=D0=BB=D0=BE=D0=B5=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D0=B5=D0=B9=20=D0=B8=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D0=BB=D0=BE=D1=8F=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=82=D1=80=D0=B0=D0=BA=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AccountingWarehouseProducts.sln | 6 +++++ ...ccountingWarehouseProductsContracts.csproj | 13 +++++++++ .../BindingModels/OrderBindingModel.cs | 20 ++++++++++++++ .../BindingModels/ProductBindingModel.cs | 22 +++++++++++++++ .../BindingModels/ShipmentBindingModel.cs | 22 +++++++++++++++ .../BindingModels/StandBindingModel.cs | 22 +++++++++++++++ .../BindingModels/SupplierBindingModel.cs | 20 ++++++++++++++ .../BindingModels/WarehouseBindingModel.cs | 22 +++++++++++++++ .../BusinessLogicsContracts/IOrderLogic.cs | 27 +++++++++++++++++++ .../BusinessLogicsContracts/IProductLogic.cs | 21 +++++++++++++++ .../BusinessLogicsContracts/IShipmentLogic.cs | 21 +++++++++++++++ .../BusinessLogicsContracts/IStandLogic.cs | 21 +++++++++++++++ .../BusinessLogicsContracts/ISupplierLogic.cs | 21 +++++++++++++++ .../IWarehouseLogic.cs | 21 +++++++++++++++ .../SearchModels/OrderSearchModel.cs | 13 +++++++++ .../SearchModels/ProductSearchModel.cs | 15 +++++++++++ .../SearchModels/ShipmentSearchModel.cs | 15 +++++++++++ .../SearchModels/StandSearchModel.cs | 13 +++++++++ .../SearchModels/SupplierSearchModel.cs | 15 +++++++++++ .../SearchModels/WarehouseSearchModel.cs | 15 +++++++++++ .../StoragesContracts/IOrderStorage.cs | 22 +++++++++++++++ .../StoragesContracts/IProductStorage.cs | 22 +++++++++++++++ .../StoragesContracts/IShipmentStorage.cs | 22 +++++++++++++++ .../StoragesContracts/IStandStorage.cs | 22 +++++++++++++++ .../StoragesContracts/ISupplierStorage.cs | 22 +++++++++++++++ .../StoragesContracts/IWarehouseStorage.cs | 22 +++++++++++++++ .../ViewModels/OrderViewModel.cs | 24 +++++++++++++++++ .../ViewModels/ProductViewModel.cs | 27 +++++++++++++++++++ .../ViewModels/ShipmentViewModel.cs | 27 +++++++++++++++++++ .../ViewModels/StandViewModel.cs | 26 ++++++++++++++++++ .../ViewModels/SupplierViewModel.cs | 24 +++++++++++++++++ .../ViewModels/WarehouseViewModel.cs | 26 ++++++++++++++++++ ...ovementProductStatus.cs => OrderStatus.cs} | 2 +- .../Models/IOrderModel.cs | 2 +- .../Models/IProductModel.cs | 2 +- .../Models/ISupplierModel.cs | 2 +- .../Models/IWarehouseModel.cs | 2 +- 37 files changed, 656 insertions(+), 5 deletions(-) create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/AccountingWarehouseProductsContracts.csproj create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/OrderBindingModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/ProductBindingModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/ShipmentBindingModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/StandBindingModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/SupplierBindingModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/WarehouseBindingModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IOrderLogic.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IProductLogic.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IShipmentLogic.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IStandLogic.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/ISupplierLogic.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IWarehouseLogic.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/OrderSearchModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/ProductSearchModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/ShipmentSearchModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/StandSearchModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/SupplierSearchModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/WarehouseSearchModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IOrderStorage.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IProductStorage.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IShipmentStorage.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IStandStorage.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/ISupplierStorage.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IWarehouseStorage.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/OrderViewModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/ProductViewModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/ShipmentViewModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/StandViewModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/SupplierViewModel.cs create mode 100644 AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/WarehouseViewModel.cs rename AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Enums/{MovementProductStatus.cs => OrderStatus.cs} (91%) diff --git a/AccountingWarehouseProducts/AccountingWarehouseProducts.sln b/AccountingWarehouseProducts/AccountingWarehouseProducts.sln index 4e03fba..e49f4b8 100644 --- a/AccountingWarehouseProducts/AccountingWarehouseProducts.sln +++ b/AccountingWarehouseProducts/AccountingWarehouseProducts.sln @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AccountingWarehouseProducts EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AccountingWarehouseProductsDataModels", "AccountingWarehouseProductsDataModels\AccountingWarehouseProductsDataModels.csproj", "{765B9DAD-2EB2-4C28-B6DD-4670807CB7DC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AccountingWarehouseProductsContracts", "AccountingWarehouseProductsContracts\AccountingWarehouseProductsContracts.csproj", "{4633456D-A979-41D6-9D0A-A6DAA6A17766}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +23,10 @@ Global {765B9DAD-2EB2-4C28-B6DD-4670807CB7DC}.Debug|Any CPU.Build.0 = Debug|Any CPU {765B9DAD-2EB2-4C28-B6DD-4670807CB7DC}.Release|Any CPU.ActiveCfg = Release|Any CPU {765B9DAD-2EB2-4C28-B6DD-4670807CB7DC}.Release|Any CPU.Build.0 = Release|Any CPU + {4633456D-A979-41D6-9D0A-A6DAA6A17766}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4633456D-A979-41D6-9D0A-A6DAA6A17766}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4633456D-A979-41D6-9D0A-A6DAA6A17766}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4633456D-A979-41D6-9D0A-A6DAA6A17766}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/AccountingWarehouseProductsContracts.csproj b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/AccountingWarehouseProductsContracts.csproj new file mode 100644 index 0000000..101c4e0 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/AccountingWarehouseProductsContracts.csproj @@ -0,0 +1,13 @@ + + + + net6.0 + enable + enable + + + + + + + diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/OrderBindingModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/OrderBindingModel.cs new file mode 100644 index 0000000..64d2bc9 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/OrderBindingModel.cs @@ -0,0 +1,20 @@ +using AccountingWarehouseProductsDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.BindingModels +{ + public class OrderBindingModel : IOrderModel + { + public int Id { get; set; } + + public DateTime? DateofOrder { get; set; } + + public AccountingWarehouseProductsDataModels.Enums.OrderStatus Status { get; set; } = AccountingWarehouseProductsDataModels.Enums.OrderStatus.Неизвестен; + + public Dictionary OrderProducts { get; set; } = new(); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/ProductBindingModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/ProductBindingModel.cs new file mode 100644 index 0000000..3f489de --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/ProductBindingModel.cs @@ -0,0 +1,22 @@ +using AccountingWarehouseProductsDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.BindingModels +{ + public class ProductBindingModel : IProductModel + { + public int Id { get; set; } + + public string ProductName { get; set; } = string.Empty; + + public double Cost { get; set; } + + public DateTime? ExpirationDate { get; set; } + + public string Category { get; set; } = string.Empty; + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/ShipmentBindingModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/ShipmentBindingModel.cs new file mode 100644 index 0000000..f1f5c2f --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/ShipmentBindingModel.cs @@ -0,0 +1,22 @@ +using AccountingWarehouseProductsDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.BindingModels +{ + public class ShipmentBindingModel : IShipmentModel + { + public int Id { get; set; } + + public DateTime ShipmentDate { get; set; } + + public int Count { get; set; } + + public string Recipient { get; set; } = string.Empty; + + public int OrderId { get; set; } + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/StandBindingModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/StandBindingModel.cs new file mode 100644 index 0000000..17c3ccb --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/StandBindingModel.cs @@ -0,0 +1,22 @@ +using AccountingWarehouseProductsDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.BindingModels +{ + public class StandBindingModel : IStandModel + { + public int Id { get; set; } + + public DateTime? DeliveryDate { get; set; } + + public int Count { get; set; } + + public int ProductId { get; set; } + + public int SupplierId { get; set; } + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/SupplierBindingModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/SupplierBindingModel.cs new file mode 100644 index 0000000..aa3967d --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/SupplierBindingModel.cs @@ -0,0 +1,20 @@ +using AccountingWarehouseProductsDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.BindingModels +{ + public class SupplierBindingModel : ISupplierModel + { + public int Id { get; set; } + + public string SupplierName { get; set; } = string.Empty; + + public string ContactPerson { get; set; } = string.Empty; + + public string Phone { get; set; } = string.Empty; + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/WarehouseBindingModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/WarehouseBindingModel.cs new file mode 100644 index 0000000..5e8ab26 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BindingModels/WarehouseBindingModel.cs @@ -0,0 +1,22 @@ +using AccountingWarehouseProductsDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.BindingModels +{ + public class WarehouseBindingModel : IWarehouseModel + { + public int Id { get; set; } + + public string WarehouseName { get; set; } = string.Empty; + + public string Address { get; set; } = string.Empty; + + public int Capacity { get; set; } + + public Dictionary WarehouseProducts { get; set; } = new(); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IOrderLogic.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IOrderLogic.cs new file mode 100644 index 0000000..47deeb7 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IOrderLogic.cs @@ -0,0 +1,27 @@ +using AccountingWarehouseProductsContracts.BindingModels; +using AccountingWarehouseProductsContracts.SearchModels; +using AccountingWarehouseProductsContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.BusinessLogicsContracts +{ + public interface IOrderLogic + { + List? ReadList(OrderSearchModel? model); + OrderViewModel? ReadElement(OrderSearchModel model); + + bool Create(OrderBindingModel model); + bool Update(OrderBindingModel model); + bool Delete(OrderBindingModel model); + bool OrderedOrder(OrderBindingModel model); + bool ComeOrder(OrderBindingModel model); + bool TakeOrder(OrderBindingModel model); + bool ArrangeOrder(OrderBindingModel model); + bool ChekOrder(OrderBindingModel model); + bool DeliverOrder(OrderBindingModel model); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IProductLogic.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IProductLogic.cs new file mode 100644 index 0000000..6543646 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IProductLogic.cs @@ -0,0 +1,21 @@ +using AccountingWarehouseProductsContracts.BindingModels; +using AccountingWarehouseProductsContracts.SearchModels; +using AccountingWarehouseProductsContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.BusinessLogicsContracts +{ + public interface IProductLogic + { + List? ReadList(ProductSearchModel? model); + ProductViewModel? ReadElement(ProductSearchModel model); + + bool Create(ProductBindingModel model); + bool Update(ProductBindingModel model); + bool Delete(ProductBindingModel model); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IShipmentLogic.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IShipmentLogic.cs new file mode 100644 index 0000000..b5908fa --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IShipmentLogic.cs @@ -0,0 +1,21 @@ +using AccountingWarehouseProductsContracts.BindingModels; +using AccountingWarehouseProductsContracts.SearchModels; +using AccountingWarehouseProductsContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.BusinessLogicsContracts +{ + public interface IShipmentLogic + { + List? ReadList(ShipmentSearchModel? model); + ShipmentViewModel? ReadElement(ShipmentSearchModel model); + + bool Create(ShipmentBindingModel model); + bool Update(ShipmentBindingModel model); + bool Delete(ShipmentBindingModel model); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IStandLogic.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IStandLogic.cs new file mode 100644 index 0000000..41b5743 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IStandLogic.cs @@ -0,0 +1,21 @@ +using AccountingWarehouseProductsContracts.BindingModels; +using AccountingWarehouseProductsContracts.SearchModels; +using AccountingWarehouseProductsContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.BusinessLogicsContracts +{ + public interface IStandLogic + { + List? ReadList(StandSearchModel? model); + StandViewModel? ReadElement(StandSearchModel model); + + bool Create(StandBindingModel model); + bool Update(StandBindingModel model); + bool Delete(StandBindingModel model); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/ISupplierLogic.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/ISupplierLogic.cs new file mode 100644 index 0000000..fd25ef9 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/ISupplierLogic.cs @@ -0,0 +1,21 @@ +using AccountingWarehouseProductsContracts.BindingModels; +using AccountingWarehouseProductsContracts.SearchModels; +using AccountingWarehouseProductsContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.BusinessLogicsContracts +{ + public interface ISupplierLogic + { + List? ReadList(SupplierSearchModel? model); + SupplierViewModel? ReadElement(SupplierSearchModel model); + + bool Create(SupplierBindingModel model); + bool Update(SupplierBindingModel model); + bool Delete(SupplierBindingModel model); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IWarehouseLogic.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IWarehouseLogic.cs new file mode 100644 index 0000000..fc4dc3f --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/BusinessLogicsContracts/IWarehouseLogic.cs @@ -0,0 +1,21 @@ +using AccountingWarehouseProductsContracts.BindingModels; +using AccountingWarehouseProductsContracts.SearchModels; +using AccountingWarehouseProductsContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.BusinessLogicsContracts +{ + public interface IWarehouseLogic + { + List? ReadList(WarehouseSearchModel? model); + WarehouseViewModel? ReadElement(WarehouseSearchModel model); + + bool Create(WarehouseBindingModel model); + bool Update(WarehouseBindingModel model); + bool Delete(WarehouseBindingModel model); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/OrderSearchModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/OrderSearchModel.cs new file mode 100644 index 0000000..580d4a4 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/OrderSearchModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.SearchModels +{ + public class OrderSearchModel + { + public int? Id { get; set; } + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/ProductSearchModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/ProductSearchModel.cs new file mode 100644 index 0000000..c316c7a --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/ProductSearchModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.SearchModels +{ + public class ProductSearchModel + { + public int? Id { get; set; } + + public string? ProductName { get; set; } + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/ShipmentSearchModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/ShipmentSearchModel.cs new file mode 100644 index 0000000..7b7561d --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/ShipmentSearchModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.SearchModels +{ + public class ShipmentSearchModel + { + public int? Id { get; set; } + + public string? Recipient { get; set; } + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/StandSearchModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/StandSearchModel.cs new file mode 100644 index 0000000..2497b91 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/StandSearchModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.SearchModels +{ + public class StandSearchModel + { + public int? Id { get; set; } + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/SupplierSearchModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/SupplierSearchModel.cs new file mode 100644 index 0000000..f5ba7d6 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/SupplierSearchModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.SearchModels +{ + public class SupplierSearchModel + { + public int? Id { get; set; } + + public string? SupplierName { get; set; } + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/WarehouseSearchModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/WarehouseSearchModel.cs new file mode 100644 index 0000000..e87c0a2 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/SearchModels/WarehouseSearchModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.SearchModels +{ + public class WarehouseSearchModel + { + public int? Id { get; set; } + + public string? WarehouseName { get; set; } + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IOrderStorage.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IOrderStorage.cs new file mode 100644 index 0000000..571787c --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IOrderStorage.cs @@ -0,0 +1,22 @@ +using AccountingWarehouseProductsContracts.BindingModels; +using AccountingWarehouseProductsContracts.SearchModels; +using AccountingWarehouseProductsContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.StoragesContracts +{ + public interface IOrderStorage + { + List GetFullList(); + List GetFilteredList(OrderSearchModel model); + + OrderViewModel? GetElement(OrderSearchModel model); + OrderViewModel? Insert(OrderBindingModel model); + OrderViewModel? Update(OrderBindingModel model); + OrderViewModel? Delete(OrderBindingModel model); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IProductStorage.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IProductStorage.cs new file mode 100644 index 0000000..2100610 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IProductStorage.cs @@ -0,0 +1,22 @@ +using AccountingWarehouseProductsContracts.BindingModels; +using AccountingWarehouseProductsContracts.SearchModels; +using AccountingWarehouseProductsContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.StoragesContracts +{ + public interface IProductStorage + { + List GetFullList(); + List GetFilteredList(ProductSearchModel model); + + ProductViewModel? GetElement(ProductSearchModel model); + ProductViewModel? Insert(ProductBindingModel model); + ProductViewModel? Update(ProductBindingModel model); + ProductViewModel? Delete(ProductBindingModel model); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IShipmentStorage.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IShipmentStorage.cs new file mode 100644 index 0000000..c790237 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IShipmentStorage.cs @@ -0,0 +1,22 @@ +using AccountingWarehouseProductsContracts.BindingModels; +using AccountingWarehouseProductsContracts.SearchModels; +using AccountingWarehouseProductsContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.StoragesContracts +{ + public interface IShipmentStorage + { + List GetFullList(); + List GetFilteredList(ShipmentSearchModel model); + + ShipmentViewModel? GetElement(ShipmentSearchModel model); + ShipmentViewModel? Insert(ShipmentBindingModel model); + ShipmentViewModel? Update(ShipmentBindingModel model); + ShipmentViewModel? Delete(ShipmentBindingModel model); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IStandStorage.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IStandStorage.cs new file mode 100644 index 0000000..12877ef --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IStandStorage.cs @@ -0,0 +1,22 @@ +using AccountingWarehouseProductsContracts.BindingModels; +using AccountingWarehouseProductsContracts.SearchModels; +using AccountingWarehouseProductsContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.StoragesContracts +{ + public interface IStandStorage + { + List GetFullList(); + List GetFilteredList(StandSearchModel model); + + StandViewModel? GetElement(StandSearchModel model); + StandViewModel? Insert(StandBindingModel model); + StandViewModel? Update(StandBindingModel model); + StandViewModel? Delete(StandBindingModel model); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/ISupplierStorage.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/ISupplierStorage.cs new file mode 100644 index 0000000..920444a --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/ISupplierStorage.cs @@ -0,0 +1,22 @@ +using AccountingWarehouseProductsContracts.BindingModels; +using AccountingWarehouseProductsContracts.SearchModels; +using AccountingWarehouseProductsContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.StoragesContracts +{ + public interface ISupplierStorage + { + List GetFullList(); + List GetFilteredList(SupplierSearchModel model); + + SupplierViewModel? GetElement(SupplierSearchModel model); + SupplierViewModel? Insert(SupplierBindingModel model); + SupplierViewModel? Update(SupplierBindingModel model); + SupplierViewModel? Delete(SupplierBindingModel model); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IWarehouseStorage.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IWarehouseStorage.cs new file mode 100644 index 0000000..6dd77e8 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/StoragesContracts/IWarehouseStorage.cs @@ -0,0 +1,22 @@ +using AccountingWarehouseProductsContracts.BindingModels; +using AccountingWarehouseProductsContracts.SearchModels; +using AccountingWarehouseProductsContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.StoragesContracts +{ + public interface IWarehouseStorage + { + List GetFullList(); + List GetFilteredList(WarehouseSearchModel model); + + WarehouseViewModel? GetElement(WarehouseSearchModel model); + WarehouseViewModel? Insert(WarehouseBindingModel model); + WarehouseViewModel? Update(WarehouseBindingModel model); + WarehouseViewModel? Delete(WarehouseBindingModel model); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/OrderViewModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/OrderViewModel.cs new file mode 100644 index 0000000..d2b8cbb --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/OrderViewModel.cs @@ -0,0 +1,24 @@ +using AccountingWarehouseProductsDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.ViewModels +{ + public class OrderViewModel : IOrderModel + { + [DisplayName("Номер")] + public int Id { get; set; } + + [DisplayName("Дата заказа")] + public DateTime? DateofOrder { get; set; } + + [DisplayName("Статус заказа")] + public AccountingWarehouseProductsDataModels.Enums.OrderStatus Status { get; set; } + + public Dictionary OrderProducts { get; set; } = new(); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/ProductViewModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/ProductViewModel.cs new file mode 100644 index 0000000..8eaf731 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/ProductViewModel.cs @@ -0,0 +1,27 @@ +using AccountingWarehouseProductsDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.ViewModels +{ + public class ProductViewModel : IProductModel + { + public int Id { get; set; } + + [DisplayName("Название продукта")] + public string ProductName { get; set; } = string.Empty; + + [DisplayName("Цена продукта")] + public double Cost { get; set; } + + [DisplayName("Срок годности")] + public DateTime? ExpirationDate { get; set; } + + [DisplayName("Категория")] + public string Category { get; set; } = string.Empty; + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/ShipmentViewModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/ShipmentViewModel.cs new file mode 100644 index 0000000..b505c59 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/ShipmentViewModel.cs @@ -0,0 +1,27 @@ +using AccountingWarehouseProductsDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.ViewModels +{ + public class ShipmentViewModel : IShipmentModel + { + [DisplayName("Номер")] + public int Id { get; set; } + + [DisplayName("Дата отгрузки")] + public DateTime ShipmentDate { get; set; } + + [DisplayName("Количество")] + public int Count { get; set; } + + [DisplayName("Получатель")] + public string Recipient { get; set; } = string.Empty; + + public int OrderId { get; set; } + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/StandViewModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/StandViewModel.cs new file mode 100644 index 0000000..01d2508 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/StandViewModel.cs @@ -0,0 +1,26 @@ +using AccountingWarehouseProductsDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.ViewModels +{ + public class StandViewModel : IStandModel + { + [DisplayName("Номер")] + public int Id { get; set; } + + [DisplayName("Дата поставки")] + public DateTime? DeliveryDate { get; set; } + + [DisplayName("Количество")] + public int Count { get; set; } + + public int ProductId { get; set; } + + public int SupplierId { get; set; } + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/SupplierViewModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/SupplierViewModel.cs new file mode 100644 index 0000000..892e0c6 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/SupplierViewModel.cs @@ -0,0 +1,24 @@ +using AccountingWarehouseProductsDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.ViewModels +{ + public class SupplierViewModel : ISupplierModel + { + public int Id { get; set; } + + [DisplayName("Название поставщика")] + public string SupplierName { get; set; } = string.Empty; + + [DisplayName("Контактное лицо")] + public string ContactPerson { get; set; } = string.Empty; + + [DisplayName("Номер телефона")] + public string Phone { get; set; } = string.Empty; + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/WarehouseViewModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/WarehouseViewModel.cs new file mode 100644 index 0000000..2f7bd77 --- /dev/null +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsContracts/ViewModels/WarehouseViewModel.cs @@ -0,0 +1,26 @@ +using AccountingWarehouseProductsDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AccountingWarehouseProductsContracts.ViewModels +{ + public class WarehouseViewModel : IWarehouseModel + { + public int Id { get; set; } + + [DisplayName("Название склада")] + public string WarehouseName { get; set; } = string.Empty; + + [DisplayName("Адрес")] + public string Address { get; set; } = string.Empty; + + [DisplayName("Вместимость")] + public int Capacity { get; set; } + + public Dictionary WarehouseProducts { get; set; } = new(); + } +} diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Enums/MovementProductStatus.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Enums/OrderStatus.cs similarity index 91% rename from AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Enums/MovementProductStatus.cs rename to AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Enums/OrderStatus.cs index aabbdbb..06bf539 100644 --- a/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Enums/MovementProductStatus.cs +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Enums/OrderStatus.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace AccountingWarehouseProductsDataModels.Enums { - public enum MovementProductStatus + public enum OrderStatus { Неизвестен = -1, diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/IOrderModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/IOrderModel.cs index 722635e..2b3fccf 100644 --- a/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/IOrderModel.cs +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/IOrderModel.cs @@ -10,7 +10,7 @@ namespace AccountingWarehouseProductsDataModels.Models { DateTime? DateofOrder { get; } - string Status { get; } + Enums.OrderStatus Status { get; } Dictionary OrderProducts { get; } } diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/IProductModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/IProductModel.cs index 88c48a5..e224e3f 100644 --- a/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/IProductModel.cs +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/IProductModel.cs @@ -8,7 +8,7 @@ namespace AccountingWarehouseProductsDataModels.Models { public interface IProductModel : IId { - string Name { get; } + string ProductName { get; } double Cost { get; } diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/ISupplierModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/ISupplierModel.cs index 3b03835..626e273 100644 --- a/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/ISupplierModel.cs +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/ISupplierModel.cs @@ -8,7 +8,7 @@ namespace AccountingWarehouseProductsDataModels.Models { public interface ISupplierModel : IId { - string Name { get; } + string SupplierName { get; } string ContactPerson { get; } diff --git a/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/IWarehouseModel.cs b/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/IWarehouseModel.cs index c855b1e..b8de7c6 100644 --- a/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/IWarehouseModel.cs +++ b/AccountingWarehouseProducts/AccountingWarehouseProductsDataModels/Models/IWarehouseModel.cs @@ -8,7 +8,7 @@ namespace AccountingWarehouseProductsDataModels.Models { public interface IWarehouseModel : IId { - string Name { get; } + string WarehouseName { get; } string Address { get; }