diff --git a/ProductionInCehOTP/Entities/ArrivalMaterials.cs b/ProductionInCehOTP/Entities/ArrivalMaterials.cs
new file mode 100644
index 0000000..221c96d
--- /dev/null
+++ b/ProductionInCehOTP/Entities/ArrivalMaterials.cs
@@ -0,0 +1,20 @@
+using ProductionInCehOTP.Entities.Enums;
+
+namespace ProductionInCehOTP.Entities;
+
+public class ArrivalMaterials
+{
+ public int Id { get; set; }
+ public DateTime Date { get; set; }
+ public string Name { get; set; }
+
+ public static ArrivalMaterials CreateArrivalMaterials(int id, DateTime date, string name )
+ {
+ return new ArrivalMaterials
+ {
+ Id = id,
+ Date = date,
+ Name = name,
+ };
+ }
+}
diff --git a/ProductionInCehOTP/Entities/Enums/NameOfMaterials.cs b/ProductionInCehOTP/Entities/Enums/NameOfMaterials.cs
new file mode 100644
index 0000000..1f324e8
--- /dev/null
+++ b/ProductionInCehOTP/Entities/Enums/NameOfMaterials.cs
@@ -0,0 +1,9 @@
+namespace ProductionInCehOTP.Entities.Enums;
+[Flags]
+public enum NameOfMaterials
+{
+ Metal = 0,
+ GraphiteDust = 1,
+ Soil = 2,
+ Oil = 4
+}
diff --git a/ProductionInCehOTP/Entities/Enums/NameOfProductTypes.cs b/ProductionInCehOTP/Entities/Enums/NameOfProductTypes.cs
new file mode 100644
index 0000000..dfc4da7
--- /dev/null
+++ b/ProductionInCehOTP/Entities/Enums/NameOfProductTypes.cs
@@ -0,0 +1,7 @@
+namespace ProductionInCehOTP.Entities.Enums;
+
+public enum NameOfProductTypes
+{
+ machine = 0,
+ kernel = 1
+}
diff --git a/ProductionInCehOTP/Entities/Enums/NameOfProducts.cs b/ProductionInCehOTP/Entities/Enums/NameOfProducts.cs
new file mode 100644
index 0000000..a15d41b
--- /dev/null
+++ b/ProductionInCehOTP/Entities/Enums/NameOfProducts.cs
@@ -0,0 +1,12 @@
+namespace ProductionInCehOTP.Entities.Enums;
+
+public enum NameOfProducts
+{
+ ch60 = 0,
+ ch65 = 1,
+ ch80 = 2,
+ ch85 = 3,
+ ch120 = 4,
+ ch160 = 5,
+ ch165 = 6
+}
diff --git a/ProductionInCehOTP/Entities/Material.cs b/ProductionInCehOTP/Entities/Material.cs
new file mode 100644
index 0000000..e01a5f7
--- /dev/null
+++ b/ProductionInCehOTP/Entities/Material.cs
@@ -0,0 +1,20 @@
+namespace ProductionInCehOTP.Entities;
+
+public class Material
+{
+ public int Id { get; private set; }
+ public string Name { get; private set; } = string.Empty;
+ public int ArrivalMaterialsID { get; private set; }
+ public int PlanID { get; private set; }
+public static Material CreateMaterial(int id, string name, int arrivalMaterialsID, int planID)
+ {
+ return new Material
+ {
+ Id = id,
+ Name = name,
+ ArrivalMaterialsID = arrivalMaterialsID,
+ PlanID = planID
+ };
+ }
+}
+
diff --git a/ProductionInCehOTP/Entities/MaterialForProduct.cs b/ProductionInCehOTP/Entities/MaterialForProduct.cs
new file mode 100644
index 0000000..ff7310a
--- /dev/null
+++ b/ProductionInCehOTP/Entities/MaterialForProduct.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ProductionInCehOTP.Entities;
+
+public class MaterialForProduct
+{
+ public int ProductID { get; private set; }
+ public int[] MaterialID { get; private set; }
+ public int[] Count { get; private set; }
+
+ public static MaterialForProduct CreateDependenceMaterialsToProduct(int productID, int[] materialsId, int[]count)
+ {
+ return new MaterialForProduct { ProductID = productID, MaterialID = materialsId, Count = count };
+ }
+}
diff --git a/ProductionInCehOTP/Entities/PlanWork.cs b/ProductionInCehOTP/Entities/PlanWork.cs
new file mode 100644
index 0000000..b520a2d
--- /dev/null
+++ b/ProductionInCehOTP/Entities/PlanWork.cs
@@ -0,0 +1,13 @@
+namespace ProductionInCehOTP.Entities;
+
+public class PlanWork
+{
+ public int Id { get; private set; }
+ public int Plan { get; private set; }
+ public DateTime Date { get; private set; } = DateTime.Now;
+
+ public PlanWork CreatePlanWork(int id, int Plan, DateTime date)
+ {
+ return new PlanWork { Id = id, Plan = Plan, Date = date };
+ }
+}
diff --git a/ProductionInCehOTP/Entities/PlanWorkForProduct.cs b/ProductionInCehOTP/Entities/PlanWorkForProduct.cs
new file mode 100644
index 0000000..57ae15a
--- /dev/null
+++ b/ProductionInCehOTP/Entities/PlanWorkForProduct.cs
@@ -0,0 +1,20 @@
+namespace ProductionInCehOTP.Entities;
+
+public class PlanWorkForProduct
+{
+ public int Id { get; private set; }
+ public int PlanWorkId { get; private set; }
+ public int ProductId { get; private set; }
+ public int Count { get; private set; }
+
+ public PlanWorkForProduct CreateDependencePlanWorkToProduct(int id, int planworkId, int productID, int Count)
+ {
+ return new PlanWorkForProduct
+ {
+ Id = id,
+ PlanWorkId = planworkId,
+ ProductId = productID,
+ Count = Count
+ };
+ }
+}
diff --git a/ProductionInCehOTP/Entities/Product.cs b/ProductionInCehOTP/Entities/Product.cs
new file mode 100644
index 0000000..b7304c4
--- /dev/null
+++ b/ProductionInCehOTP/Entities/Product.cs
@@ -0,0 +1,17 @@
+using ProductionInCehOTP.Entities.Enums;
+
+namespace ProductionInCehOTP.Entities;
+
+public class Product
+{
+ public int Id { get; private set; }
+ public NameOfProducts Name { get; private set; }
+ public int Price { get; private set; }
+ public int ProductionId { get; private set; }
+ public int ProductionTypeID { get; private set; }
+
+ public static Product CreateProducts(int id, NameOfProducts name, int price, int productionId, int productionTypeId)
+ {
+ return new Product { Id = id, Name = name, Price = price, ProductionId = productionId, ProductionTypeID = productionTypeId };
+ }
+}
diff --git a/ProductionInCehOTP/Entities/ProductType.cs b/ProductionInCehOTP/Entities/ProductType.cs
new file mode 100644
index 0000000..1ac8792
--- /dev/null
+++ b/ProductionInCehOTP/Entities/ProductType.cs
@@ -0,0 +1,18 @@
+using ProductionInCehOTP.Entities.Enums;
+
+namespace ProductionInCehOTP.Entities;
+
+public class ProductType
+{
+ public int Id { get; private set; }
+ public NameOfProductTypes Name { get; private set; }
+
+ public static ProductType CreateType(int id, NameOfProductTypes name)
+ {
+ return new ProductType
+ {
+ Id = id,
+ Name = name
+ };
+ }
+}
diff --git a/ProductionInCehOTP/Entities/Worker.cs b/ProductionInCehOTP/Entities/Worker.cs
new file mode 100644
index 0000000..3edec59
--- /dev/null
+++ b/ProductionInCehOTP/Entities/Worker.cs
@@ -0,0 +1,24 @@
+using System.Runtime.CompilerServices;
+
+namespace ProductionInCehOTP.Entities;
+
+public class Worker
+{
+ public int Id { get; private set; }
+ public string Name { get; private set; } = string.Empty;
+ public DateTime Experiebce { get; private set; }
+ public int ClassOfWorker { get; private set; }
+ public int PlanWork { get; private set; }
+
+ public static Worker CreateWorker(int id, string name, DateTime experience, int classOfWorker, int planWorkID)
+ {
+ return new Worker
+ {
+ Id = id,
+ Name = name,
+ Experiebce = experience,
+ ClassOfWorker = classOfWorker,
+ PlanWork = planWorkID
+ };
+ }
+}
diff --git a/ProductionInCehOTP/ProductionInCehOTP.csproj b/ProductionInCehOTP/ProductionInCehOTP.csproj
index 663fdb8..894afcd 100644
--- a/ProductionInCehOTP/ProductionInCehOTP.csproj
+++ b/ProductionInCehOTP/ProductionInCehOTP.csproj
@@ -8,4 +8,8 @@
enable
+
+
+
+
\ No newline at end of file
diff --git a/ProductionInCehOTP/ProductionInIndustrial.Designer.cs b/ProductionInCehOTP/ProductionInIndustrial.Designer.cs
new file mode 100644
index 0000000..724beea
--- /dev/null
+++ b/ProductionInCehOTP/ProductionInIndustrial.Designer.cs
@@ -0,0 +1,45 @@
+namespace ProductionInCehOTP
+{
+ partial class ProductionInIndustrial
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ SuspendLayout();
+ //
+ // ProductionInIndustrial
+ //
+ AutoScaleDimensions = new SizeF(8F, 20F);
+ AutoScaleMode = AutoScaleMode.Font;
+ ClientSize = new Size(1043, 522);
+ Name = "ProductionInIndustrial";
+ Text = "ProductionInIndustrial";
+ ResumeLayout(false);
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/ProductionInCehOTP/ProductionInIndustrial.cs b/ProductionInCehOTP/ProductionInIndustrial.cs
new file mode 100644
index 0000000..a6eca46
--- /dev/null
+++ b/ProductionInCehOTP/ProductionInIndustrial.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace ProductionInCehOTP
+{
+ public partial class ProductionInIndustrial : Form
+ {
+ public ProductionInIndustrial()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/ProductionInCehOTP/ProductionInIndustrial.resx b/ProductionInCehOTP/ProductionInIndustrial.resx
new file mode 100644
index 0000000..8b2ff64
--- /dev/null
+++ b/ProductionInCehOTP/ProductionInIndustrial.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ProductionInCehOTP/Program.cs b/ProductionInCehOTP/Program.cs
index 1896d5d..4563a3e 100644
--- a/ProductionInCehOTP/Program.cs
+++ b/ProductionInCehOTP/Program.cs
@@ -1,3 +1,7 @@
+using ProductionInCehOTP.Repositories;
+using ProductionInCehOTP.Repositories.Implementations;
+using Unity;
+
namespace ProductionInCehOTP
{
internal static class Program
@@ -11,7 +15,18 @@ namespace ProductionInCehOTP
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
- Application.Run(new Form1());
+ Application.Run(CreateContainer().Resolve());
+ }
+ private static IUnityContainer CreateContainer()
+ {
+ var container = new UnityContainer();
+ container.RegisterType();
+ container.RegisterType();
+ container.RegisterType();
+ container.RegisterType();
+ container.RegisterType();
+ container.RegisterType();
+ return container;
}
}
}
\ No newline at end of file
diff --git a/ProductionInCehOTP/Repositories/IArrivalMaterialsRepository.cs b/ProductionInCehOTP/Repositories/IArrivalMaterialsRepository.cs
new file mode 100644
index 0000000..5f716f5
--- /dev/null
+++ b/ProductionInCehOTP/Repositories/IArrivalMaterialsRepository.cs
@@ -0,0 +1,10 @@
+using ProductionInCehOTP.Entities;
+
+namespace ProductionInCehOTP.Repositories;
+
+public interface IArrivalMaterialsRepository
+{
+ IEnumerable GetMaterials(int ? ArrivalID,DateTime ? dateFrom = null, DateTime ? dateTo = null, string ? name = null );
+ void CreateArrivalMaterials(ArrivalMaterials material);
+ void DeleteArrivalMaterials(int id);
+}
diff --git a/ProductionInCehOTP/Repositories/IMaterialRepository.cs b/ProductionInCehOTP/Repositories/IMaterialRepository.cs
new file mode 100644
index 0000000..a353073
--- /dev/null
+++ b/ProductionInCehOTP/Repositories/IMaterialRepository.cs
@@ -0,0 +1,13 @@
+using ProductionInCehOTP.Entities;
+
+namespace ProductionInCehOTP.Repositories;
+
+public interface IMaterialRepository
+{
+ IEnumerable GetMaterials();
+ Material GetMaterialById(int id);
+
+ void CreateMaterial (Material material);
+ void UpdateMaterial (Material material);
+ void DeleteMaterial (int id);
+}
diff --git a/ProductionInCehOTP/Repositories/IPlanWorkRepository.cs b/ProductionInCehOTP/Repositories/IPlanWorkRepository.cs
new file mode 100644
index 0000000..97732eb
--- /dev/null
+++ b/ProductionInCehOTP/Repositories/IPlanWorkRepository.cs
@@ -0,0 +1,10 @@
+using ProductionInCehOTP.Entities;
+
+namespace ProductionInCehOTP.Repositories;
+
+public interface IPlanWorkRepository
+{
+ IEnumerable GetPlanWorks(int ? id = null, int ? plan = null, DateTime ? dateFrom = null, DateTime ? DateTo = null);
+ void CreatePlanWork(PlanWork planWork);
+ void DeletePlanWork(PlanWork planWork);
+}
diff --git a/ProductionInCehOTP/Repositories/IProductRepository.cs b/ProductionInCehOTP/Repositories/IProductRepository.cs
new file mode 100644
index 0000000..7f67d09
--- /dev/null
+++ b/ProductionInCehOTP/Repositories/IProductRepository.cs
@@ -0,0 +1,11 @@
+using ProductionInCehOTP.Entities;
+namespace ProductionInCehOTP.Repositories;
+
+public interface IProductRepository
+{
+ IEnumerable GetProducts();
+ Product GetProductById(int productId);
+ void CreateProduct(Product product);
+ void UpdateProduct(Product product);
+ void DeleteProduct(int productId);
+}
diff --git a/ProductionInCehOTP/Repositories/IProductTypeRepository.cs b/ProductionInCehOTP/Repositories/IProductTypeRepository.cs
new file mode 100644
index 0000000..752e31f
--- /dev/null
+++ b/ProductionInCehOTP/Repositories/IProductTypeRepository.cs
@@ -0,0 +1,13 @@
+using ProductionInCehOTP.Entities;
+
+namespace ProductionInCehOTP.Repositories;
+
+public interface IProductTypeRepository
+{
+ IEnumerable GetProductTypes();
+ ProductType GetProductTypeById(int id);
+
+ void CreateProductType(ProductType productType);
+ void UpdateProductType(ProductType productType);
+ void DeleteProductType(int id);
+}
diff --git a/ProductionInCehOTP/Repositories/IWorkerRepository.cs b/ProductionInCehOTP/Repositories/IWorkerRepository.cs
new file mode 100644
index 0000000..22714f5
--- /dev/null
+++ b/ProductionInCehOTP/Repositories/IWorkerRepository.cs
@@ -0,0 +1,14 @@
+using ProductionInCehOTP.Entities;
+
+namespace ProductionInCehOTP.Repositories;
+
+public interface IWorkerRepository
+{
+ IEnumerable GetWorkers();
+ Worker GetWorkerById(int id);
+
+ void CreateWorker (Worker worker);
+ void UpdateWorker (Worker worker);
+ void DeleteWorker (Worker worker);
+
+}
diff --git a/ProductionInCehOTP/Repositories/Implementations/ArrivalMaterialsRepository.cs b/ProductionInCehOTP/Repositories/Implementations/ArrivalMaterialsRepository.cs
new file mode 100644
index 0000000..d9b8c8c
--- /dev/null
+++ b/ProductionInCehOTP/Repositories/Implementations/ArrivalMaterialsRepository.cs
@@ -0,0 +1,21 @@
+using ProductionInCehOTP.Entities;
+
+namespace ProductionInCehOTP.Repositories.Implementations;
+
+public class ArrivalMaterialsRepository : IArrivalMaterialsRepository
+{
+ public void CreateArrivalMaterials(ArrivalMaterials material)
+ {
+
+ }
+
+ public void DeleteArrivalMaterials(int id)
+ {
+
+ }
+
+ public IEnumerable GetMaterials(int? ArrivalID, DateTime? dateFrom = null, DateTime? dateTo = null, string? name = null)
+ {
+ return [];
+ }
+}
diff --git a/ProductionInCehOTP/Repositories/Implementations/MaterialRepository.cs b/ProductionInCehOTP/Repositories/Implementations/MaterialRepository.cs
new file mode 100644
index 0000000..a47be13
--- /dev/null
+++ b/ProductionInCehOTP/Repositories/Implementations/MaterialRepository.cs
@@ -0,0 +1,31 @@
+using ProductionInCehOTP.Entities;
+
+namespace ProductionInCehOTP.Repositories.Implementations;
+
+public class MaterialRepository : IMaterialRepository
+{
+ public void CreateMaterial(Material material)
+ {
+
+ }
+
+ public void DeleteMaterial(int id)
+ {
+
+ }
+
+ public Material GetMaterialById(int id)
+ {
+ return Material.CreateMaterial(0, string.Empty, 0, 0);
+ }
+
+ public IEnumerable GetMaterials()
+ {
+ return [];
+ }
+
+ public void UpdateMaterial(Material material)
+ {
+
+ }
+}
diff --git a/ProductionInCehOTP/Repositories/Implementations/PlanWorkRepository.cs b/ProductionInCehOTP/Repositories/Implementations/PlanWorkRepository.cs
new file mode 100644
index 0000000..9edf0c5
--- /dev/null
+++ b/ProductionInCehOTP/Repositories/Implementations/PlanWorkRepository.cs
@@ -0,0 +1,21 @@
+using ProductionInCehOTP.Entities;
+
+namespace ProductionInCehOTP.Repositories.Implementations;
+
+public class PlanWorkRepository : IPlanWorkRepository
+{
+ public void CreatePlanWork(PlanWork planWork)
+ {
+
+ }
+
+ public void DeletePlanWork(PlanWork planWork)
+ {
+
+ }
+
+ public IEnumerable GetPlanWorks(int? id = null, int? plan = null, DateTime? dateFrom = null, DateTime? DateTo = null)
+ {
+ return [];
+ }
+}
diff --git a/ProductionInCehOTP/Repositories/Implementations/ProductRepository.cs b/ProductionInCehOTP/Repositories/Implementations/ProductRepository.cs
new file mode 100644
index 0000000..2ebfd6a
--- /dev/null
+++ b/ProductionInCehOTP/Repositories/Implementations/ProductRepository.cs
@@ -0,0 +1,31 @@
+using ProductionInCehOTP.Entities;
+
+namespace ProductionInCehOTP.Repositories.Implementations;
+
+public class ProductRepository : IProductRepository
+{
+ public void CreateProduct(Product product)
+ {
+
+ }
+
+ public void DeleteProduct(int productId)
+ {
+
+ }
+
+ public Product GetProductById(int productId)
+ {
+ return Product.CreateProducts(0, 0, 0, 0, 0);
+ }
+
+ public IEnumerable GetProducts()
+ {
+ return [];
+ }
+
+ public void UpdateProduct(Product product)
+ {
+
+ }
+}
diff --git a/ProductionInCehOTP/Repositories/Implementations/ProductTypeRepository.cs b/ProductionInCehOTP/Repositories/Implementations/ProductTypeRepository.cs
new file mode 100644
index 0000000..0f5fa80
--- /dev/null
+++ b/ProductionInCehOTP/Repositories/Implementations/ProductTypeRepository.cs
@@ -0,0 +1,30 @@
+using ProductionInCehOTP.Entities;
+
+namespace ProductionInCehOTP.Repositories.Implementations;
+
+public class ProductTypeRepository : IProductTypeRepository
+{
+ public void CreateProductType(ProductType productType)
+ {
+
+ }
+
+ public void DeleteProductType(int id)
+ {
+
+ }
+ public ProductType GetProductTypeById(int id)
+ {
+ return ProductType.CreateType(0,0);
+ }
+
+ public IEnumerable GetProductTypes()
+ {
+ return [];
+ }
+
+ public void UpdateProductType(ProductType productType)
+ {
+
+ }
+}
diff --git a/ProductionInCehOTP/Repositories/Implementations/WorkerRepository.cs b/ProductionInCehOTP/Repositories/Implementations/WorkerRepository.cs
new file mode 100644
index 0000000..b2351c0
--- /dev/null
+++ b/ProductionInCehOTP/Repositories/Implementations/WorkerRepository.cs
@@ -0,0 +1,31 @@
+using ProductionInCehOTP.Entities;
+
+namespace ProductionInCehOTP.Repositories.Implementations;
+
+public class WorkerRepository : IWorkerRepository
+{
+ public void CreateWorker(Worker worker)
+ {
+
+ }
+
+ public void DeleteWorker(Worker worker)
+ {
+
+ }
+
+ public Worker GetWorkerById(int id)
+ {
+ return Worker.CreateWorker(0, string.Empty, DateTime.Now, 0, 0);
+ }
+
+ public IEnumerable GetWorkers()
+ {
+ return [];
+ }
+
+ public void UpdateWorker(Worker worker)
+ {
+
+ }
+}