diff --git a/AutomobilePlant/AbstractAutoContracts/AbstractAutoContracts.csproj b/AutomobilePlant/AbstractAutoContracts/AbstractAutoContracts.csproj
new file mode 100644
index 0000000..81d9b57
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/AbstractAutoContracts.csproj
@@ -0,0 +1,13 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/AutomobilePlant/AbstractAutoContracts/BindingModels/ComponentBindingModel.cs b/AutomobilePlant/AbstractAutoContracts/BindingModels/ComponentBindingModel.cs
new file mode 100644
index 0000000..6026680
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/BindingModels/ComponentBindingModel.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using AbstractAutoDataModels.Models;
+
+namespace AbstractAutoContracts.BindingModels
+{
+ public class ComponentBindingModel : IComponentModel
+ {
+ public int Id { get; set; }
+ public string ComponentName { get; set; } = string.Empty;
+ public double Cost { get; set; }
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoContracts/BindingModels/OrderBindingModel.cs b/AutomobilePlant/AbstractAutoContracts/BindingModels/OrderBindingModel.cs
new file mode 100644
index 0000000..972ddc7
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/BindingModels/OrderBindingModel.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using AbstractAutoDataModels.Enums;
+using AbstractAutoDataModels.Models;
+
+namespace AbstractAutoContracts.BindingModels
+{
+ public class OrderBindingModel : IOrderModel
+ {
+ public int Id { get; set; }
+ public int ProductId { get; set; }
+ public int Count { get; set; }
+ public double Sum { get; set; }
+ public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
+ public DateTime DateCreate { get; set; } = DateTime.Now;
+ public DateTime? DateImplement { get; set; }
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoContracts/BindingModels/ProductBindingModel.cs b/AutomobilePlant/AbstractAutoContracts/BindingModels/ProductBindingModel.cs
new file mode 100644
index 0000000..b9b8775
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/BindingModels/ProductBindingModel.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using AbstractAutoDataModels.Models;
+
+namespace AbstractAutoContracts.BindingModels
+{
+ public class ProductBindingModel : IProductModel
+ {
+ public int Id { get; set; }
+ public string ProductName { get; set; } = string.Empty;
+ public double Price { get; set; }
+ public Dictionary ProductComponents
+ {
+ get;
+ set;
+ } = new();
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoContracts/BusinessLogicsContracts/IComponentLogic.cs b/AutomobilePlant/AbstractAutoContracts/BusinessLogicsContracts/IComponentLogic.cs
new file mode 100644
index 0000000..7889ced
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/BusinessLogicsContracts/IComponentLogic.cs
@@ -0,0 +1,20 @@
+using AbstractAutoContracts.BindingModels;
+using AbstractAutoContracts.SearchModel;
+using AbstractAutoContracts.ViewModel;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AbstractAutoContracts.BusinessLogicsContracts
+{
+ public interface IComponentLogic
+ {
+ List? ReadList(ComponentSearchModel? model);
+ ComponentViewModel? ReadElement(ComponentSearchModel model);
+ bool Create(ComponentBindingModel model);
+ bool Update(ComponentBindingModel model);
+ bool Delete(ComponentBindingModel model);
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoContracts/BusinessLogicsContracts/IOrderLogic.cs b/AutomobilePlant/AbstractAutoContracts/BusinessLogicsContracts/IOrderLogic.cs
new file mode 100644
index 0000000..6d2e59d
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/BusinessLogicsContracts/IOrderLogic.cs
@@ -0,0 +1,20 @@
+using AbstractAutoContracts.BindingModels;
+using AbstractAutoContracts.SearchModel;
+using AbstractAutoContracts.ViewModel;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AbstractAutoContracts.BusinessLogicsContracts
+{
+ public interface IOrderLogic
+ {
+ List? ReadList(OrderSearchModel? model);
+ bool CreateOrder(OrderBindingModel model);
+ bool TakeOrderInWork(OrderBindingModel model);
+ bool FinishOrder(OrderBindingModel model);
+ bool DeliveryOrder(OrderBindingModel model);
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoContracts/BusinessLogicsContracts/IProductLogic.cs b/AutomobilePlant/AbstractAutoContracts/BusinessLogicsContracts/IProductLogic.cs
new file mode 100644
index 0000000..d420044
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/BusinessLogicsContracts/IProductLogic.cs
@@ -0,0 +1,20 @@
+using AbstractAutoContracts.BindingModels;
+using AbstractAutoContracts.SearchModel;
+using AbstractAutoContracts.ViewModel;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AbstractAutoContracts.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/AutomobilePlant/AbstractAutoContracts/SearchModel/ComponentSearchModel.cs b/AutomobilePlant/AbstractAutoContracts/SearchModel/ComponentSearchModel.cs
new file mode 100644
index 0000000..9ffed3e
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/SearchModel/ComponentSearchModel.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AbstractAutoContracts.SearchModel
+{
+ public class ComponentSearchModel
+ {
+ public int? Id { get; set; }
+ public string? ComponentName { get; set; }
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoContracts/SearchModel/OrderSearchModel.cs b/AutomobilePlant/AbstractAutoContracts/SearchModel/OrderSearchModel.cs
new file mode 100644
index 0000000..187982f
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/SearchModel/OrderSearchModel.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AbstractAutoContracts.SearchModel
+{
+ public class OrderSearchModel
+ {
+ public int? Id { get; set; }
+
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoContracts/SearchModel/ProductSearchModel.cs b/AutomobilePlant/AbstractAutoContracts/SearchModel/ProductSearchModel.cs
new file mode 100644
index 0000000..7470ad4
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/SearchModel/ProductSearchModel.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AbstractAutoContracts.SearchModel
+{
+ public class ProductSearchModel
+ {
+ public int? Id { get; set; }
+ public string? ProductName { get; set; }
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoContracts/StoragesContracts/IComponentStorage.cs b/AutomobilePlant/AbstractAutoContracts/StoragesContracts/IComponentStorage.cs
new file mode 100644
index 0000000..9cdbd2a
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/StoragesContracts/IComponentStorage.cs
@@ -0,0 +1,22 @@
+using AbstractAutoContracts.BindingModels;
+using AbstractAutoContracts.SearchModel;
+using AbstractAutoContracts.ViewModel;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AbstractAutoContracts.StoragesContracts
+{
+ public interface IComponentStorage
+ {
+ List GetFullList();
+ List GetFilteredList(ComponentSearchModel model);
+ ComponentViewModel? GetElement(ComponentSearchModel model);
+ ComponentViewModel? Insert(ComponentBindingModel model);
+ ComponentViewModel? Update(ComponentBindingModel model);
+ ComponentViewModel? Delete(ComponentBindingModel model);
+
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoContracts/StoragesContracts/IOrderStorage.cs b/AutomobilePlant/AbstractAutoContracts/StoragesContracts/IOrderStorage.cs
new file mode 100644
index 0000000..509c8a0
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/StoragesContracts/IOrderStorage.cs
@@ -0,0 +1,21 @@
+using AbstractAutoContracts.BindingModels;
+using AbstractAutoContracts.SearchModel;
+using AbstractAutoContracts.ViewModel;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AbstractAutoContracts.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/AutomobilePlant/AbstractAutoContracts/StoragesContracts/IProductStorage.cs b/AutomobilePlant/AbstractAutoContracts/StoragesContracts/IProductStorage.cs
new file mode 100644
index 0000000..fc380f5
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/StoragesContracts/IProductStorage.cs
@@ -0,0 +1,22 @@
+using AbstractAutoContracts.BindingModels;
+using AbstractAutoContracts.SearchModel;
+using AbstractAutoContracts.ViewModel;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AbstractAutoContracts.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/AutomobilePlant/AbstractAutoContracts/ViewModel/ComponentViewModel.cs b/AutomobilePlant/AbstractAutoContracts/ViewModel/ComponentViewModel.cs
new file mode 100644
index 0000000..2f1db18
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/ViewModel/ComponentViewModel.cs
@@ -0,0 +1,18 @@
+using AbstractAutoDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.ComponentModel;
+namespace AbstractAutoContracts.ViewModel
+{
+ public class ComponentViewModel : IComponentModel
+ {
+ public int Id { get; set; }
+ [DisplayName("Название компонента")]
+ public string ComponentName { get; set; } = string.Empty;
+ [DisplayName("Цена")]
+ public double Cost { get; set; }
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoContracts/ViewModel/OrderViewModel.cs b/AutomobilePlant/AbstractAutoContracts/ViewModel/OrderViewModel.cs
new file mode 100644
index 0000000..8d8fdfb
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/ViewModel/OrderViewModel.cs
@@ -0,0 +1,31 @@
+using AbstractAutoDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.ComponentModel;
+using AbstractAutoDataModels.Enums;
+
+namespace AbstractAutoContracts.ViewModel
+{
+ public class OrderViewModel : IOrderModel
+ {
+ [DisplayName("Номер")]
+ public int Id { get; set; }
+ public int ProductId { get; set; }
+ [DisplayName("Изделие")]
+ public string ProductName { get; set; } = string.Empty;
+ [DisplayName("Количество")]
+ public int Count { get; set; }
+ [DisplayName("Сумма")]
+ public double Sum { get; set; }
+ [DisplayName("Статус")]
+ public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
+ [DisplayName("Дата создания")]
+ public DateTime DateCreate { get; set; } = DateTime.Now;
+ [DisplayName("Дата выполнения")]
+ public DateTime? DateImplement { get; set; }
+
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoContracts/ViewModel/ProductViewModel.cs b/AutomobilePlant/AbstractAutoContracts/ViewModel/ProductViewModel.cs
new file mode 100644
index 0000000..74f846e
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoContracts/ViewModel/ProductViewModel.cs
@@ -0,0 +1,24 @@
+using AbstractAutoDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.ComponentModel;
+namespace AbstractAutoContracts.ViewModel
+{
+ public class ProductViewModel : IProductModel
+ {
+ public int Id { get; set; }
+ [DisplayName("Название изделия")]
+ public string ProductName { get; set; } = string.Empty;
+ [DisplayName("Цена")]
+ public double Price { get; set; }
+ public Dictionary ProductComponents
+ {
+ get;
+ set;
+ } = new();
+
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoDataModels/AbstractAutoDataModels.csproj b/AutomobilePlant/AbstractAutoDataModels/AbstractAutoDataModels.csproj
new file mode 100644
index 0000000..132c02c
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoDataModels/AbstractAutoDataModels.csproj
@@ -0,0 +1,9 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
diff --git a/AutomobilePlant/AbstractAutoDataModels/Enums/OrderStatus.cs b/AutomobilePlant/AbstractAutoDataModels/Enums/OrderStatus.cs
new file mode 100644
index 0000000..7a041e7
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoDataModels/Enums/OrderStatus.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AbstractAutoDataModels.Enums
+{
+ public enum OrderStatus
+ {
+ Неизвестен = -1,
+ Принят = 0,
+ Выполняется = 1,
+ Готов = 2,
+ Выдан = 3
+
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoDataModels/IId.cs b/AutomobilePlant/AbstractAutoDataModels/IId.cs
new file mode 100644
index 0000000..d871603
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoDataModels/IId.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AbstractAutoDataModels
+{
+ public interface IId
+ {
+ int Id { get; }
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoDataModels/Models/IComponentModel.cs b/AutomobilePlant/AbstractAutoDataModels/Models/IComponentModel.cs
new file mode 100644
index 0000000..50c14e0
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoDataModels/Models/IComponentModel.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AbstractAutoDataModels.Models
+{
+ public interface IComponentModel : IId
+ {
+ string ComponentName { get; }
+ double Cost { get; }
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoDataModels/Models/IOrderModel.cs b/AutomobilePlant/AbstractAutoDataModels/Models/IOrderModel.cs
new file mode 100644
index 0000000..8902035
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoDataModels/Models/IOrderModel.cs
@@ -0,0 +1,19 @@
+using AbstractAutoDataModels.Enums;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AbstractAutoDataModels.Models
+{
+ public interface IOrderModel : IId
+ {
+ int ProductId { get; }
+ int Count { get; }
+ double Sum { get; }
+ OrderStatus Status { get; }
+ DateTime DateCreate { get; }
+ DateTime? DateImplement { get; }
+ }
+}
diff --git a/AutomobilePlant/AbstractAutoDataModels/Models/IProductModel.cs b/AutomobilePlant/AbstractAutoDataModels/Models/IProductModel.cs
new file mode 100644
index 0000000..2875b48
--- /dev/null
+++ b/AutomobilePlant/AbstractAutoDataModels/Models/IProductModel.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AbstractAutoDataModels.Models
+{
+ public interface IProductModel : IId
+ {
+ string ProductName { get; }
+ double Price { get; }
+ Dictionary ProductComponents { get; }
+
+ }
+}
diff --git a/AutomobilePlant/AutomobilePlant.sln b/AutomobilePlant/AutomobilePlant.sln
index 99fde6c..f7bdc84 100644
--- a/AutomobilePlant/AutomobilePlant.sln
+++ b/AutomobilePlant/AutomobilePlant.sln
@@ -5,6 +5,10 @@ VisualStudioVersion = 17.3.32825.248
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutomobilePlant", "AutomobilePlant\AutomobilePlant.csproj", "{2A499DE6-B7DE-4A28-9906-12FC100451F0}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbstractAutoDataModels", "AbstractAutoDataModels\AbstractAutoDataModels.csproj", "{DD7B0E1A-2EE9-441A-87C3-03AC0421746E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbstractAutoContracts", "AbstractAutoContracts\AbstractAutoContracts.csproj", "{4B515980-8AD9-48F3-886E-3C2A6B1E9D90}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -15,6 +19,14 @@ Global
{2A499DE6-B7DE-4A28-9906-12FC100451F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A499DE6-B7DE-4A28-9906-12FC100451F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A499DE6-B7DE-4A28-9906-12FC100451F0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DD7B0E1A-2EE9-441A-87C3-03AC0421746E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DD7B0E1A-2EE9-441A-87C3-03AC0421746E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DD7B0E1A-2EE9-441A-87C3-03AC0421746E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DD7B0E1A-2EE9-441A-87C3-03AC0421746E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4B515980-8AD9-48F3-886E-3C2A6B1E9D90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4B515980-8AD9-48F3-886E-3C2A6B1E9D90}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4B515980-8AD9-48F3-886E-3C2A6B1E9D90}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4B515980-8AD9-48F3-886E-3C2A6B1E9D90}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE