From 09e7bc69f6956566147ac0e79333153881da9cdc Mon Sep 17 00:00:00 2001 From: Tonb73 Date: Mon, 17 Feb 2025 14:16:47 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B8=20=D0=B1=D0=B5=D0=B7=20=D0=BD=D0=B0=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F(51=20=D0=BC=D0=B8?= =?UTF-8?q?=D0=BD=D1=83=D1=82=20=D0=BE=D1=81=D1=82=D0=B0=D0=BB=D0=BE=D1=81?= =?UTF-8?q?=D1=8C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BlankBusinessLogicContract.cs | 36 ++++++++++++++ .../CuttingBusinessLogicContract.cs | 41 ++++++++++++++++ .../PostBusinessLogicContract.cs | 43 ++++++++++++++++ .../ProductBusinessLogicContract.cs | 44 +++++++++++++++++ .../SalaryBusinessLogicContract.cs | 26 ++++++++++ .../WorkerBusinessLogicContract.cs | 49 +++++++++++++++++++ .../PapaCarloBusinessLogic.csproj | 13 +++++ ...ic.cs => ICuttingBusinessLogicContract.cs} | 0 PapaCarloProject/PapaCarloProject.sln | 8 ++- 9 files changed, 259 insertions(+), 1 deletion(-) create mode 100644 PapaCarloProject/PapaCarloBusinessLogic/Implementations/BlankBusinessLogicContract.cs create mode 100644 PapaCarloProject/PapaCarloBusinessLogic/Implementations/CuttingBusinessLogicContract.cs create mode 100644 PapaCarloProject/PapaCarloBusinessLogic/Implementations/PostBusinessLogicContract.cs create mode 100644 PapaCarloProject/PapaCarloBusinessLogic/Implementations/ProductBusinessLogicContract.cs create mode 100644 PapaCarloProject/PapaCarloBusinessLogic/Implementations/SalaryBusinessLogicContract.cs create mode 100644 PapaCarloProject/PapaCarloBusinessLogic/Implementations/WorkerBusinessLogicContract.cs create mode 100644 PapaCarloProject/PapaCarloBusinessLogic/PapaCarloBusinessLogic.csproj rename PapaCarloProject/PapaCarloContracts/BusinessLogicContracts/{ICuttingBusinessLogic.cs => ICuttingBusinessLogicContract.cs} (100%) diff --git a/PapaCarloProject/PapaCarloBusinessLogic/Implementations/BlankBusinessLogicContract.cs b/PapaCarloProject/PapaCarloBusinessLogic/Implementations/BlankBusinessLogicContract.cs new file mode 100644 index 0000000..9325f7b --- /dev/null +++ b/PapaCarloProject/PapaCarloBusinessLogic/Implementations/BlankBusinessLogicContract.cs @@ -0,0 +1,36 @@ +using PapaCarloContracts.BusinessLogicContracts; +using PapaCarloContracts.DataModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PapaCarloBusinessLogic.Implementations +{ + internal class BlankBusinessLogicContract : IBlankBusinessLogicContract + { + public void DeleteBlank(string id) + { + } + + public List GetAllBlanks() + { + return []; + } + + public BlankDataModel GetBlankByData(string data) + { + return new("", "", "", ""); + } + + public void InsertBlank(BlankDataModel blankDataModel) + { + } + + public void UpdateBlank(BlankDataModel blankDataModel) + { + + } + } +} diff --git a/PapaCarloProject/PapaCarloBusinessLogic/Implementations/CuttingBusinessLogicContract.cs b/PapaCarloProject/PapaCarloBusinessLogic/Implementations/CuttingBusinessLogicContract.cs new file mode 100644 index 0000000..b043656 --- /dev/null +++ b/PapaCarloProject/PapaCarloBusinessLogic/Implementations/CuttingBusinessLogicContract.cs @@ -0,0 +1,41 @@ +using PapaCarloContracts.BusinessLogicContracts; +using PapaCarloContracts.DataModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PapaCarloBusinessLogic.Implementations +{ + internal class CuttingBusinessLogicContract : ICuttingBusinessLogicContract + { + public void CancelCutting(string id) + { + } + + public List GetAllCuttingsByBlankByPeriod(string blankId, DateTime fromDate, DateTime toDate) + { + return []; + } + + public List GetAllCuttingsByWorkerByPeriod(string workerId, DateTime fromDate, DateTime toDate) + { + return []; + } + + public List GetAllCuttningsByPeriod(DateTime fromDate, DateTime toDate) + { + return []; + } + + public CuttingDataModel GetCuttingByData(string data) + { + return new("", "", "", true, []); + } + + public void InsertSale(CuttingDataModel cuttingDataModel) + { + } + } +} diff --git a/PapaCarloProject/PapaCarloBusinessLogic/Implementations/PostBusinessLogicContract.cs b/PapaCarloProject/PapaCarloBusinessLogic/Implementations/PostBusinessLogicContract.cs new file mode 100644 index 0000000..29f766d --- /dev/null +++ b/PapaCarloProject/PapaCarloBusinessLogic/Implementations/PostBusinessLogicContract.cs @@ -0,0 +1,43 @@ +using PapaCarloContracts.BuisinessLogicsContracts; +using PapaCarloContracts.DataModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PapaCarloBusinessLogic.Implementations; + +internal class PostBusinessLogicContract : IPostBusinessLogicContract +{ + public void DeletePost(string id) + { + } + + public List GetAllDataOfPost(string postId) + { + return []; + } + + public List GetAllPosts(bool onlyActive) + { + return []; + } + + public PostDataModel GetPostByData(string data) + { + return new("", "", "", 0, true, DateTime.Now); + } + + public void InsertPost(PostDataModel postDataModel) + { + } + + public void RestorePost(string id) + { + } + + public void UpdatePost(PostDataModel postDataModel) + { + } +} diff --git a/PapaCarloProject/PapaCarloBusinessLogic/Implementations/ProductBusinessLogicContract.cs b/PapaCarloProject/PapaCarloBusinessLogic/Implementations/ProductBusinessLogicContract.cs new file mode 100644 index 0000000..78aa1a3 --- /dev/null +++ b/PapaCarloProject/PapaCarloBusinessLogic/Implementations/ProductBusinessLogicContract.cs @@ -0,0 +1,44 @@ +using PapaCarloContracts.BusinessLogicContracts; +using PapaCarloContracts.DataModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PapaCarloBusinessLogic.Implementations; + +internal class ProductBusinessLogicContract : IProductBusinessLogicContract +{ + public void DeleteProduct(string id) + { + } + + public List GetAllProducts(bool onlyActive = true) + { + return []; + } + + public List GetAllProductsByBlank(string blankId, bool onlyActive = true) + { + return []; + } + + public ProductDataModel GetProductByData(string data) + { + return new("", "", 0, 0, false); + } + + public List GetProductHistoryByProduct(string productId) + { + return []; + } + + public void InsertProduct(ProductDataModel productDataModel) + { + } + + public void UpdateProduct(ProductDataModel productDataModel) + { + } +} diff --git a/PapaCarloProject/PapaCarloBusinessLogic/Implementations/SalaryBusinessLogicContract.cs b/PapaCarloProject/PapaCarloBusinessLogic/Implementations/SalaryBusinessLogicContract.cs new file mode 100644 index 0000000..71bd018 --- /dev/null +++ b/PapaCarloProject/PapaCarloBusinessLogic/Implementations/SalaryBusinessLogicContract.cs @@ -0,0 +1,26 @@ +using PapaCarloContracts.BusinessLogicContracts; +using PapaCarloContracts.DataModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PapaCarloBusinessLogic.Implementations; + +internal class SalaryBusinessLogicContract : ISalaryBusinessLogicContract +{ + public void CalculateSalaryByMounth(DateTime date) + { + } + + public List GetAllSalariesByPeriod(DateTime fromDate, DateTime toDate) + { + return []; + } + + public List GetAllSalariesByPeriodByWorker(DateTime fromDate, DateTime toDate, string workerId) + { + return []; + } +} diff --git a/PapaCarloProject/PapaCarloBusinessLogic/Implementations/WorkerBusinessLogicContract.cs b/PapaCarloProject/PapaCarloBusinessLogic/Implementations/WorkerBusinessLogicContract.cs new file mode 100644 index 0000000..1d6f7af --- /dev/null +++ b/PapaCarloProject/PapaCarloBusinessLogic/Implementations/WorkerBusinessLogicContract.cs @@ -0,0 +1,49 @@ +using PapaCarloContracts.BusinessLogicContracts; +using PapaCarloContracts.DataModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PapaCarloBusinessLogic.Implementations; + +internal class WorkerBusinessLogicContract : IWorkerBusinessLogicContract +{ + public void DeleteWorker(string id) + { + } + + public List GetAllWorkers(bool onlyActive = true) + { + return []; + } + + public List GetAllWorkersByBirthDate(DateTime fromDate, DateTime toDate, bool onlyActive = true) + { + return []; + } + + public List GetAllWorkersByEmploymentDate(DateTime fromDate, DateTime toDate, bool onlyActive = true) + { + return []; + } + + public List GetAllWorkersByPost(string postId, bool onlyActive = true) + { + return []; + } + + public WorkerDataModel GetWorkerByData(string data) + { + return new("", "", "", DateTime.Now, DateTime.Now, true); + } + + public void InsertWorker(WorkerDataModel workerDataModel) + { + } + + public void UpdateWorker(WorkerDataModel workerDataModel) + { + } +} diff --git a/PapaCarloProject/PapaCarloBusinessLogic/PapaCarloBusinessLogic.csproj b/PapaCarloProject/PapaCarloBusinessLogic/PapaCarloBusinessLogic.csproj new file mode 100644 index 0000000..aefae07 --- /dev/null +++ b/PapaCarloProject/PapaCarloBusinessLogic/PapaCarloBusinessLogic.csproj @@ -0,0 +1,13 @@ + + + + net9.0 + enable + enable + + + + + + + diff --git a/PapaCarloProject/PapaCarloContracts/BusinessLogicContracts/ICuttingBusinessLogic.cs b/PapaCarloProject/PapaCarloContracts/BusinessLogicContracts/ICuttingBusinessLogicContract.cs similarity index 100% rename from PapaCarloProject/PapaCarloContracts/BusinessLogicContracts/ICuttingBusinessLogic.cs rename to PapaCarloProject/PapaCarloContracts/BusinessLogicContracts/ICuttingBusinessLogicContract.cs diff --git a/PapaCarloProject/PapaCarloProject.sln b/PapaCarloProject/PapaCarloProject.sln index 2cb9568..8a03a51 100644 --- a/PapaCarloProject/PapaCarloProject.sln +++ b/PapaCarloProject/PapaCarloProject.sln @@ -1,12 +1,14 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.12.35514.174 d17.12 +VisualStudioVersion = 17.12.35514.174 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PapaCarloContracts", "PapaCarloContracts\PapaCarloContracts.csproj", "{13339D4F-E8FC-4847-8D79-966E3CC2145D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PapaCarloTests", "PapaCarloTests\PapaCarloTests.csproj", "{30C630DE-DFCA-4672-B554-56984275B0AE}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PapaCarloBusinessLogic", "PapaCarloBusinessLogic\PapaCarloBusinessLogic.csproj", "{2966A76B-CF78-47C3-8F6D-F227A396B916}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +23,10 @@ Global {30C630DE-DFCA-4672-B554-56984275B0AE}.Debug|Any CPU.Build.0 = Debug|Any CPU {30C630DE-DFCA-4672-B554-56984275B0AE}.Release|Any CPU.ActiveCfg = Release|Any CPU {30C630DE-DFCA-4672-B554-56984275B0AE}.Release|Any CPU.Build.0 = Release|Any CPU + {2966A76B-CF78-47C3-8F6D-F227A396B916}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2966A76B-CF78-47C3-8F6D-F227A396B916}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2966A76B-CF78-47C3-8F6D-F227A396B916}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2966A76B-CF78-47C3-8F6D-F227A396B916}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE