PIbd-23 Gutorov I.A. Second LabWork #3

Open
vasmaae wants to merge 17 commits from Task_2_BusinessLogic into Task_1_Models
7 changed files with 189 additions and 1 deletions
Showing only changes of commit 4fdff7b335 - Show all commits

View File

@ -0,0 +1,30 @@
using TheCyclopsContracts.BusinessLogicContracts;
using TheCyclopsContracts.DataModels;
using TheCyclopsContracts.Enums;
namespace TheCyclopsBusinessLogic.Implementations;
internal class ComponentBusinessLogicContract : IComponentBusinessLogicContract
{
public List<ComponentDataModel> GetAllComponents(bool onlyActive = true)
{
return [];
}
public ComponentDataModel GetComponentByData(string data)
{
return new ComponentDataModel("", "", ComponentType.None, 0, false);
}
public void InsertComponent(ComponentDataModel componentDataModel)
{
}
public void UpdateComponent(ComponentDataModel componentDataModel)
{
}
public void DeleteComponent(string id)
{
}
}

View File

@ -0,0 +1,44 @@
using TheCyclopsContracts.BusinessLogicContracts;
using TheCyclopsContracts.DataModels;
namespace TheCyclopsBusinessLogic.Implementations;
internal class EmployeeBusinessLogicContract : IEmployeeBusinessLogicContract
{
public List<EmployeeDataModel> GetAllEmployees(bool onlyActive = true)
{
return [];
}
public List<EmployeeDataModel> GetAllEmployeesByPost(string postId, bool onlyActive = true)
{
return [];
}
public List<EmployeeDataModel> GetAllEmployeesByBirthDate(DateTime fromDate, DateTime toDate, bool onlyActive = true)
{
return [];
}
public List<EmployeeDataModel> GetAllEmployeesByEmploymentDate(DateTime fromDate, DateTime toDate, bool onlyActive = true)
{
return [];
}
public EmployeeDataModel GetEmployeeByData(string data)
{
return new EmployeeDataModel("", "", "", "", DateTime.Now, DateTime.Now, false);
}
public void InsertEmployee(EmployeeDataModel employeeDataModel)
{
}
public void UpdateEmployee(EmployeeDataModel employeeDataModel)
{
}
public void DeleteEmployee(string id)
{
}
}

View File

@ -0,0 +1,35 @@
using TheCyclopsContracts.BusinessLogicContracts;
using TheCyclopsContracts.DataModels;
namespace TheCyclopsBusinessLogic.Implementations;
internal class InstallationBusinessLogicContract : IInstallationBusinessLogicContract
{
public List<InstallationDataModel> GetAllInstallationsByPeriod(DateTime fromDate, DateTime toDate)
{
return [];
}
public List<InstallationDataModel> GetAllInstallationsByEmployeeByPeriod(string employeeId, DateTime fromDate, DateTime toDate)
{
return [];
}
public List<InstallationDataModel> GetAllInstallationsByComponentByPeriod(string componentId, DateTime fromDate, DateTime toDate)
{
return [];
}
public InstallationDataModel GetInstallationByData(string data)
{
return new InstallationDataModel("", "", DateTime.Now, 0, 0, false, []);
}
public void InsertInstallation(InstallationDataModel installationDataModel)
{
}
public void CancelInstallation(string id)
{
}
}

View File

@ -0,0 +1,39 @@
using TheCyclopsContracts.BusinessLogicContracts;
using TheCyclopsContracts.DataModels;
using TheCyclopsContracts.Enums;
namespace TheCyclopsBusinessLogic.Implementations;
internal class PostBusinessLogicContract : IPostBusinessLogicContract
{
public List<PostDataModel> GetAllPosts(bool onlyActive)
{
return [];
}
public List<PostDataModel> GetAllDataOfPost(string postId)
{
return [];
}
public PostDataModel GetPostByData(string data)
{
return new PostDataModel("", "", PostType.None, 0, false, DateTime.Now);
}
public void InsertPost(PostDataModel postDataModel)
{
}
public void UpdatePost(PostDataModel postDataModel)
{
}
public void DeletePost(string id)
{
}
public void RestorePost(string id)
{
}
}

View File

@ -0,0 +1,21 @@
using TheCyclopsContracts.BusinessLogicContracts;
using TheCyclopsContracts.DataModels;
namespace TheCyclopsBusinessLogic.Implementations;
internal class SalaryBusinessLogicContract : ISalaryBusinessLogicContract
{
public List<SalaryDataModel> GetAllSalariesByPeriod(DateTime fromDate, DateTime toDate)
{
return [];
}
public List<SalaryDataModel> GetAllSalariesByPeriodByEmployee(DateTime fromDate, DateTime toDate, string employeeId)
{
return [];
}
public void CalculateSalaryByMounth(DateTime date)
{
}
}

View File

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\TheCyclopsContracts\TheCyclopsContracts.csproj" />
</ItemGroup>
</Project>

View File

@ -1,12 +1,14 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35707.178 d17.12
VisualStudioVersion = 17.12.35707.178
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TheCyclopsContracts", "TheCyclopsContracts\TheCyclopsContracts.csproj", "{01934235-715E-4B95-B859-48E8C89DA7CB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TheCyclopsTests", "TheCyclopsTests\TheCyclopsTests.csproj", "{78C9F1B1-ABD3-4ED2-A5DC-84766DEEFC77}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TheCyclopsBusinessLogic", "TheCyclopsBusinessLogic\TheCyclopsBusinessLogic.csproj", "{A696C749-D71B-4D1E-B2B0-1E1503F033F0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -21,6 +23,10 @@ Global
{78C9F1B1-ABD3-4ED2-A5DC-84766DEEFC77}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78C9F1B1-ABD3-4ED2-A5DC-84766DEEFC77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78C9F1B1-ABD3-4ED2-A5DC-84766DEEFC77}.Release|Any CPU.Build.0 = Release|Any CPU
{A696C749-D71B-4D1E-B2B0-1E1503F033F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A696C749-D71B-4D1E-B2B0-1E1503F033F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A696C749-D71B-4D1E-B2B0-1E1503F033F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A696C749-D71B-4D1E-B2B0-1E1503F033F0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE