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; } + } +}