From a40f08d577262c424a6dd6358d30aa5925784e98 Mon Sep 17 00:00:00 2001
From: maxnes3 <112558334+maxnes3@users.noreply.github.com>
Date: Mon, 1 May 2023 19:49:49 +0400
Subject: [PATCH] DataModels + Contracts is Done
---
.../PersonnelDepartmentBusinessLogic.csproj | 9 ++
.../BindingModels/DealBindingModel.cs | 26 ++++
.../BindingModels/DepartmentBindingModel.cs | 18 +++
.../BindingModels/EmployeeBindingModel.cs | 20 +++
.../BindingModels/PositionBindingModel.cs | 16 +++
.../BindingModels/TypeBindingModel.cs | 16 +++
.../BusinessLogicContracts/IDealLogic.cs | 20 +++
.../IDepartmentLogic.cs | 20 +++
.../BusinessLogicContracts/IEmployeeLogic.cs | 20 +++
.../BusinessLogicContracts/IPositionLogic.cs | 20 +++
.../BusinessLogicContracts/ITypeLogic.cs | 20 +++
.../PersonnelDepartmentContracts.csproj | 17 +++
.../SearchModels/DealSearchModel.cs | 17 +++
.../SearchModels/DepartmentSearchModel.cs | 15 +++
.../SearchModels/EmployeeSearchModel.cs | 19 +++
.../SearchModels/PositionSearchModel.cs | 15 +++
.../SearchModels/TypeSearchModel.cs | 15 +++
.../StoragesContracts/IDealStorage.cs | 20 +++
.../StoragesContracts/IDepartmentStorage.cs | 20 +++
.../StoragesContracts/IEmployeeStorage.cs | 20 +++
.../StoragesContracts/IPositionStorage.cs | 20 +++
.../StoragesContracts/ITypeStorage.cs | 20 +++
.../ViewModels/DealViewModel.cs | 32 +++++
.../ViewModels/DepartmentViewModel.cs | 20 +++
.../ViewModels/EmployeeViewModel.cs | 22 ++++
.../ViewModels/PositionViewModel.cs | 18 +++
.../ViewModels/TypeViewModel.cs | 18 +++
.../PersonnelDepartmentDataModels/IId.cs | 13 ++
.../Models/IDealModel.cs | 18 +++
.../Models/IDepartmentModel.cs | 14 ++
.../Models/IEmployeeModel.cs | 15 +++
.../Models/IPositionModel.cs | 13 ++
.../Models/ITypeModel.cs | 13 ++
.../PersonnelDepartmentDataModels.csproj | 9 ++
...ersonnelDepartmentDatabaseImplement.csproj | 9 ++
.../PersonnelDepartmentView.sln | 37 ++++++
.../PersonnelDepartmentView/Form1.Designer.cs | 39 ++++++
.../PersonnelDepartmentView/Form1.cs | 10 ++
.../PersonnelDepartmentView/Form1.resx | 120 ++++++++++++++++++
.../PersonnelDepartmentView.csproj | 11 ++
.../PersonnelDepartmentView/Program.cs | 17 +++
41 files changed, 851 insertions(+)
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentBusinessLogic/PersonnelDepartmentBusinessLogic.csproj
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/BindingModels/DealBindingModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/BindingModels/DepartmentBindingModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/BindingModels/EmployeeBindingModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/BindingModels/PositionBindingModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/BindingModels/TypeBindingModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/IDealLogic.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/IDepartmentLogic.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/IEmployeeLogic.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/IPositionLogic.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/ITypeLogic.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/PersonnelDepartmentContracts.csproj
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/DealSearchModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/DepartmentSearchModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/EmployeeSearchModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/PositionSearchModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/TypeSearchModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IDealStorage.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IDepartmentStorage.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IEmployeeStorage.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IPositionStorage.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/ITypeStorage.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/ViewModels/DealViewModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/ViewModels/DepartmentViewModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/ViewModels/EmployeeViewModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/ViewModels/PositionViewModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentContracts/ViewModels/TypeViewModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentDataModels/IId.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IDealModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IDepartmentModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IEmployeeModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IPositionModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/ITypeModel.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentDataModels/PersonnelDepartmentDataModels.csproj
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentDatabaseImplement/PersonnelDepartmentDatabaseImplement.csproj
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentView.sln
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentView/Form1.Designer.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentView/Form1.cs
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentView/Form1.resx
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentView/PersonnelDepartmentView.csproj
create mode 100644 PersonnelDepartmentView/PersonnelDepartmentView/Program.cs
diff --git a/PersonnelDepartmentView/PersonnelDepartmentBusinessLogic/PersonnelDepartmentBusinessLogic.csproj b/PersonnelDepartmentView/PersonnelDepartmentBusinessLogic/PersonnelDepartmentBusinessLogic.csproj
new file mode 100644
index 0000000..132c02c
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentBusinessLogic/PersonnelDepartmentBusinessLogic.csproj
@@ -0,0 +1,9 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
diff --git a/PersonnelDepartmentView/PersonnelDepartmentContracts/BindingModels/DealBindingModel.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/BindingModels/DealBindingModel.cs
new file mode 100644
index 0000000..ccc6687
--- /dev/null
+++ b/PersonnelDepartmentView/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/PersonnelDepartmentView/PersonnelDepartmentContracts/BindingModels/DepartmentBindingModel.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/BindingModels/DepartmentBindingModel.cs
new file mode 100644
index 0000000..6461ad0
--- /dev/null
+++ b/PersonnelDepartmentView/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 int Telephone { get; set; }
+
+ public int Id { get; set; }
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentContracts/BindingModels/EmployeeBindingModel.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/BindingModels/EmployeeBindingModel.cs
new file mode 100644
index 0000000..eaca1b2
--- /dev/null
+++ b/PersonnelDepartmentView/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/PersonnelDepartmentView/PersonnelDepartmentContracts/BindingModels/PositionBindingModel.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/BindingModels/PositionBindingModel.cs
new file mode 100644
index 0000000..eeeb680
--- /dev/null
+++ b/PersonnelDepartmentView/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/PersonnelDepartmentView/PersonnelDepartmentContracts/BindingModels/TypeBindingModel.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/BindingModels/TypeBindingModel.cs
new file mode 100644
index 0000000..1d82ca1
--- /dev/null
+++ b/PersonnelDepartmentView/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/PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/IDealLogic.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/IDealLogic.cs
new file mode 100644
index 0000000..2666977
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/IDealLogic.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 IDealLogic
+ {
+ List? ReadList(DealSearchModel? model);
+ DealViewModel? ReadElement(DealSearchModel model);
+ bool Create(DealBindingModel model);
+ bool Update(DealBindingModel model);
+ bool Delete(DealBindingModel model);
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/IDepartmentLogic.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/IDepartmentLogic.cs
new file mode 100644
index 0000000..bf248d1
--- /dev/null
+++ b/PersonnelDepartmentView/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/PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/IEmployeeLogic.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/IEmployeeLogic.cs
new file mode 100644
index 0000000..cc19891
--- /dev/null
+++ b/PersonnelDepartmentView/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/PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/IPositionLogic.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/IPositionLogic.cs
new file mode 100644
index 0000000..b58aba1
--- /dev/null
+++ b/PersonnelDepartmentView/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/PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/ITypeLogic.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/BusinessLogicContracts/ITypeLogic.cs
new file mode 100644
index 0000000..58febe7
--- /dev/null
+++ b/PersonnelDepartmentView/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/PersonnelDepartmentView/PersonnelDepartmentContracts/PersonnelDepartmentContracts.csproj b/PersonnelDepartmentView/PersonnelDepartmentContracts/PersonnelDepartmentContracts.csproj
new file mode 100644
index 0000000..6338db9
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentContracts/PersonnelDepartmentContracts.csproj
@@ -0,0 +1,17 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
+
+
+
+
+
+
+
+
diff --git a/PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/DealSearchModel.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/DealSearchModel.cs
new file mode 100644
index 0000000..5cc36ef
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/DealSearchModel.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 DealSearchModel
+ {
+ public int? Id { get; set; }
+
+ public DateTime? DateFrom { get; set; }
+
+ public DateTime? DateTo { get; set; }
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/DepartmentSearchModel.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/DepartmentSearchModel.cs
new file mode 100644
index 0000000..09a483f
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/DepartmentSearchModel.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 DepartmentSearchModel
+ {
+ public int? Id { get; set; }
+
+ public string? Name { get; set; }
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/EmployeeSearchModel.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/EmployeeSearchModel.cs
new file mode 100644
index 0000000..03c315e
--- /dev/null
+++ b/PersonnelDepartmentView/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/PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/PositionSearchModel.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/PositionSearchModel.cs
new file mode 100644
index 0000000..d808962
--- /dev/null
+++ b/PersonnelDepartmentView/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/PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/TypeSearchModel.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/SearchModels/TypeSearchModel.cs
new file mode 100644
index 0000000..d371a42
--- /dev/null
+++ b/PersonnelDepartmentView/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/PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IDealStorage.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IDealStorage.cs
new file mode 100644
index 0000000..0d63411
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IDealStorage.cs
@@ -0,0 +1,20 @@
+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(DealSearchModel model);
+ DealViewModel? Update(DealSearchModel model);
+ DealViewModel? Delete(DealSearchModel model);
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IDepartmentStorage.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IDepartmentStorage.cs
new file mode 100644
index 0000000..e7f5e02
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IDepartmentStorage.cs
@@ -0,0 +1,20 @@
+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(DepartmentSearchModel model);
+ DepartmentViewModel? Update(DepartmentSearchModel model);
+ DepartmentViewModel? Delete(DepartmentSearchModel model);
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IEmployeeStorage.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IEmployeeStorage.cs
new file mode 100644
index 0000000..3048eb5
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IEmployeeStorage.cs
@@ -0,0 +1,20 @@
+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(EmployeeSearchModel model);
+ EmployeeViewModel? Update(EmployeeSearchModel model);
+ EmployeeViewModel? Delete(EmployeeSearchModel model);
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IPositionStorage.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IPositionStorage.cs
new file mode 100644
index 0000000..24ee2d8
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/IPositionStorage.cs
@@ -0,0 +1,20 @@
+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(PositionSearchModel model);
+ PositionViewModel? Update(PositionSearchModel model);
+ PositionViewModel? Delete(PositionSearchModel model);
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/ITypeStorage.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/ITypeStorage.cs
new file mode 100644
index 0000000..195a4dd
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentContracts/StoragesContracts/ITypeStorage.cs
@@ -0,0 +1,20 @@
+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(TypeSearchModel model);
+ TypeViewModel? Update(TypeSearchModel model);
+ TypeViewModel? Delete(TypeSearchModel model);
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentContracts/ViewModels/DealViewModel.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/ViewModels/DealViewModel.cs
new file mode 100644
index 0000000..d1ce476
--- /dev/null
+++ b/PersonnelDepartmentView/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/PersonnelDepartmentView/PersonnelDepartmentContracts/ViewModels/DepartmentViewModel.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/ViewModels/DepartmentViewModel.cs
new file mode 100644
index 0000000..934102b
--- /dev/null
+++ b/PersonnelDepartmentView/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 int Telephone { get; set; }
+ [DisplayName("Код")]
+ public int Id { get; set; }
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentContracts/ViewModels/EmployeeViewModel.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/ViewModels/EmployeeViewModel.cs
new file mode 100644
index 0000000..17b8242
--- /dev/null
+++ b/PersonnelDepartmentView/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/PersonnelDepartmentView/PersonnelDepartmentContracts/ViewModels/PositionViewModel.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/ViewModels/PositionViewModel.cs
new file mode 100644
index 0000000..21aba53
--- /dev/null
+++ b/PersonnelDepartmentView/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/PersonnelDepartmentView/PersonnelDepartmentContracts/ViewModels/TypeViewModel.cs b/PersonnelDepartmentView/PersonnelDepartmentContracts/ViewModels/TypeViewModel.cs
new file mode 100644
index 0000000..a723382
--- /dev/null
+++ b/PersonnelDepartmentView/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; }
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentDataModels/IId.cs b/PersonnelDepartmentView/PersonnelDepartmentDataModels/IId.cs
new file mode 100644
index 0000000..cd2ecd6
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentDataModels/IId.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PersonnelDepartmentDataModels
+{
+ public interface IId
+ {
+ int Id { get; }
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IDealModel.cs b/PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IDealModel.cs
new file mode 100644
index 0000000..9293d18
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IDealModel.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PersonnelDepartmentDataModels.Models
+{
+ public interface IDealModel : IId
+ {
+ DateTime DateFrom { get; }
+ DateTime DateTo { get; }
+ int PositionId { get; }
+ int EmployeeId { get; }
+ int DepartmentId { get; }
+ int TypeId { get; }
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IDepartmentModel.cs b/PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IDepartmentModel.cs
new file mode 100644
index 0000000..703619b
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IDepartmentModel.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PersonnelDepartmentDataModels.Models
+{
+ public interface IDepartmentModel : IId
+ {
+ string Name { get; }
+ int Telephone { get; }
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IEmployeeModel.cs b/PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IEmployeeModel.cs
new file mode 100644
index 0000000..af249b7
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IEmployeeModel.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PersonnelDepartmentDataModels.Models
+{
+ public interface IEmployeeModel : IId
+ {
+ string FirstName { get; }
+ string LastName { get; }
+ string Patronymic { get; }
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IPositionModel.cs b/PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IPositionModel.cs
new file mode 100644
index 0000000..e162995
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/IPositionModel.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PersonnelDepartmentDataModels.Models
+{
+ public interface IPositionModel : IId
+ {
+ string Name { get; }
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/ITypeModel.cs b/PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/ITypeModel.cs
new file mode 100644
index 0000000..632b304
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentDataModels/Models/ITypeModel.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PersonnelDepartmentDataModels.Models
+{
+ public interface ITypeModel : IId
+ {
+ string Name { get; }
+ }
+}
diff --git a/PersonnelDepartmentView/PersonnelDepartmentDataModels/PersonnelDepartmentDataModels.csproj b/PersonnelDepartmentView/PersonnelDepartmentDataModels/PersonnelDepartmentDataModels.csproj
new file mode 100644
index 0000000..27ac386
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentDataModels/PersonnelDepartmentDataModels.csproj
@@ -0,0 +1,9 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
diff --git a/PersonnelDepartmentView/PersonnelDepartmentDatabaseImplement/PersonnelDepartmentDatabaseImplement.csproj b/PersonnelDepartmentView/PersonnelDepartmentDatabaseImplement/PersonnelDepartmentDatabaseImplement.csproj
new file mode 100644
index 0000000..132c02c
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentDatabaseImplement/PersonnelDepartmentDatabaseImplement.csproj
@@ -0,0 +1,9 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
diff --git a/PersonnelDepartmentView/PersonnelDepartmentView.sln b/PersonnelDepartmentView/PersonnelDepartmentView.sln
new file mode 100644
index 0000000..0f29dd5
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentView.sln
@@ -0,0 +1,37 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.5.33424.131
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PersonnelDepartmentView", "PersonnelDepartmentView\PersonnelDepartmentView.csproj", "{BB25BA47-9884-4BA9-A587-0C02F233E241}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PersonnelDepartmentDataModels", "PersonnelDepartmentDataModels\PersonnelDepartmentDataModels.csproj", "{609BE714-09CF-485B-A3EB-8998C5F5E4BD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PersonnelDepartmentContracts", "PersonnelDepartmentContracts\PersonnelDepartmentContracts.csproj", "{9A959A51-26F5-4B67-B54E-CD271E12C944}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {BB25BA47-9884-4BA9-A587-0C02F233E241}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BB25BA47-9884-4BA9-A587-0C02F233E241}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BB25BA47-9884-4BA9-A587-0C02F233E241}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BB25BA47-9884-4BA9-A587-0C02F233E241}.Release|Any CPU.Build.0 = Release|Any CPU
+ {609BE714-09CF-485B-A3EB-8998C5F5E4BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {609BE714-09CF-485B-A3EB-8998C5F5E4BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {609BE714-09CF-485B-A3EB-8998C5F5E4BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {609BE714-09CF-485B-A3EB-8998C5F5E4BD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9A959A51-26F5-4B67-B54E-CD271E12C944}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9A959A51-26F5-4B67-B54E-CD271E12C944}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9A959A51-26F5-4B67-B54E-CD271E12C944}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9A959A51-26F5-4B67-B54E-CD271E12C944}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {241FDB7E-BB62-47A5-B995-E3BDE531A12B}
+ EndGlobalSection
+EndGlobal
diff --git a/PersonnelDepartmentView/PersonnelDepartmentView/Form1.Designer.cs b/PersonnelDepartmentView/PersonnelDepartmentView/Form1.Designer.cs
new file mode 100644
index 0000000..293fc8b
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentView/Form1.Designer.cs
@@ -0,0 +1,39 @@
+namespace PersonnelDepartmentView
+{
+ partial class Form1
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(800, 450);
+ this.Text = "Form1";
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/PersonnelDepartmentView/PersonnelDepartmentView/Form1.cs b/PersonnelDepartmentView/PersonnelDepartmentView/Form1.cs
new file mode 100644
index 0000000..42acbba
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentView/Form1.cs
@@ -0,0 +1,10 @@
+namespace PersonnelDepartmentView
+{
+ public partial class Form1 : Form
+ {
+ public Form1()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/PersonnelDepartmentView/PersonnelDepartmentView/Form1.resx b/PersonnelDepartmentView/PersonnelDepartmentView/Form1.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentView/Form1.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/PersonnelDepartmentView/PersonnelDepartmentView/PersonnelDepartmentView.csproj b/PersonnelDepartmentView/PersonnelDepartmentView/PersonnelDepartmentView.csproj
new file mode 100644
index 0000000..b57c89e
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentView/PersonnelDepartmentView.csproj
@@ -0,0 +1,11 @@
+
+
+
+ WinExe
+ net6.0-windows
+ enable
+ true
+ enable
+
+
+
\ No newline at end of file
diff --git a/PersonnelDepartmentView/PersonnelDepartmentView/Program.cs b/PersonnelDepartmentView/PersonnelDepartmentView/Program.cs
new file mode 100644
index 0000000..32b8806
--- /dev/null
+++ b/PersonnelDepartmentView/PersonnelDepartmentView/Program.cs
@@ -0,0 +1,17 @@
+namespace PersonnelDepartmentView
+{
+ internal static class Program
+ {
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ // To customize application configuration such as set high DPI settings or default font,
+ // see https://aka.ms/applicationconfiguration.
+ ApplicationConfiguration.Initialize();
+ Application.Run(new Form1());
+ }
+ }
+}
\ No newline at end of file