From 242c0c3a4efd53bf8d7c4e7278a3fa51b47503ce Mon Sep 17 00:00:00 2001 From: bocchanskyy Date: Mon, 20 May 2024 01:11:07 +0400 Subject: [PATCH] I hope contracts is done --- PersonnelDepartment/PersonnelDepartment.sln | 6 ++++ .../BindingModels/BackUpBinidngModel.cs | 13 ++++++++ .../BindingModels/DealBindingModel.cs | 26 +++++++++++++++ .../BindingModels/DepartmentBindingModel.cs | 18 +++++++++++ .../BindingModels/EmployeeBindingModel.cs | 20 ++++++++++++ .../BindingModels/PositionBindingModel.cs | 16 ++++++++++ .../BindingModels/TypeBindingModel.cs | 16 ++++++++++ .../BusinessLogicContracts/IBackUpLogic.cs | 14 ++++++++ .../BusinessLogicContracts/IDealLogic.cs | 24 ++++++++++++++ .../IDepartmentLogic.cs | 20 ++++++++++++ .../BusinessLogicContracts/IEmployeeLogic.cs | 20 ++++++++++++ .../BusinessLogicContracts/IPositionLogic.cs | 20 ++++++++++++ .../BusinessLogicContracts/ITypeLogic.cs | 20 ++++++++++++ .../PersonnelDepartmentContracts.csproj | 9 ++++++ .../SearchModels/DealSearchModel.cs | 19 +++++++++++ .../SearchModels/DepartmentSearchModel.cs | 17 ++++++++++ .../SearchModels/EmployeeSearchModel.cs | 19 +++++++++++ .../SearchModels/PositionSearchModel.cs | 15 +++++++++ .../SearchModels/TypeSearchModel.cs | 15 +++++++++ .../StoragesContracts/IBackUpInfo.cs | 14 ++++++++ .../StoragesContracts/IDealStorage.cs | 25 +++++++++++++++ .../StoragesContracts/IDepartmentStorage.cs | 21 ++++++++++++ .../StoragesContracts/IEmployeeStorage.cs | 21 ++++++++++++ .../StoragesContracts/IPositionStorage.cs | 21 ++++++++++++ .../StoragesContracts/ITypeStorage.cs | 21 ++++++++++++ .../ViewModels/DealViewModel.cs | 32 +++++++++++++++++++ .../ViewModels/DepartmentViewModel.cs | 20 ++++++++++++ .../ViewModels/EmployeeViewModel.cs | 22 +++++++++++++ .../ViewModels/PositionViewModel.cs | 18 +++++++++++ .../ViewModels/TypeViewModel.cs | 18 +++++++++++ 30 files changed, 560 insertions(+) create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/BackUpBinidngModel.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/DealBindingModel.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/DepartmentBindingModel.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/EmployeeBindingModel.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/PositionBindingModel.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/TypeBindingModel.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IBackUpLogic.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IDealLogic.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IDepartmentLogic.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IEmployeeLogic.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IPositionLogic.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/ITypeLogic.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/PersonnelDepartmentContracts.csproj create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/DealSearchModel.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/DepartmentSearchModel.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/EmployeeSearchModel.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/PositionSearchModel.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/TypeSearchModel.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IBackUpInfo.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IDealStorage.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IDepartmentStorage.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IEmployeeStorage.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IPositionStorage.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/ITypeStorage.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/DealViewModel.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/DepartmentViewModel.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/EmployeeViewModel.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/PositionViewModel.cs create mode 100644 PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/TypeViewModel.cs diff --git a/PersonnelDepartment/PersonnelDepartment.sln b/PersonnelDepartment/PersonnelDepartment.sln index 81a6266..18fcf43 100644 --- a/PersonnelDepartment/PersonnelDepartment.sln +++ b/PersonnelDepartment/PersonnelDepartment.sln @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PersonnelDepartmentView", " EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PersonnelDepartmentDataModels", "PersonnelDepartmentDataModels\PersonnelDepartmentDataModels.csproj", "{CE6C1F1A-D6DB-4AA1-9F79-5A8CCB1C812C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PersonnelDepartmentContracts", "PersonnelDepartmentContracts\PersonnelDepartmentContracts.csproj", "{BE6B55EA-E7C1-4F66-B481-0CC9435922DD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +23,10 @@ Global {CE6C1F1A-D6DB-4AA1-9F79-5A8CCB1C812C}.Debug|Any CPU.Build.0 = Debug|Any CPU {CE6C1F1A-D6DB-4AA1-9F79-5A8CCB1C812C}.Release|Any CPU.ActiveCfg = Release|Any CPU {CE6C1F1A-D6DB-4AA1-9F79-5A8CCB1C812C}.Release|Any CPU.Build.0 = Release|Any CPU + {BE6B55EA-E7C1-4F66-B481-0CC9435922DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE6B55EA-E7C1-4F66-B481-0CC9435922DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE6B55EA-E7C1-4F66-B481-0CC9435922DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE6B55EA-E7C1-4F66-B481-0CC9435922DD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/BackUpBinidngModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/BackUpBinidngModel.cs new file mode 100644 index 0000000..d5394af --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/BackUpBinidngModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.BindingModels +{ + public class BackUpBinidngModel + { + public string FolderName { get; set; } = string.Empty; + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/DealBindingModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/DealBindingModel.cs new file mode 100644 index 0000000..ccc6687 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/DealBindingModel.cs @@ -0,0 +1,26 @@ +using PersonnelDepartmentDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.BindingModels +{ + public class DealBindingModel : IDealModel + { + public DateTime DateFrom { get; set; } + + public DateTime DateTo { get; set; } + + public int PositionId { get; set; } + + public int EmployeeId { get; set; } + + public int DepartmentId { get; set; } + + public int TypeId { get; set; } + + public int Id { get; set; } + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/DepartmentBindingModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/DepartmentBindingModel.cs new file mode 100644 index 0000000..0d52c50 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/DepartmentBindingModel.cs @@ -0,0 +1,18 @@ +using PersonnelDepartmentDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.BindingModels +{ + public class DepartmentBindingModel : IDepartmentModel + { + public string Name { get; set; } = string.Empty; + + public long Telephone { get; set; } + + public int Id { get; set; } + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/EmployeeBindingModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/EmployeeBindingModel.cs new file mode 100644 index 0000000..eaca1b2 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/EmployeeBindingModel.cs @@ -0,0 +1,20 @@ +using PersonnelDepartmentDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.BindingModels +{ + public class EmployeeBindingModel : IEmployeeModel + { + public string FirstName { get ;set; } = string.Empty; + + public string LastName { get; set; } = string.Empty; + + public string Patronymic { get; set; } = string.Empty; + + public int Id { get; set; } + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/PositionBindingModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/PositionBindingModel.cs new file mode 100644 index 0000000..eeeb680 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/PositionBindingModel.cs @@ -0,0 +1,16 @@ +using PersonnelDepartmentDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.BindingModels +{ + public class PositionBindingModel : IPositionModel + { + public string Name { get; set; } = string.Empty; + + public int Id { get; set; } + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/TypeBindingModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/TypeBindingModel.cs new file mode 100644 index 0000000..1d82ca1 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/BindingModels/TypeBindingModel.cs @@ -0,0 +1,16 @@ +using PersonnelDepartmentDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.BindingModels +{ + public class TypeBindingModel : ITypeModel + { + public string Name { get; set; } = string.Empty; + + public int Id { get; set; } + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IBackUpLogic.cs b/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IBackUpLogic.cs new file mode 100644 index 0000000..26e3301 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IBackUpLogic.cs @@ -0,0 +1,14 @@ +using PersonnelDepartmentContracts.BindingModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.BusinessLogicContracts +{ + public interface IBackUpLogic + { + void CreateBackUp(BackUpBinidngModel model); + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IDealLogic.cs b/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IDealLogic.cs new file mode 100644 index 0000000..3f49d1a --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IDealLogic.cs @@ -0,0 +1,24 @@ +using PersonnelDepartmentContracts.BindingModels; +using PersonnelDepartmentContracts.SearchModels; +using PersonnelDepartmentContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.BusinessLogicContracts +{ + public interface IDealLogic + { + List? ReadList(DealSearchModel? model); + DealViewModel? ReadElement(DealSearchModel model); + bool Create(DealBindingModel model); + bool Update(DealBindingModel model); + bool Delete(DealBindingModel model); + string SetTest(int count); + string GetTest(int count); + string DiffGetTest(int count); + bool ClearList(); + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IDepartmentLogic.cs b/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IDepartmentLogic.cs new file mode 100644 index 0000000..bf248d1 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IDepartmentLogic.cs @@ -0,0 +1,20 @@ +using PersonnelDepartmentContracts.BindingModels; +using PersonnelDepartmentContracts.SearchModels; +using PersonnelDepartmentContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.BusinessLogicContracts +{ + public interface IDepartmentLogic + { + List? ReadList(DepartmentSearchModel? model); + DepartmentViewModel? ReadElement(DepartmentSearchModel model); + bool Create(DepartmentBindingModel model); + bool Update(DepartmentBindingModel model); + bool Delete(DepartmentBindingModel model); + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IEmployeeLogic.cs b/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IEmployeeLogic.cs new file mode 100644 index 0000000..cc19891 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IEmployeeLogic.cs @@ -0,0 +1,20 @@ +using PersonnelDepartmentContracts.BindingModels; +using PersonnelDepartmentContracts.SearchModels; +using PersonnelDepartmentContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.BusinessLogicContracts +{ + public interface IEmployeeLogic + { + List? ReadList(EmployeeSearchModel? model); + EmployeeViewModel? ReadElement(EmployeeSearchModel model); + bool Create(EmployeeBindingModel model); + bool Update(EmployeeBindingModel model); + bool Delete(EmployeeBindingModel model); + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IPositionLogic.cs b/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IPositionLogic.cs new file mode 100644 index 0000000..b58aba1 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/IPositionLogic.cs @@ -0,0 +1,20 @@ +using PersonnelDepartmentContracts.BindingModels; +using PersonnelDepartmentContracts.SearchModels; +using PersonnelDepartmentContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.BusinessLogicContracts +{ + public interface IPositionLogic + { + List? ReadList(PositionSearchModel? model); + PositionViewModel? ReadElement(PositionSearchModel model); + bool Create(PositionBindingModel model); + bool Update(PositionBindingModel model); + bool Delete(PositionBindingModel model); + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/ITypeLogic.cs b/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/ITypeLogic.cs new file mode 100644 index 0000000..58febe7 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/BusinessLogicContracts/ITypeLogic.cs @@ -0,0 +1,20 @@ +using PersonnelDepartmentContracts.BindingModels; +using PersonnelDepartmentContracts.SearchModels; +using PersonnelDepartmentContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.BusinessLogicContracts +{ + public interface ITypeLogic + { + List? ReadList(TypeSearchModel? model); + TypeViewModel? ReadElement(TypeSearchModel model); + bool Create(TypeBindingModel model); + bool Update(TypeBindingModel model); + bool Delete(TypeBindingModel model); + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/PersonnelDepartmentContracts.csproj b/PersonnelDepartment/PersonnelDepartmentContracts/PersonnelDepartmentContracts.csproj new file mode 100644 index 0000000..fa71b7a --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/PersonnelDepartmentContracts.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/DealSearchModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/DealSearchModel.cs new file mode 100644 index 0000000..a204d92 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/DealSearchModel.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.SearchModels +{ + public class DealSearchModel + { + public int? Id { get; set; } + public DateTime? DateFrom { get; set; } + public DateTime? DateTo { get; set; } + public int? PositionId { get; set; } + public int? EmployeeId { get; set; } + public int? DepartmentId { get; set; } + public int? TypeId { get; set; } + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/DepartmentSearchModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/DepartmentSearchModel.cs new file mode 100644 index 0000000..20b19ed --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/DepartmentSearchModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.SearchModels +{ + public class DepartmentSearchModel + { + public int? Id { get; set; } + + public string? Name { get; set; } + + public long? Telephone { get; set; } + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/EmployeeSearchModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/EmployeeSearchModel.cs new file mode 100644 index 0000000..03c315e --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/EmployeeSearchModel.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.SearchModels +{ + public class EmployeeSearchModel + { + public int? Id { get; set; } + + public string? FirstName { get; set; } + + public string? LastName { get; set; } + + public string? Patronymic { get; set; } + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/PositionSearchModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/PositionSearchModel.cs new file mode 100644 index 0000000..d808962 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/PositionSearchModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.SearchModels +{ + public class PositionSearchModel + { + public int? Id { get; set; } + + public string? Name { get; set; } + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/TypeSearchModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/TypeSearchModel.cs new file mode 100644 index 0000000..d371a42 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/SearchModels/TypeSearchModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.SearchModels +{ + public class TypeSearchModel + { + public int? Id { get; set; } + + public string? Name { get; set; } + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IBackUpInfo.cs b/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IBackUpInfo.cs new file mode 100644 index 0000000..a6d271f --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IBackUpInfo.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.StoragesContracts +{ + public interface IBackUpInfo + { + List? GetList() where T : class, new(); + Type? GetTypeByModelInterface(string modelInterfaceName); + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IDealStorage.cs b/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IDealStorage.cs new file mode 100644 index 0000000..07c864f --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IDealStorage.cs @@ -0,0 +1,25 @@ +using PersonnelDepartmentContracts.BindingModels; +using PersonnelDepartmentContracts.SearchModels; +using PersonnelDepartmentContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.StoragesContracts +{ + public interface IDealStorage + { + List GetFullList(); + List GetFilteredList(DealSearchModel model); + DealViewModel? GetElement(DealSearchModel model); + DealViewModel? Insert(DealBindingModel model); + DealViewModel? Update(DealBindingModel model); + DealViewModel? Delete(DealBindingModel model); + string SetTest(int count); + string GetTest(int count); + string DiffGetTest(int count); + bool ClearList(); + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IDepartmentStorage.cs b/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IDepartmentStorage.cs new file mode 100644 index 0000000..887fa33 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IDepartmentStorage.cs @@ -0,0 +1,21 @@ +using PersonnelDepartmentContracts.BindingModels; +using PersonnelDepartmentContracts.SearchModels; +using PersonnelDepartmentContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.StoragesContracts +{ + public interface IDepartmentStorage + { + List GetFullList(); + List GetFilteredList(DepartmentSearchModel model); + DepartmentViewModel? GetElement(DepartmentSearchModel model); + DepartmentViewModel? Insert(DepartmentBindingModel model); + DepartmentViewModel? Update(DepartmentBindingModel model); + DepartmentViewModel? Delete(DepartmentBindingModel model); + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IEmployeeStorage.cs b/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IEmployeeStorage.cs new file mode 100644 index 0000000..9c469ca --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IEmployeeStorage.cs @@ -0,0 +1,21 @@ +using PersonnelDepartmentContracts.BindingModels; +using PersonnelDepartmentContracts.SearchModels; +using PersonnelDepartmentContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.StoragesContracts +{ + public interface IEmployeeStorage + { + List GetFullList(); + List GetFilteredList(EmployeeSearchModel model); + EmployeeViewModel? GetElement(EmployeeSearchModel model); + EmployeeViewModel? Insert(EmployeeBindingModel model); + EmployeeViewModel? Update(EmployeeBindingModel model); + EmployeeViewModel? Delete(EmployeeBindingModel model); + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IPositionStorage.cs b/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IPositionStorage.cs new file mode 100644 index 0000000..581f355 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/IPositionStorage.cs @@ -0,0 +1,21 @@ +using PersonnelDepartmentContracts.BindingModels; +using PersonnelDepartmentContracts.SearchModels; +using PersonnelDepartmentContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.StoragesContracts +{ + public interface IPositionStorage + { + List GetFullList(); + List GetFilteredList(PositionSearchModel model); + PositionViewModel? GetElement(PositionSearchModel model); + PositionViewModel? Insert(PositionBindingModel model); + PositionViewModel? Update(PositionBindingModel model); + PositionViewModel? Delete(PositionBindingModel model); + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/ITypeStorage.cs b/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/ITypeStorage.cs new file mode 100644 index 0000000..9147ead --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/StoragesContracts/ITypeStorage.cs @@ -0,0 +1,21 @@ +using PersonnelDepartmentContracts.BindingModels; +using PersonnelDepartmentContracts.SearchModels; +using PersonnelDepartmentContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelTypeContracts.StoragesContracts +{ + public interface ITypeStorage + { + List GetFullList(); + List GetFilteredList(TypeSearchModel model); + TypeViewModel? GetElement(TypeSearchModel model); + TypeViewModel? Insert(TypeBindingModel model); + TypeViewModel? Update(TypeBindingModel model); + TypeViewModel? Delete(TypeBindingModel model); + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/DealViewModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/DealViewModel.cs new file mode 100644 index 0000000..d1ce476 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/DealViewModel.cs @@ -0,0 +1,32 @@ +using PersonnelDepartmentDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.ViewModels +{ + public class DealViewModel : IDealModel + { + [DisplayName("Дата с")] + public DateTime DateFrom { get; set; } + [DisplayName("Дата по")] + public DateTime DateTo { get; set; } + public int PositionId { get; set; } + [DisplayName("Должность")] + public string PositionName { get; set; } = string.Empty; + public int EmployeeId { get; set; } + [DisplayName("ФИО Сотрудника")] + public string EmployeeName { get; set; } = string.Empty; + public int DepartmentId { get; set; } + [DisplayName("Отдел")] + public string DepartmentName { get; set; } = string.Empty; + public int TypeId { get; set; } + [DisplayName("Тип договора")] + public string TypeName { get; set; } = string.Empty; + [DisplayName("Номер")] + public int Id { get; set; } + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/DepartmentViewModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/DepartmentViewModel.cs new file mode 100644 index 0000000..a520b31 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/DepartmentViewModel.cs @@ -0,0 +1,20 @@ +using PersonnelDepartmentDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.ViewModels +{ + public class DepartmentViewModel : IDepartmentModel + { + [DisplayName("Название")] + public string Name { get; set; } = string.Empty; + [DisplayName("Контактный телефон")] + public long Telephone { get; set; } + [DisplayName("Код")] + public int Id { get; set; } + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/EmployeeViewModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/EmployeeViewModel.cs new file mode 100644 index 0000000..17b8242 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/EmployeeViewModel.cs @@ -0,0 +1,22 @@ +using PersonnelDepartmentDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.ViewModels +{ + public class EmployeeViewModel : IEmployeeModel + { + [DisplayName("Имя")] + public string FirstName { get; set; } = string.Empty; + [DisplayName("Фамилия")] + public string LastName { get; set; } = string.Empty; + [DisplayName("Отчество")] + public string Patronymic { get; set; } = string.Empty; + [DisplayName("Код")] + public int Id { get; set; } + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/PositionViewModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/PositionViewModel.cs new file mode 100644 index 0000000..21aba53 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/PositionViewModel.cs @@ -0,0 +1,18 @@ +using PersonnelDepartmentDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.ViewModels +{ + public class PositionViewModel : IPositionModel + { + [DisplayName("Название")] + public string Name { get; set; } = string.Empty; + [DisplayName("Код")] + public int Id { get; set; } + } +} diff --git a/PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/TypeViewModel.cs b/PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/TypeViewModel.cs new file mode 100644 index 0000000..a723382 --- /dev/null +++ b/PersonnelDepartment/PersonnelDepartmentContracts/ViewModels/TypeViewModel.cs @@ -0,0 +1,18 @@ +using PersonnelDepartmentDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PersonnelDepartmentContracts.ViewModels +{ + public class TypeViewModel : ITypeModel + { + [DisplayName("Название")] + public string Name { get; set; } = string.Empty; + [DisplayName("Код")] + public int Id { get; set; } + } +}