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

Open
vasmaae wants to merge 17 commits from Task_2_BusinessLogic into Task_1_Models
5 changed files with 93 additions and 0 deletions
Showing only changes of commit 4d3cf6cefb - Show all commits

View File

@ -0,0 +1,16 @@
using TheCyclopsContracts.DataModels;
namespace TheCyclopsContracts.BusinessLogicContracts;
public interface IComponentBusinessLogicContract
{
List<ComponentDataModel> GetAllComponents(bool onlyActive = true);
ComponentDataModel GetComponentByData(string data);
void InsertComponent(ComponentDataModel componentDataModel);
void UpdateComponent(ComponentDataModel componentDataModel);
void DeleteComponent(string id);
}

View File

@ -0,0 +1,24 @@
using TheCyclopsContracts.DataModels;
namespace TheCyclopsContracts.BusinessLogicContracts;
public interface IEmployeeBusinessLogicContract
{
List<EmployeeDataModel> GetAllEmployees(bool onlyActive = true);
List<EmployeeDataModel> GetAllEmployeesByPost(string postId, bool onlyActive = true);
List<EmployeeDataModel> GetAllEmployeesByBirthDate(DateTime fromDate, DateTime toDate,
bool onlyActive = true);
List<EmployeeDataModel> GetAllEmployeesByEmploymentDate(DateTime fromDate, DateTime toDate,
bool onlyActive = true);
EmployeeDataModel GetEmployeeByData(string data);
void InsertEmployee(EmployeeDataModel employeeDataModel);
void UpdateEmployee(EmployeeDataModel employeeDataModel);
void DeleteEmployee(string id);
}

View File

@ -0,0 +1,20 @@
using TheCyclopsContracts.DataModels;
namespace TheCyclopsContracts.BusinessLogicContracts;
public interface IInstallationBusinessLogicContract
{
List<InstallationDataModel> GetAllInstallationsByPeriod(DateTime fromDate, DateTime toDate);
List<InstallationDataModel> GetAllInstallationsByEmployeeByPeriod(string employeeId,
DateTime fromDate, DateTime toDate);
List<InstallationDataModel> GetAllInstallationsByComponentByPeriod(string componentId,
DateTime fromDate, DateTime toDate);
InstallationDataModel GetInstallationByData(string data);
void InsertInstallation(InstallationDataModel installationDataModel);
void CancelInstallation(string id);
}

View File

@ -0,0 +1,20 @@
using TheCyclopsContracts.DataModels;
namespace TheCyclopsContracts.BusinessLogicContracts;
public interface IPostBusinessLogicContract
{
List<PostDataModel> GetAllPosts(bool onlyActive);
List<PostDataModel> GetAllDataOfPost(string postId);
PostDataModel GetPostByData(string data);
void InsertPost(PostDataModel postDataModel);
void UpdatePost(PostDataModel postDataModel);
void DeletePost(string id);
void RestorePost(string id);
}

View File

@ -0,0 +1,13 @@
using TheCyclopsContracts.DataModels;
namespace TheCyclopsContracts.BusinessLogicContracts;
public interface ISalaryBusinessLogicContract
{
List<SalaryDataModel> GetAllSalariesByPeriod(DateTime fromDate, DateTime toDate);
List<SalaryDataModel> GetAllSalariesByPeriodByEmployee(DateTime fromDate, DateTime toDate,
string employeeId);
void CalculateSalaryByMounth(DateTime date);
}