From 07060426c475decc1df70f0640746272b9929ae1 Mon Sep 17 00:00:00 2001 From: kotcheshir73 Date: Sat, 19 Mar 2022 19:58:10 +0400 Subject: [PATCH] =?UTF-8?q?=D1=80=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3,=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=82=D1=80=D0=B0=D0=BA=D1=82=D0=BE=D0=B2,?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=BE=20?= =?UTF-8?q?=D0=BA=20=D0=B1=D0=B5=D0=B7=D0=BE=D0=BF=D0=B0=D1=81=D0=BD=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AbstractGenerticEntityService.cs | 2 +- .../GenericControlEntityElement.cs | 16 ++--- .../MainControls/GenericControlEntityList.cs | 17 +++--- .../BusinessLogics/GenericBusinessLogic.cs | 6 +- .../Common/ToolsModule/Interfaces/IErrors.cs | 12 ++++ .../Interfaces/IGenericEntityLogic.cs | 61 +++++++++++++++++++ ...ityService.cs => IGenericEntityService.cs} | 4 +- .../Interfaces/IAcademicPlanRecordService.cs | 2 +- .../IAcademicPlanRecordTimeNormHourService.cs | 2 +- .../Interfaces/IAcademicPlanService.cs | 2 +- .../Interfaces/IClassroomService.cs | 2 +- .../Interfaces/IDisciplineBlockService.cs | 2 +- .../Interfaces/IDisciplineService.cs | 2 +- .../Interfaces/IEducationDirectionService.cs | 2 +- .../Interfaces/IEmployeePostService.cs | 2 +- .../Interfaces/IEmployeeService.cs | 2 +- .../ILecturerAcademicDegreeService.cs | 2 +- .../ILecturerAcademicRankService.cs | 2 +- .../Interfaces/ILecturerPostService.cs | 2 +- .../Interfaces/ILecturerService.cs | 2 +- .../Interfaces/IOrderService.cs | 2 +- .../Interfaces/IOrderStudentRecordService.cs | 2 +- .../IOrderSyncHistoryRecordService.cs | 2 +- .../Interfaces/IOrderSyncHistoryService.cs | 2 +- .../Interfaces/IPostService.cs | 2 +- .../Interfaces/IStudentGroupService.cs | 2 +- .../Interfaces/IStudentService.cs | 2 +- .../Interfaces/ITimeNormService.cs | 2 +- DepartmentPortal/DepartmentPortal.sln | 13 +++- .../BusinessLogics/AccessBusinessLogic.cs | 16 ----- .../BusinessLogics/BackupBusinessLogic.cs | 19 +++--- .../EnviromentSettingBusinessLogic.cs | 17 ------ .../AccessBusinessLogic.cs | 17 ++++++ .../EnviromentSettingBusinessLogic.cs | 18 ++++++ .../GenericBusinessLogic/RoleBusinessLogic.cs | 17 ++++++ .../UserBusinessLogic.cs | 21 ++++--- .../UserRoleBusinessLogic.cs | 17 ++++++ .../BusinessLogics/RoleBusinessLogic.cs | 16 ----- .../SynchronizationBusinessLogic.cs | 15 ++--- .../BusinessLogics/UserRoleBusinessLogic.cs | 16 ----- .../Interfaces/IAccessService.cs | 10 --- .../Interfaces/IEnviromentSettingService.cs | 10 --- .../Interfaces/IRoleService.cs | 10 --- .../Interfaces/ISynchronizationService.cs | 17 ------ .../Interfaces/IUserRoleService.cs | 10 --- .../Interfaces/IUserService.cs | 10 --- .../SecurityBusinessLogic.csproj | 5 +- .../SecurityLogicDependencyRegistration.cs | 24 ++++++++ .../BindingModels/AccessBindingModels.cs | 2 +- .../BindingModels/BackupBindingModel.cs | 2 +- .../EnviromentSettingBindingModels.cs | 2 +- .../BindingModels/RoleBindingModels.cs | 2 +- .../BindingModels/UserBindingModels.cs | 2 +- .../BindingModels/UserRoleBindingModels.cs | 2 +- .../SecurityContract/Logics/IBackupLogic.cs | 25 ++++++++ .../IGenericEntityLogic/IAccessLogic.cs | 11 ++++ .../IEnviromentSettingLogic.cs | 11 ++++ .../Logics/IGenericEntityLogic/IRoleLogic.cs | 11 ++++ .../Logics/IGenericEntityLogic/IUserLogic.cs | 20 ++++++ .../IGenericEntityLogic/IUserRoleLogic.cs | 11 ++++ .../Logics/ISynchronizationLogic.cs | 17 ++++++ .../SecurityContract/SecurityContract.csproj | 12 ++++ .../Services}/IBackupService.cs | 14 ++--- .../IGenericEntityService/IAccessService.cs | 10 +++ .../IEnviromentSettingService.cs | 10 +++ .../IGenericEntityService/IRoleService.cs | 10 +++ .../IGenericEntityService/IUserRoleService.cs | 10 +++ .../IGenericEntityService/IUserService.cs | 10 +++ .../Services/ISynchronizationService.cs | 17 ++++++ .../ViewModels/AccessViewModels.cs | 2 +- .../ViewModels/EnviromentSettingViewModels.cs | 2 +- .../ViewModels/RoleViewModels.cs | 2 +- .../ViewModels/UserRoleViewModels.cs | 2 +- .../ViewModels/UserViewModels.cs | 2 +- .../Implementations/AccessService.cs | 16 ++--- .../BackupJsonContractService.cs | 20 +++--- .../EnviromentSettingService.cs | 16 ++--- .../Implementations/RoleService.cs | 18 +++--- .../Implementations/SynchronizationService.cs | 12 ++-- .../Implementations/UserRoleService.cs | 16 ++--- .../Implementations/UserService.cs | 18 +++--- .../SecurityDatabaseImplementation.csproj | 2 +- .../SecurityImplementationExtensions.cs | 9 +-- .../Access/ControlAccessElement.cs | 20 +++--- .../Access/ControlAccessList.cs | 32 +++++----- .../ControlEnviromentSettingElement.cs | 20 +++--- .../ControlEnviromentSettingList.cs | 22 +++---- .../EntityControls/Role/ControlRoleElement.cs | 20 +++--- .../EntityControls/Role/ControlRoleList.cs | 22 +++---- .../EntityControls/User/ControlUserElement.cs | 20 +++--- .../EntityControls/User/ControlUserList.cs | 20 +++--- .../UserRole/ControlUserRoleElement.cs | 20 +++--- .../UserRole/ControlUserRoleList.cs | 22 +++---- .../SecurityWindowsDesktop.csproj | 2 +- .../SpecialControls/BackupControl.cs | 24 ++++---- .../SpecialControls/SynchronizationControl.cs | 22 +++---- 96 files changed, 653 insertions(+), 419 deletions(-) create mode 100644 DepartmentPortal/Common/ToolsModule/Interfaces/IErrors.cs create mode 100644 DepartmentPortal/Common/ToolsModule/Interfaces/IGenericEntityLogic.cs rename DepartmentPortal/Common/ToolsModule/Interfaces/{IGenerticEntityService.cs => IGenericEntityService.cs} (89%) delete mode 100644 DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/AccessBusinessLogic.cs delete mode 100644 DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/EnviromentSettingBusinessLogic.cs create mode 100644 DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/AccessBusinessLogic.cs create mode 100644 DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/EnviromentSettingBusinessLogic.cs create mode 100644 DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/RoleBusinessLogic.cs rename DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/{ => GenericBusinessLogic}/UserBusinessLogic.cs (70%) create mode 100644 DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/UserRoleBusinessLogic.cs delete mode 100644 DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/RoleBusinessLogic.cs delete mode 100644 DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/UserRoleBusinessLogic.cs delete mode 100644 DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IAccessService.cs delete mode 100644 DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IEnviromentSettingService.cs delete mode 100644 DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IRoleService.cs delete mode 100644 DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/ISynchronizationService.cs delete mode 100644 DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IUserRoleService.cs delete mode 100644 DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IUserService.cs create mode 100644 DepartmentPortal/Security/SecurityBusinessLogic/SecurityLogicDependencyRegistration.cs rename DepartmentPortal/Security/{SecurityBusinessLogic => SecurityContract}/BindingModels/AccessBindingModels.cs (94%) rename DepartmentPortal/Security/{SecurityBusinessLogic => SecurityContract}/BindingModels/BackupBindingModel.cs (93%) rename DepartmentPortal/Security/{SecurityBusinessLogic => SecurityContract}/BindingModels/EnviromentSettingBindingModels.cs (94%) rename DepartmentPortal/Security/{SecurityBusinessLogic => SecurityContract}/BindingModels/RoleBindingModels.cs (93%) rename DepartmentPortal/Security/{SecurityBusinessLogic => SecurityContract}/BindingModels/UserBindingModels.cs (95%) rename DepartmentPortal/Security/{SecurityBusinessLogic => SecurityContract}/BindingModels/UserRoleBindingModels.cs (93%) create mode 100644 DepartmentPortal/Security/SecurityContract/Logics/IBackupLogic.cs create mode 100644 DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IAccessLogic.cs create mode 100644 DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IEnviromentSettingLogic.cs create mode 100644 DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IRoleLogic.cs create mode 100644 DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IUserLogic.cs create mode 100644 DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IUserRoleLogic.cs create mode 100644 DepartmentPortal/Security/SecurityContract/Logics/ISynchronizationLogic.cs create mode 100644 DepartmentPortal/Security/SecurityContract/SecurityContract.csproj rename DepartmentPortal/Security/{SecurityBusinessLogic/Interfaces => SecurityContract/Services}/IBackupService.cs (62%) create mode 100644 DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IAccessService.cs create mode 100644 DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IEnviromentSettingService.cs create mode 100644 DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IRoleService.cs create mode 100644 DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IUserRoleService.cs create mode 100644 DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IUserService.cs create mode 100644 DepartmentPortal/Security/SecurityContract/Services/ISynchronizationService.cs rename DepartmentPortal/Security/{SecurityBusinessLogic => SecurityContract}/ViewModels/AccessViewModels.cs (97%) rename DepartmentPortal/Security/{SecurityBusinessLogic => SecurityContract}/ViewModels/EnviromentSettingViewModels.cs (96%) rename DepartmentPortal/Security/{SecurityBusinessLogic => SecurityContract}/ViewModels/RoleViewModels.cs (96%) rename DepartmentPortal/Security/{SecurityBusinessLogic => SecurityContract}/ViewModels/UserRoleViewModels.cs (97%) rename DepartmentPortal/Security/{SecurityBusinessLogic => SecurityContract}/ViewModels/UserViewModels.cs (97%) diff --git a/DepartmentPortal/Common/CoreDatabase/AbstractGenerticEntityService.cs b/DepartmentPortal/Common/CoreDatabase/AbstractGenerticEntityService.cs index 9611160..22d1f98 100644 --- a/DepartmentPortal/Common/CoreDatabase/AbstractGenerticEntityService.cs +++ b/DepartmentPortal/Common/CoreDatabase/AbstractGenerticEntityService.cs @@ -11,7 +11,7 @@ using System.Linq; namespace CoreDatabase { - public abstract class AbstractGenerticEntityService : IGenerticEntityService + public abstract class AbstractGenerticEntityService : IGenericEntityService where G : GetBindingModel where S : SetBindingModel where T : BaseEntity diff --git a/DepartmentPortal/Common/ToolsDesktop/MainControls/GenericControlEntityElement.cs b/DepartmentPortal/Common/ToolsDesktop/MainControls/GenericControlEntityElement.cs index 715e828..975a780 100644 --- a/DepartmentPortal/Common/ToolsDesktop/MainControls/GenericControlEntityElement.cs +++ b/DepartmentPortal/Common/ToolsDesktop/MainControls/GenericControlEntityElement.cs @@ -1,4 +1,9 @@ -using ToolsDesktop.BaseControls; +using System; +using System.Linq; +using System.Reflection; +using System.Windows.Forms; +using System.Xml.Linq; +using ToolsDesktop.BaseControls; using ToolsDesktop.Enums; using ToolsDesktop.Helpers; using ToolsDesktop.Interfaces; @@ -8,13 +13,8 @@ using ToolsModule.BindingModels; using ToolsModule.BusinessLogics; using ToolsModule.Enums; using ToolsModule.Extensions; +using ToolsModule.Interfaces; using ToolsModule.ViewModels; -using System; -using System.Linq; -using System.Reflection; -using System.Threading.Tasks; -using System.Windows.Forms; -using System.Xml.Linq; namespace ToolsDesktop.Controls { @@ -23,7 +23,7 @@ namespace ToolsDesktop.Controls where S : SetBindingModel, new() where L : ListViewModel where E : ElementViewModel - where BL : GenericBusinessLogic + where BL : IGenericEntityLogic { /// /// Объект бизнес-логики для получения данных diff --git a/DepartmentPortal/Common/ToolsDesktop/MainControls/GenericControlEntityList.cs b/DepartmentPortal/Common/ToolsDesktop/MainControls/GenericControlEntityList.cs index 9e5619f..78cba3c 100644 --- a/DepartmentPortal/Common/ToolsDesktop/MainControls/GenericControlEntityList.cs +++ b/DepartmentPortal/Common/ToolsDesktop/MainControls/GenericControlEntityList.cs @@ -1,4 +1,10 @@ -using ToolsDesktop.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Windows.Forms; +using System.Xml.Linq; +using ToolsDesktop.Enums; using ToolsDesktop.Helpers; using ToolsDesktop.Interfaces; using ToolsDesktop.Models; @@ -7,13 +13,8 @@ using ToolsModule.BindingModels; using ToolsModule.BusinessLogics; using ToolsModule.Enums; using ToolsModule.Extensions; +using ToolsModule.Interfaces; using ToolsModule.ViewModels; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Windows.Forms; -using System.Xml.Linq; namespace ToolsDesktop.Controls { @@ -22,7 +23,7 @@ namespace ToolsDesktop.Controls where S : SetBindingModel, new() where L : ListViewModel where E : ElementViewModel - where BL : GenericBusinessLogic + where BL : IGenericEntityLogic { /// /// Режим работы diff --git a/DepartmentPortal/Common/ToolsModule/BusinessLogics/GenericBusinessLogic.cs b/DepartmentPortal/Common/ToolsModule/BusinessLogics/GenericBusinessLogic.cs index 706f2af..b34bfcf 100644 --- a/DepartmentPortal/Common/ToolsModule/BusinessLogics/GenericBusinessLogic.cs +++ b/DepartmentPortal/Common/ToolsModule/BusinessLogics/GenericBusinessLogic.cs @@ -13,7 +13,7 @@ namespace ToolsModule.BusinessLogics /// /// /// - public class GenericBusinessLogic : CoreBusinessLogic + public class GenericBusinessLogic : CoreBusinessLogic, IGenericEntityLogic where G : GetBindingModel where S : SetBindingModel where L : ListViewModel @@ -22,14 +22,14 @@ namespace ToolsModule.BusinessLogics /// /// Сервис с хранилищем данных /// - protected IGenerticEntityService Service { get; set; } + protected IGenericEntityService Service { get; set; } /// /// Возможен ли просмотр без авторизации /// protected bool _allowSimpleView = true; - public GenericBusinessLogic(IGenerticEntityService service, string entity, AccessOperation serviceOperation) + public GenericBusinessLogic(IGenericEntityService service, string entity, AccessOperation serviceOperation) { Service = service; _entity = entity; diff --git a/DepartmentPortal/Common/ToolsModule/Interfaces/IErrors.cs b/DepartmentPortal/Common/ToolsModule/Interfaces/IErrors.cs new file mode 100644 index 0000000..5b92b20 --- /dev/null +++ b/DepartmentPortal/Common/ToolsModule/Interfaces/IErrors.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; + +namespace ToolsModule.Interfaces +{ + public interface IErrors + { + /// + /// Перечень ошибок при выполнении операции + /// + List<(string Title, string Message)> Errors { get; } + } +} \ No newline at end of file diff --git a/DepartmentPortal/Common/ToolsModule/Interfaces/IGenericEntityLogic.cs b/DepartmentPortal/Common/ToolsModule/Interfaces/IGenericEntityLogic.cs new file mode 100644 index 0000000..2dd785c --- /dev/null +++ b/DepartmentPortal/Common/ToolsModule/Interfaces/IGenericEntityLogic.cs @@ -0,0 +1,61 @@ +using ToolsModule.BindingModels; +using ToolsModule.ViewModels; + +namespace ToolsModule.Interfaces +{ + /// + /// Описание действий для логики сущности + /// + /// + /// + /// + /// + public interface IGenericEntityLogic : IErrors + where G : GetBindingModel + where S : SetBindingModel + where L : ListViewModel + where E : ElementViewModel + { + /// + /// Получение списка записей + /// + /// + /// + L GetList(G model); + + /// + /// Получение записи + /// + /// + /// + E GetElement(G model); + + /// + /// Создание записи + /// + /// + /// + E Create(S model); + + /// + /// Изменение записи + /// + /// + /// + E Update(S model); + + /// + /// Удаление записи + /// + /// + /// + bool Delete(G model); + + /// + /// Восстанолвение записи + /// + /// + /// + E Restore(G model); + } +} \ No newline at end of file diff --git a/DepartmentPortal/Common/ToolsModule/Interfaces/IGenerticEntityService.cs b/DepartmentPortal/Common/ToolsModule/Interfaces/IGenericEntityService.cs similarity index 89% rename from DepartmentPortal/Common/ToolsModule/Interfaces/IGenerticEntityService.cs rename to DepartmentPortal/Common/ToolsModule/Interfaces/IGenericEntityService.cs index 14be9eb..73dccfe 100644 --- a/DepartmentPortal/Common/ToolsModule/Interfaces/IGenerticEntityService.cs +++ b/DepartmentPortal/Common/ToolsModule/Interfaces/IGenericEntityService.cs @@ -4,9 +4,9 @@ using ToolsModule.Models; namespace ToolsModule.Interfaces { /// - /// Описание логики для хранилища сущности + /// Описание действий для хранилища сущности /// - public interface IGenerticEntityService + public interface IGenericEntityService where G : GetBindingModel where S : SetBindingModel { diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IAcademicPlanRecordService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IAcademicPlanRecordService.cs index d8ecda5..dfe919c 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IAcademicPlanRecordService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IAcademicPlanRecordService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение записей учебного плана /// - public interface IAcademicPlanRecordService : IGenerticEntityService { } + public interface IAcademicPlanRecordService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IAcademicPlanRecordTimeNormHourService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IAcademicPlanRecordTimeNormHourService.cs index 73fc074..dfe35fe 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IAcademicPlanRecordTimeNormHourService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IAcademicPlanRecordTimeNormHourService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение часов нагрузки записи чебного плана /// - public interface IAcademicPlanRecordTimeNormHourService : IGenerticEntityService { } + public interface IAcademicPlanRecordTimeNormHourService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IAcademicPlanService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IAcademicPlanService.cs index cb9053a..ff281fc 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IAcademicPlanService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IAcademicPlanService.cs @@ -7,7 +7,7 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение учебных планов /// - public interface IAcademicPlanService : IGenerticEntityService + public interface IAcademicPlanService : IGenericEntityService { /// /// Загрузка учебного плана diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IClassroomService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IClassroomService.cs index 77a7989..2283599 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IClassroomService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IClassroomService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение аудиторий /// - public interface IClassroomService : IGenerticEntityService { } + public interface IClassroomService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IDisciplineBlockService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IDisciplineBlockService.cs index 12ec0ce..13f08da 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IDisciplineBlockService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IDisciplineBlockService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение блоков дисциплин /// - public interface IDisciplineBlockService : IGenerticEntityService { } + public interface IDisciplineBlockService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IDisciplineService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IDisciplineService.cs index c36c42c..b9488cb 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IDisciplineService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IDisciplineService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение дисциплин /// - public interface IDisciplineService : IGenerticEntityService { } + public interface IDisciplineService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IEducationDirectionService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IEducationDirectionService.cs index ce36838..3416a31 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IEducationDirectionService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IEducationDirectionService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение нправлений обучений /// - public interface IEducationDirectionService : IGenerticEntityService { } + public interface IEducationDirectionService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IEmployeePostService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IEmployeePostService.cs index 0bc7515..4818b93 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IEmployeePostService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IEmployeePostService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение связей сотрудников и должностей /// - public interface IEmployeePostService : IGenerticEntityService { } + public interface IEmployeePostService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IEmployeeService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IEmployeeService.cs index 9450204..b6157c7 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IEmployeeService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IEmployeeService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение сотрудников /// - public interface IEmployeeService : IGenerticEntityService { } + public interface IEmployeeService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerAcademicDegreeService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerAcademicDegreeService.cs index 21cd751..a5cac23 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerAcademicDegreeService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerAcademicDegreeService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение ученых степеней преподавателей /// - public interface ILecturerAcademicDegreeService : IGenerticEntityService { } + public interface ILecturerAcademicDegreeService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerAcademicRankService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerAcademicRankService.cs index 54f11b3..779ddbc 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerAcademicRankService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerAcademicRankService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение ученых званий преподавателей /// - public interface ILecturerAcademicRankService : IGenerticEntityService { } + public interface ILecturerAcademicRankService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerPostService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerPostService.cs index 5cb271f..062629a 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerPostService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerPostService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение должностей преподавателей /// - public interface ILecturerPostService : IGenerticEntityService { } + public interface ILecturerPostService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerService.cs index 015f520..b7cfd4c 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ILecturerService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение преподавателей /// - public interface ILecturerService : IGenerticEntityService { } + public interface ILecturerService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderService.cs index 7df074c..55ed8c5 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение приказов /// - public interface IOrderService : IGenerticEntityService { } + public interface IOrderService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderStudentRecordService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderStudentRecordService.cs index bb3d133..c709167 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderStudentRecordService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderStudentRecordService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение записей приказов по студентам /// - public interface IOrderStudentRecordService : IGenerticEntityService { } + public interface IOrderStudentRecordService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderSyncHistoryRecordService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderSyncHistoryRecordService.cs index ecd182c..0085a4f 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderSyncHistoryRecordService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderSyncHistoryRecordService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение записей историй синхронизации приказов /// - public interface IOrderSyncHistoryRecordService : IGenerticEntityService { } + public interface IOrderSyncHistoryRecordService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderSyncHistoryService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderSyncHistoryService.cs index 7218aec..ee90cfc 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderSyncHistoryService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IOrderSyncHistoryService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение историй синхронизации приказов /// - public interface IOrderSyncHistoryService : IGenerticEntityService { } + public interface IOrderSyncHistoryService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IPostService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IPostService.cs index 3340346..3bc932a 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IPostService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IPostService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение должностей /// - public interface IPostService : IGenerticEntityService { } + public interface IPostService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IStudentGroupService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IStudentGroupService.cs index 7c24779..0007338 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IStudentGroupService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IStudentGroupService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение учебных групп /// - public interface IStudentGroupService : IGenerticEntityService { } + public interface IStudentGroupService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IStudentService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IStudentService.cs index 00f56ec..a26a6cb 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IStudentService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/IStudentService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение студентов /// - public interface IStudentService : IGenerticEntityService { } + public interface IStudentService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ITimeNormService.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ITimeNormService.cs index 321778f..e271770 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ITimeNormService.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/Interfaces/ITimeNormService.cs @@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces /// /// Хранение норм времени /// - public interface ITimeNormService : IGenerticEntityService { } + public interface ITimeNormService : IGenericEntityService { } } \ No newline at end of file diff --git a/DepartmentPortal/DepartmentPortal.sln b/DepartmentPortal/DepartmentPortal.sln index 623b4fa..53f7e1b 100644 --- a/DepartmentPortal/DepartmentPortal.sln +++ b/DepartmentPortal/DepartmentPortal.sln @@ -25,11 +25,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DepartmentWindowsDesktop", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoreModels", "Common\CoreModels\CoreModels.csproj", "{FDF81413-ABAD-4890-A60F-4FEC62DD2A7D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToolsModule", "Common\ToolsModule\ToolsModule.csproj", "{26F68044-DA58-4E85-ACD7-FCC0B52B422B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ToolsModule", "Common\ToolsModule\ToolsModule.csproj", "{26F68044-DA58-4E85-ACD7-FCC0B52B422B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToolsDesktop", "Common\ToolsDesktop\ToolsDesktop.csproj", "{FF2FD244-613D-4BE7-A6D6-6B71A45C662E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ToolsDesktop", "Common\ToolsDesktop\ToolsDesktop.csproj", "{FF2FD244-613D-4BE7-A6D6-6B71A45C662E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoreDatabase", "Common\CoreDatabase\CoreDatabase.csproj", "{C2AADB97-4122-48AB-9E48-6C2A9C33BFE4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoreDatabase", "Common\CoreDatabase\CoreDatabase.csproj", "{C2AADB97-4122-48AB-9E48-6C2A9C33BFE4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SecurityContract", "Security\SecurityContract\SecurityContract.csproj", "{E9F9B0D8-18F3-40C3-843F-53D2F8B2293E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -81,6 +83,10 @@ Global {C2AADB97-4122-48AB-9E48-6C2A9C33BFE4}.Debug|Any CPU.Build.0 = Debug|Any CPU {C2AADB97-4122-48AB-9E48-6C2A9C33BFE4}.Release|Any CPU.ActiveCfg = Release|Any CPU {C2AADB97-4122-48AB-9E48-6C2A9C33BFE4}.Release|Any CPU.Build.0 = Release|Any CPU + {E9F9B0D8-18F3-40C3-843F-53D2F8B2293E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E9F9B0D8-18F3-40C3-843F-53D2F8B2293E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E9F9B0D8-18F3-40C3-843F-53D2F8B2293E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E9F9B0D8-18F3-40C3-843F-53D2F8B2293E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -96,6 +102,7 @@ Global {26F68044-DA58-4E85-ACD7-FCC0B52B422B} = {6F154F8D-3437-45EE-9D89-02B96BDF3E8E} {FF2FD244-613D-4BE7-A6D6-6B71A45C662E} = {6F154F8D-3437-45EE-9D89-02B96BDF3E8E} {C2AADB97-4122-48AB-9E48-6C2A9C33BFE4} = {6F154F8D-3437-45EE-9D89-02B96BDF3E8E} + {E9F9B0D8-18F3-40C3-843F-53D2F8B2293E} = {7DA26C36-778E-4563-9AEC-966E26EA7B2A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {FBA0CB49-EF2D-4538-9D00-FCEDA24879A9} diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/AccessBusinessLogic.cs b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/AccessBusinessLogic.cs deleted file mode 100644 index 7de38d9..0000000 --- a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/AccessBusinessLogic.cs +++ /dev/null @@ -1,16 +0,0 @@ -using ToolsModule.BusinessLogics; -using ToolsModule.Enums; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.Interfaces; -using SecurityBusinessLogic.ViewModels; - -namespace SecurityBusinessLogic.BusinessLogics -{ - /// - /// Логика работы с доступами - /// - public class AccessBusinessLogic : GenericBusinessLogic - { - public AccessBusinessLogic(IAccessService service) : base(service, "Доступы", AccessOperation.Доступы) { } - } -} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/BackupBusinessLogic.cs b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/BackupBusinessLogic.cs index 7238a84..22b37b2 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/BackupBusinessLogic.cs +++ b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/BackupBusinessLogic.cs @@ -1,17 +1,18 @@ -using ToolsModule.BusinessLogics; -using ToolsModule.Enums; -using ToolsModule.Extensions; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.Interfaces; +using SecurityContract.BindingModels; +using SecurityContract.Interfaces; +using SecurityContract.Logics; using System; using System.IO; +using ToolsModule.BusinessLogics; +using ToolsModule.Enums; +using ToolsModule.Extensions; namespace SecurityBusinessLogic.BusinessLogics { - /// - /// Логика работы с бекапом - /// - public class BackupBusinessLogic : CoreBusinessLogic + /// + /// Логика работы с бекапом + /// + public class BackupBusinessLogic : CoreBusinessLogic, IBackupLogic { /// /// Серивс для работы с бекапом diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/EnviromentSettingBusinessLogic.cs b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/EnviromentSettingBusinessLogic.cs deleted file mode 100644 index 753c425..0000000 --- a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/EnviromentSettingBusinessLogic.cs +++ /dev/null @@ -1,17 +0,0 @@ -using ToolsModule.BusinessLogics; -using ToolsModule.Enums; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.Interfaces; -using SecurityBusinessLogic.ViewModels; - -namespace SecurityBusinessLogic.BusinessLogics -{ - /// - /// Логика работы с общими настройками системы - /// - public class EnviromentSettingBusinessLogic : GenericBusinessLogic - { - public EnviromentSettingBusinessLogic(IEnviromentSettingService service) : base(service, "Настройки Среды", AccessOperation.НастройкиСреды) { } - } -} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/AccessBusinessLogic.cs b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/AccessBusinessLogic.cs new file mode 100644 index 0000000..2109358 --- /dev/null +++ b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/AccessBusinessLogic.cs @@ -0,0 +1,17 @@ +using SecurityContract.BindingModels; +using SecurityContract.Interfaces.IGenericEntityService; +using SecurityContract.Logics.IGenericEntityLogic; +using SecurityContract.ViewModels; +using ToolsModule.BusinessLogics; +using ToolsModule.Enums; + +namespace SecurityBusinessLogic.BusinessLogics.GenericBusinessLogic +{ + /// + /// Логика работы с доступами + /// + public class AccessBusinessLogic : GenericBusinessLogic, IAccessLogic + { + public AccessBusinessLogic(IAccessService service) : base(service, "Доступы", AccessOperation.Доступы) { } + } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/EnviromentSettingBusinessLogic.cs b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/EnviromentSettingBusinessLogic.cs new file mode 100644 index 0000000..3211404 --- /dev/null +++ b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/EnviromentSettingBusinessLogic.cs @@ -0,0 +1,18 @@ +using SecurityContract.BindingModels; +using SecurityContract.Interfaces.IGenericEntityService; +using SecurityContract.Logics.IGenericEntityLogic; +using SecurityContract.ViewModels; +using ToolsModule.BusinessLogics; +using ToolsModule.Enums; + +namespace SecurityBusinessLogic.BusinessLogics.GenericBusinessLogic +{ + /// + /// Логика работы с общими настройками системы + /// + public class EnviromentSettingBusinessLogic : GenericBusinessLogic, IEnviromentSettingLogic + { + public EnviromentSettingBusinessLogic(IEnviromentSettingService service) : base(service, "Настройки Среды", AccessOperation.НастройкиСреды) { } + } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/RoleBusinessLogic.cs b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/RoleBusinessLogic.cs new file mode 100644 index 0000000..3a316e6 --- /dev/null +++ b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/RoleBusinessLogic.cs @@ -0,0 +1,17 @@ +using SecurityContract.BindingModels; +using SecurityContract.Interfaces.IGenericEntityService; +using SecurityContract.Logics.IGenericEntityLogic; +using SecurityContract.ViewModels; +using ToolsModule.BusinessLogics; +using ToolsModule.Enums; + +namespace SecurityBusinessLogic.BusinessLogics.GenericBusinessLogic +{ + /// + /// Логика работы с ролями + /// + public class RoleBusinessLogic : GenericBusinessLogic, IRoleLogic + { + public RoleBusinessLogic(IRoleService service) : base(service, "Роли", AccessOperation.Роли) { } + } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/UserBusinessLogic.cs b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/UserBusinessLogic.cs similarity index 70% rename from DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/UserBusinessLogic.cs rename to DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/UserBusinessLogic.cs index 09320e7..bf842d1 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/UserBusinessLogic.cs +++ b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/UserBusinessLogic.cs @@ -1,17 +1,18 @@ -using ToolsModule.BusinessLogics; -using ToolsModule.Enums; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.Interfaces; -using SecurityBusinessLogic.ViewModels; +using SecurityContract.BindingModels; +using SecurityContract.Interfaces.IGenericEntityService; +using SecurityContract.Logics.IGenericEntityLogic; +using SecurityContract.ViewModels; using System; using System.Linq; +using ToolsModule.BusinessLogics; +using ToolsModule.Enums; -namespace SecurityBusinessLogic.BusinessLogics +namespace SecurityBusinessLogic.BusinessLogics.GenericBusinessLogic { - /// - /// Логика работы с пользователями - /// - public class UserBusinessLogic : GenericBusinessLogic + /// + /// Логика работы с пользователями + /// + public class UserBusinessLogic : GenericBusinessLogic, IUserLogic { public UserBusinessLogic(IUserService service) : base(service, "Пользователи", AccessOperation.Пользователи) { } diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/UserRoleBusinessLogic.cs b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/UserRoleBusinessLogic.cs new file mode 100644 index 0000000..40895dc --- /dev/null +++ b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/GenericBusinessLogic/UserRoleBusinessLogic.cs @@ -0,0 +1,17 @@ +using SecurityContract.BindingModels; +using SecurityContract.Interfaces.IGenericEntityService; +using SecurityContract.Logics.IGenericEntityLogic; +using SecurityContract.ViewModels; +using ToolsModule.BusinessLogics; +using ToolsModule.Enums; + +namespace SecurityBusinessLogic.BusinessLogics.GenericBusinessLogic +{ + /// + /// Логика работы со связями пользователями с ролями + /// + public class UserRoleBusinessLogic : GenericBusinessLogic, IUserRoleLogic + { + public UserRoleBusinessLogic(IUserRoleService service) : base(service, "Свзяь пользователей с ролями", AccessOperation.ПользователиРоли) { } + } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/RoleBusinessLogic.cs b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/RoleBusinessLogic.cs deleted file mode 100644 index 9fe1ec7..0000000 --- a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/RoleBusinessLogic.cs +++ /dev/null @@ -1,16 +0,0 @@ -using ToolsModule.BusinessLogics; -using ToolsModule.Enums; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.Interfaces; -using SecurityBusinessLogic.ViewModels; - -namespace SecurityBusinessLogic.BusinessLogics -{ - /// - /// Логика работы с ролями - /// - public class RoleBusinessLogic : GenericBusinessLogic - { - public RoleBusinessLogic(IRoleService service) : base(service, "Роли", AccessOperation.Роли) { } - } -} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/SynchronizationBusinessLogic.cs b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/SynchronizationBusinessLogic.cs index 093a586..3511525 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/SynchronizationBusinessLogic.cs +++ b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/SynchronizationBusinessLogic.cs @@ -1,14 +1,15 @@ -using ToolsModule.BusinessLogics; -using ToolsModule.Enums; -using SecurityBusinessLogic.Interfaces; +using SecurityContract.Interfaces; +using SecurityContract.Logics; using System; +using ToolsModule.BusinessLogics; +using ToolsModule.Enums; namespace SecurityBusinessLogic.BusinessLogics { - /// - /// Логика синхронизации пользователей - /// - public class SynchronizationBusinessLogic : CoreBusinessLogic + /// + /// Логика синхронизации пользователей + /// + public class SynchronizationBusinessLogic : CoreBusinessLogic, ISynchronizationLogic { /// /// Серивс для работы с бекапом diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/UserRoleBusinessLogic.cs b/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/UserRoleBusinessLogic.cs deleted file mode 100644 index f93b2de..0000000 --- a/DepartmentPortal/Security/SecurityBusinessLogic/BusinessLogics/UserRoleBusinessLogic.cs +++ /dev/null @@ -1,16 +0,0 @@ -using ToolsModule.BusinessLogics; -using ToolsModule.Enums; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.Interfaces; -using SecurityBusinessLogic.ViewModels; - -namespace SecurityBusinessLogic.BusinessLogics -{ - /// - /// Логика работы со связями пользователями с ролями - /// - public class UserRoleBusinessLogic : GenericBusinessLogic - { - public UserRoleBusinessLogic(IUserRoleService service) : base(service, "Свзяь пользователей с ролями", AccessOperation.ПользователиРоли) { } - } -} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IAccessService.cs b/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IAccessService.cs deleted file mode 100644 index a6f29c6..0000000 --- a/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IAccessService.cs +++ /dev/null @@ -1,10 +0,0 @@ -using ToolsModule.Interfaces; -using SecurityBusinessLogic.BindingModels; - -namespace SecurityBusinessLogic.Interfaces -{ - /// - /// Хранение доступов - /// - public interface IAccessService : IGenerticEntityService { } -} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IEnviromentSettingService.cs b/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IEnviromentSettingService.cs deleted file mode 100644 index b7c9911..0000000 --- a/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IEnviromentSettingService.cs +++ /dev/null @@ -1,10 +0,0 @@ -using ToolsModule.Interfaces; -using SecurityBusinessLogic.BindingModels; - -namespace SecurityBusinessLogic.Interfaces -{ - /// - /// Хранение общих настроек системы - /// - public interface IEnviromentSettingService : IGenerticEntityService { } -} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IRoleService.cs b/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IRoleService.cs deleted file mode 100644 index 28cab67..0000000 --- a/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IRoleService.cs +++ /dev/null @@ -1,10 +0,0 @@ -using ToolsModule.Interfaces; -using SecurityBusinessLogic.BindingModels; - -namespace SecurityBusinessLogic.Interfaces -{ - /// - /// Хранение ролей - /// - public interface IRoleService : IGenerticEntityService { } -} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/ISynchronizationService.cs b/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/ISynchronizationService.cs deleted file mode 100644 index 6807d22..0000000 --- a/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/ISynchronizationService.cs +++ /dev/null @@ -1,17 +0,0 @@ -using ToolsModule.Models; - -namespace SecurityBusinessLogic.Interfaces -{ - /// - /// Синхронизация пользователей (преподаватели, сотрудники, студенты) - /// - public interface ISynchronizationService - { - /// - /// Синхронизация - /// - /// - /// - OperationResultModel RunSynchronization(); - } -} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IUserRoleService.cs b/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IUserRoleService.cs deleted file mode 100644 index 75b2e65..0000000 --- a/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IUserRoleService.cs +++ /dev/null @@ -1,10 +0,0 @@ -using ToolsModule.Interfaces; -using SecurityBusinessLogic.BindingModels; - -namespace SecurityBusinessLogic.Interfaces -{ - /// - /// Хранение связей пользователей с ролями - /// - public interface IUserRoleService : IGenerticEntityService { } -} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IUserService.cs b/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IUserService.cs deleted file mode 100644 index 93fa316..0000000 --- a/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IUserService.cs +++ /dev/null @@ -1,10 +0,0 @@ -using ToolsModule.Interfaces; -using SecurityBusinessLogic.BindingModels; - -namespace SecurityBusinessLogic.Interfaces -{ - /// - /// Хранение пользователей - /// - public interface IUserService : IGenerticEntityService { } -} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/SecurityBusinessLogic.csproj b/DepartmentPortal/Security/SecurityBusinessLogic/SecurityBusinessLogic.csproj index fa7ca50..8dc090a 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/SecurityBusinessLogic.csproj +++ b/DepartmentPortal/Security/SecurityBusinessLogic/SecurityBusinessLogic.csproj @@ -5,11 +5,14 @@ - + + + + diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/SecurityLogicDependencyRegistration.cs b/DepartmentPortal/Security/SecurityBusinessLogic/SecurityLogicDependencyRegistration.cs new file mode 100644 index 0000000..b86be91 --- /dev/null +++ b/DepartmentPortal/Security/SecurityBusinessLogic/SecurityLogicDependencyRegistration.cs @@ -0,0 +1,24 @@ +using SecurityBusinessLogic.BusinessLogics; +using SecurityBusinessLogic.BusinessLogics.GenericBusinessLogic; +using SecurityContract.Logics; +using SecurityContract.Logics.IGenericEntityLogic; +using ToolsModule.BusinessLogics; +using ToolsModule.Interfaces; + +namespace SecurityBusinessLogic +{ + public class SecurityLogicDependencyRegistration : IImplementationExtension + { + public void RegisterServices() + { + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + } + } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/AccessBindingModels.cs b/DepartmentPortal/Security/SecurityContract/BindingModels/AccessBindingModels.cs similarity index 94% rename from DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/AccessBindingModels.cs rename to DepartmentPortal/Security/SecurityContract/BindingModels/AccessBindingModels.cs index ceccd27..b46eac2 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/AccessBindingModels.cs +++ b/DepartmentPortal/Security/SecurityContract/BindingModels/AccessBindingModels.cs @@ -4,7 +4,7 @@ using ToolsModule.Enums; using System; using System.ComponentModel.DataAnnotations; -namespace SecurityBusinessLogic.BindingModels +namespace SecurityContract.BindingModels { /// /// Получение информации по доступу diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/BackupBindingModel.cs b/DepartmentPortal/Security/SecurityContract/BindingModels/BackupBindingModel.cs similarity index 93% rename from DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/BackupBindingModel.cs rename to DepartmentPortal/Security/SecurityContract/BindingModels/BackupBindingModel.cs index 405e1c3..902334b 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/BackupBindingModel.cs +++ b/DepartmentPortal/Security/SecurityContract/BindingModels/BackupBindingModel.cs @@ -1,4 +1,4 @@ -namespace SecurityBusinessLogic.BindingModels +namespace SecurityContract.BindingModels { /// /// Информация по выгрузки/загрузки данных diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/EnviromentSettingBindingModels.cs b/DepartmentPortal/Security/SecurityContract/BindingModels/EnviromentSettingBindingModels.cs similarity index 94% rename from DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/EnviromentSettingBindingModels.cs rename to DepartmentPortal/Security/SecurityContract/BindingModels/EnviromentSettingBindingModels.cs index d8981ac..5218d0c 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/EnviromentSettingBindingModels.cs +++ b/DepartmentPortal/Security/SecurityContract/BindingModels/EnviromentSettingBindingModels.cs @@ -2,7 +2,7 @@ using ToolsModule.BindingModels; using System.ComponentModel.DataAnnotations; -namespace SecurityBusinessLogic.BindingModels +namespace SecurityContract.BindingModels { /// /// Получение общих настроек системы diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/RoleBindingModels.cs b/DepartmentPortal/Security/SecurityContract/BindingModels/RoleBindingModels.cs similarity index 93% rename from DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/RoleBindingModels.cs rename to DepartmentPortal/Security/SecurityContract/BindingModels/RoleBindingModels.cs index 6724fa6..1d91585 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/RoleBindingModels.cs +++ b/DepartmentPortal/Security/SecurityContract/BindingModels/RoleBindingModels.cs @@ -2,7 +2,7 @@ using ToolsModule.BindingModels; using System.ComponentModel.DataAnnotations; -namespace SecurityBusinessLogic.BindingModels +namespace SecurityContract.BindingModels { /// /// Получение роли diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/UserBindingModels.cs b/DepartmentPortal/Security/SecurityContract/BindingModels/UserBindingModels.cs similarity index 95% rename from DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/UserBindingModels.cs rename to DepartmentPortal/Security/SecurityContract/BindingModels/UserBindingModels.cs index 5a9b1f5..f0b8b03 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/UserBindingModels.cs +++ b/DepartmentPortal/Security/SecurityContract/BindingModels/UserBindingModels.cs @@ -3,7 +3,7 @@ using ToolsModule.BindingModels; using System; using System.ComponentModel.DataAnnotations; -namespace SecurityBusinessLogic.BindingModels +namespace SecurityContract.BindingModels { /// /// Получение пользователя diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/UserRoleBindingModels.cs b/DepartmentPortal/Security/SecurityContract/BindingModels/UserRoleBindingModels.cs similarity index 93% rename from DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/UserRoleBindingModels.cs rename to DepartmentPortal/Security/SecurityContract/BindingModels/UserRoleBindingModels.cs index 428f0f6..960d2fa 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/BindingModels/UserRoleBindingModels.cs +++ b/DepartmentPortal/Security/SecurityContract/BindingModels/UserRoleBindingModels.cs @@ -3,7 +3,7 @@ using ToolsModule.BindingModels; using System; using System.ComponentModel.DataAnnotations; -namespace SecurityBusinessLogic.BindingModels +namespace SecurityContract.BindingModels { /// /// Получение связи пользователя с ролью diff --git a/DepartmentPortal/Security/SecurityContract/Logics/IBackupLogic.cs b/DepartmentPortal/Security/SecurityContract/Logics/IBackupLogic.cs new file mode 100644 index 0000000..47ecb19 --- /dev/null +++ b/DepartmentPortal/Security/SecurityContract/Logics/IBackupLogic.cs @@ -0,0 +1,25 @@ +using SecurityContract.BindingModels; +using ToolsModule.Interfaces; + +namespace SecurityContract.Logics +{ + /// + /// Логика работы с бекапом + /// + public interface IBackupLogic : IErrors + { + /// + /// Создание бекапа с данными + /// + /// + /// + bool CreateBackUp(BackupBindingModel model); + + /// + /// Восстанволение данных через бекап + /// + /// + /// + bool RestoreBackUp(BackupBindingModel model); + } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IAccessLogic.cs b/DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IAccessLogic.cs new file mode 100644 index 0000000..26ba906 --- /dev/null +++ b/DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IAccessLogic.cs @@ -0,0 +1,11 @@ +using SecurityContract.BindingModels; +using SecurityContract.ViewModels; +using ToolsModule.Interfaces; + +namespace SecurityContract.Logics.IGenericEntityLogic +{ + /// + /// Логика работы с доступами + /// + public interface IAccessLogic : IGenericEntityLogic { } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IEnviromentSettingLogic.cs b/DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IEnviromentSettingLogic.cs new file mode 100644 index 0000000..7a15280 --- /dev/null +++ b/DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IEnviromentSettingLogic.cs @@ -0,0 +1,11 @@ +using SecurityContract.BindingModels; +using SecurityContract.ViewModels; +using ToolsModule.Interfaces; + +namespace SecurityContract.Logics.IGenericEntityLogic +{ + /// + /// Логика работы с общими настройками системы + /// + public interface IEnviromentSettingLogic : IGenericEntityLogic { } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IRoleLogic.cs b/DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IRoleLogic.cs new file mode 100644 index 0000000..c8e48a6 --- /dev/null +++ b/DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IRoleLogic.cs @@ -0,0 +1,11 @@ +using SecurityContract.BindingModels; +using SecurityContract.ViewModels; +using ToolsModule.Interfaces; + +namespace SecurityContract.Logics.IGenericEntityLogic +{ + /// + /// Логика работы с ролями + /// + public interface IRoleLogic : IGenericEntityLogic { } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IUserLogic.cs b/DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IUserLogic.cs new file mode 100644 index 0000000..7173d73 --- /dev/null +++ b/DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IUserLogic.cs @@ -0,0 +1,20 @@ +using SecurityContract.BindingModels; +using SecurityContract.ViewModels; +using ToolsModule.Interfaces; + +namespace SecurityContract.Logics.IGenericEntityLogic +{ + /// + /// Логика работы с пользователями + /// + public interface IUserLogic : IGenericEntityLogic + { + /// + /// Метод получения или создания пользователя для студента/сотрудника/преподавателя + /// + /// + /// + /// + UserViewModel GetOrCreateUser(UserGetBindingModel model, string password); + } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IUserRoleLogic.cs b/DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IUserRoleLogic.cs new file mode 100644 index 0000000..761496f --- /dev/null +++ b/DepartmentPortal/Security/SecurityContract/Logics/IGenericEntityLogic/IUserRoleLogic.cs @@ -0,0 +1,11 @@ +using SecurityContract.BindingModels; +using SecurityContract.ViewModels; +using ToolsModule.Interfaces; + +namespace SecurityContract.Logics.IGenericEntityLogic +{ + /// + /// Логика работы со связями пользователями с ролями + /// + public interface IUserRoleLogic : IGenericEntityLogic { } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityContract/Logics/ISynchronizationLogic.cs b/DepartmentPortal/Security/SecurityContract/Logics/ISynchronizationLogic.cs new file mode 100644 index 0000000..7b9ea36 --- /dev/null +++ b/DepartmentPortal/Security/SecurityContract/Logics/ISynchronizationLogic.cs @@ -0,0 +1,17 @@ +using ToolsModule.Interfaces; + +namespace SecurityContract.Logics +{ + /// + /// Логика синхронизации пользователей + /// + public interface ISynchronizationLogic : IErrors + { + /// + /// Запуск синхронизации + /// + /// + /// + bool RunSynchronization(); + } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityContract/SecurityContract.csproj b/DepartmentPortal/Security/SecurityContract/SecurityContract.csproj new file mode 100644 index 0000000..2ee500d --- /dev/null +++ b/DepartmentPortal/Security/SecurityContract/SecurityContract.csproj @@ -0,0 +1,12 @@ + + + + net5.0 + + + + + + + + diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IBackupService.cs b/DepartmentPortal/Security/SecurityContract/Services/IBackupService.cs similarity index 62% rename from DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IBackupService.cs rename to DepartmentPortal/Security/SecurityContract/Services/IBackupService.cs index 59cb37b..f48a9db 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/Interfaces/IBackupService.cs +++ b/DepartmentPortal/Security/SecurityContract/Services/IBackupService.cs @@ -1,12 +1,12 @@ -using ToolsModule.Models; -using SecurityBusinessLogic.BindingModels; +using SecurityContract.BindingModels; +using ToolsModule.Models; -namespace SecurityBusinessLogic.Interfaces +namespace SecurityContract.Interfaces { - /// - /// Сервис работы по выгрузке и загрузке данных - /// - public interface IBackupService + /// + /// Сервис работы по выгрузке и загрузке данных + /// + public interface IBackupService { /// /// Создание бекапа с данными diff --git a/DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IAccessService.cs b/DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IAccessService.cs new file mode 100644 index 0000000..bd6341f --- /dev/null +++ b/DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IAccessService.cs @@ -0,0 +1,10 @@ +using SecurityContract.BindingModels; +using ToolsModule.Interfaces; + +namespace SecurityContract.Interfaces.IGenericEntityService +{ + /// + /// Хранение доступов + /// + public interface IAccessService : IGenericEntityService { } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IEnviromentSettingService.cs b/DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IEnviromentSettingService.cs new file mode 100644 index 0000000..39d2984 --- /dev/null +++ b/DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IEnviromentSettingService.cs @@ -0,0 +1,10 @@ +using SecurityContract.BindingModels; +using ToolsModule.Interfaces; + +namespace SecurityContract.Interfaces.IGenericEntityService +{ + /// + /// Хранение общих настроек системы + /// + public interface IEnviromentSettingService : IGenericEntityService { } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IRoleService.cs b/DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IRoleService.cs new file mode 100644 index 0000000..55b1267 --- /dev/null +++ b/DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IRoleService.cs @@ -0,0 +1,10 @@ +using SecurityContract.BindingModels; +using ToolsModule.Interfaces; + +namespace SecurityContract.Interfaces.IGenericEntityService +{ + /// + /// Хранение ролей + /// + public interface IRoleService : IGenericEntityService { } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IUserRoleService.cs b/DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IUserRoleService.cs new file mode 100644 index 0000000..3fe8cc8 --- /dev/null +++ b/DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IUserRoleService.cs @@ -0,0 +1,10 @@ +using SecurityContract.BindingModels; +using ToolsModule.Interfaces; + +namespace SecurityContract.Interfaces.IGenericEntityService +{ + /// + /// Хранение связей пользователей с ролями + /// + public interface IUserRoleService : IGenericEntityService { } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IUserService.cs b/DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IUserService.cs new file mode 100644 index 0000000..de2fa04 --- /dev/null +++ b/DepartmentPortal/Security/SecurityContract/Services/IGenericEntityService/IUserService.cs @@ -0,0 +1,10 @@ +using SecurityContract.BindingModels; +using ToolsModule.Interfaces; + +namespace SecurityContract.Interfaces.IGenericEntityService +{ + /// + /// Хранение пользователей + /// + public interface IUserService : IGenericEntityService { } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityContract/Services/ISynchronizationService.cs b/DepartmentPortal/Security/SecurityContract/Services/ISynchronizationService.cs new file mode 100644 index 0000000..6614855 --- /dev/null +++ b/DepartmentPortal/Security/SecurityContract/Services/ISynchronizationService.cs @@ -0,0 +1,17 @@ +using ToolsModule.Models; + +namespace SecurityContract.Interfaces +{ + /// + /// Синхронизация пользователей (преподаватели, сотрудники, студенты) + /// + public interface ISynchronizationService + { + /// + /// Синхронизация + /// + /// + /// + OperationResultModel RunSynchronization(); + } +} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/AccessViewModels.cs b/DepartmentPortal/Security/SecurityContract/ViewModels/AccessViewModels.cs similarity index 97% rename from DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/AccessViewModels.cs rename to DepartmentPortal/Security/SecurityContract/ViewModels/AccessViewModels.cs index c3c7d16..f0b9d05 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/AccessViewModels.cs +++ b/DepartmentPortal/Security/SecurityContract/ViewModels/AccessViewModels.cs @@ -4,7 +4,7 @@ using ToolsModule.Enums; using ToolsModule.ViewModels; using System; -namespace SecurityBusinessLogic.ViewModels +namespace SecurityContract.ViewModels { /// /// Список достпуов diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/EnviromentSettingViewModels.cs b/DepartmentPortal/Security/SecurityContract/ViewModels/EnviromentSettingViewModels.cs similarity index 96% rename from DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/EnviromentSettingViewModels.cs rename to DepartmentPortal/Security/SecurityContract/ViewModels/EnviromentSettingViewModels.cs index ee42f41..73cf5d5 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/EnviromentSettingViewModels.cs +++ b/DepartmentPortal/Security/SecurityContract/ViewModels/EnviromentSettingViewModels.cs @@ -3,7 +3,7 @@ using ToolsModule.Attributes; using ToolsModule.Enums; using ToolsModule.ViewModels; -namespace SecurityBusinessLogic.ViewModels +namespace SecurityContract.ViewModels { /// /// Список общих настроек системы diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/RoleViewModels.cs b/DepartmentPortal/Security/SecurityContract/ViewModels/RoleViewModels.cs similarity index 96% rename from DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/RoleViewModels.cs rename to DepartmentPortal/Security/SecurityContract/ViewModels/RoleViewModels.cs index 217d8e3..07232f2 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/RoleViewModels.cs +++ b/DepartmentPortal/Security/SecurityContract/ViewModels/RoleViewModels.cs @@ -3,7 +3,7 @@ using ToolsModule.Attributes; using ToolsModule.Enums; using ToolsModule.ViewModels; -namespace SecurityBusinessLogic.ViewModels +namespace SecurityContract.ViewModels { /// /// Список ролей diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/UserRoleViewModels.cs b/DepartmentPortal/Security/SecurityContract/ViewModels/UserRoleViewModels.cs similarity index 97% rename from DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/UserRoleViewModels.cs rename to DepartmentPortal/Security/SecurityContract/ViewModels/UserRoleViewModels.cs index 9112818..861e1ae 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/UserRoleViewModels.cs +++ b/DepartmentPortal/Security/SecurityContract/ViewModels/UserRoleViewModels.cs @@ -4,7 +4,7 @@ using ToolsModule.Enums; using ToolsModule.ViewModels; using System; -namespace SecurityBusinessLogic.ViewModels +namespace SecurityContract.ViewModels { /// /// Список пользователей diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/UserViewModels.cs b/DepartmentPortal/Security/SecurityContract/ViewModels/UserViewModels.cs similarity index 97% rename from DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/UserViewModels.cs rename to DepartmentPortal/Security/SecurityContract/ViewModels/UserViewModels.cs index ebcf46b..d547ba3 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/UserViewModels.cs +++ b/DepartmentPortal/Security/SecurityContract/ViewModels/UserViewModels.cs @@ -4,7 +4,7 @@ using ToolsModule.Enums; using ToolsModule.ViewModels; using System; -namespace SecurityBusinessLogic.ViewModels +namespace SecurityContract.ViewModels { /// /// Список пользователей diff --git a/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/AccessService.cs b/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/AccessService.cs index 10988d9..0fce5b9 100644 --- a/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/AccessService.cs +++ b/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/AccessService.cs @@ -1,18 +1,18 @@ using CoreDatabase; using CoreDatabase.Models.Security; using Microsoft.EntityFrameworkCore; -using ToolsModule.Models; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.Interfaces; -using SecurityBusinessLogic.ViewModels; +using SecurityContract.BindingModels; +using SecurityContract.Interfaces.IGenericEntityService; +using SecurityContract.ViewModels; using System.Linq; +using ToolsModule.Models; namespace SecurityDatabaseImplementation.Implementations { - /// - /// Реализация IAccessService - /// - public class AccessService : + /// + /// Реализация IAccessService + /// + public class AccessService : AbstractGenerticEntityService, IAccessService { diff --git a/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/BackupJsonContractService.cs b/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/BackupJsonContractService.cs index 7b027d8..e3e484b 100644 --- a/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/BackupJsonContractService.cs +++ b/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/BackupJsonContractService.cs @@ -1,10 +1,6 @@ using CoreDatabase; -using ToolsModule.Attributes; -using ToolsModule.Extensions; -using ToolsModule.Interfaces; -using ToolsModule.Models; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.Interfaces; +using SecurityContract.BindingModels; +using SecurityContract.Interfaces; using System; using System.Collections.Generic; using System.IO; @@ -12,13 +8,17 @@ using System.IO.Compression; using System.Linq; using System.Reflection; using System.Runtime.Serialization.Json; +using ToolsModule.Attributes; +using ToolsModule.Extensions; +using ToolsModule.Interfaces; +using ToolsModule.Models; namespace SecurityDatabaseImplementation.Implementations { - /// - /// Реализация IBackupService для сохранения в JSON через JsonContract - /// - public class BackupJsonContractService : IBackupService + /// + /// Реализация IBackupService для сохранения в JSON через JsonContract + /// + public class BackupJsonContractService : IBackupService { public OperationResultModel CreateBackUp(BackupBindingModel model) { diff --git a/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/EnviromentSettingService.cs b/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/EnviromentSettingService.cs index 9cecfb4..fb8cff6 100644 --- a/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/EnviromentSettingService.cs +++ b/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/EnviromentSettingService.cs @@ -1,19 +1,19 @@ using CoreDatabase; using CoreDatabase.Models.Security; using Microsoft.EntityFrameworkCore; +using SecurityContract.BindingModels; +using SecurityContract.Interfaces.IGenericEntityService; +using SecurityContract.ViewModels; +using System.Linq; using ToolsModule.Extensions; using ToolsModule.Models; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.Interfaces; -using SecurityBusinessLogic.ViewModels; -using System.Linq; namespace SecurityDatabaseImplementation.Implementations { - /// - /// Реализация IEnviromentSettingService - /// - public class EnviromentSettingService : + /// + /// Реализация IEnviromentSettingService + /// + public class EnviromentSettingService : AbstractGenerticEntityService, IEnviromentSettingService { diff --git a/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/RoleService.cs b/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/RoleService.cs index 735965d..1054b57 100644 --- a/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/RoleService.cs +++ b/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/RoleService.cs @@ -1,21 +1,21 @@ using CoreDatabase; using CoreDatabase.Models.Security; using Microsoft.EntityFrameworkCore; +using SecurityContract.BindingModels; +using SecurityContract.Interfaces.IGenericEntityService; +using SecurityContract.ViewModels; +using System; +using System.Linq; using ToolsModule.Enums; using ToolsModule.Extensions; using ToolsModule.Models; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.Interfaces; -using SecurityBusinessLogic.ViewModels; -using System; -using System.Linq; namespace SecurityDatabaseImplementation.Implementations { - /// - /// Реализация IRoleService - /// - public class RoleService : + /// + /// Реализация IRoleService + /// + public class RoleService : AbstractGenerticEntityService, IRoleService { diff --git a/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/SynchronizationService.cs b/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/SynchronizationService.cs index e8928eb..2a1addf 100644 --- a/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/SynchronizationService.cs +++ b/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/SynchronizationService.cs @@ -1,12 +1,12 @@ -using ToolsModule.Models; -using SecurityBusinessLogic.Interfaces; +using SecurityContract.Interfaces; +using ToolsModule.Models; namespace SecurityDatabaseImplementation.Implementations { - /// - /// Реализация ISynchronizationService - /// - public class SynchronizationService : ISynchronizationService + /// + /// Реализация ISynchronizationService + /// + public class SynchronizationService : ISynchronizationService { public OperationResultModel RunSynchronization() { diff --git a/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/UserRoleService.cs b/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/UserRoleService.cs index 00fb718..b98306d 100644 --- a/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/UserRoleService.cs +++ b/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/UserRoleService.cs @@ -1,18 +1,18 @@ using CoreDatabase; using CoreDatabase.Models.Security; using Microsoft.EntityFrameworkCore; -using ToolsModule.Models; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.Interfaces; -using SecurityBusinessLogic.ViewModels; +using SecurityContract.BindingModels; +using SecurityContract.Interfaces.IGenericEntityService; +using SecurityContract.ViewModels; using System.Linq; +using ToolsModule.Models; namespace SecurityDatabaseImplementation.Implementations { - /// - /// Реализация IUserRoleService - /// - public class UserRoleService : + /// + /// Реализация IUserRoleService + /// + public class UserRoleService : AbstractGenerticEntityService, IUserRoleService { diff --git a/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/UserService.cs b/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/UserService.cs index d577c61..2163869 100644 --- a/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/UserService.cs +++ b/DepartmentPortal/Security/SecurityDatabaseImplementation/Implementations/UserService.cs @@ -2,21 +2,21 @@ using CoreDatabase.Models.Department; using CoreDatabase.Models.Security; using Microsoft.EntityFrameworkCore; +using SecurityContract.BindingModels; +using SecurityContract.Interfaces.IGenericEntityService; +using SecurityContract.ViewModels; +using System; +using System.Linq; using ToolsModule.Enums; using ToolsModule.Extensions; using ToolsModule.Models; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.Interfaces; -using SecurityBusinessLogic.ViewModels; -using System; -using System.Linq; namespace SecurityDatabaseImplementation.Implementations { - /// - /// Реализация IUserService - /// - public class UserService : + /// + /// Реализация IUserService + /// + public class UserService : AbstractGenerticEntityService, IUserService { diff --git a/DepartmentPortal/Security/SecurityDatabaseImplementation/SecurityDatabaseImplementation.csproj b/DepartmentPortal/Security/SecurityDatabaseImplementation/SecurityDatabaseImplementation.csproj index 30d198b..e939d51 100644 --- a/DepartmentPortal/Security/SecurityDatabaseImplementation/SecurityDatabaseImplementation.csproj +++ b/DepartmentPortal/Security/SecurityDatabaseImplementation/SecurityDatabaseImplementation.csproj @@ -6,7 +6,7 @@ - + diff --git a/DepartmentPortal/Security/SecurityDatabaseImplementation/SecurityImplementationExtensions.cs b/DepartmentPortal/Security/SecurityDatabaseImplementation/SecurityImplementationExtensions.cs index 58a9e11..214dd4c 100644 --- a/DepartmentPortal/Security/SecurityDatabaseImplementation/SecurityImplementationExtensions.cs +++ b/DepartmentPortal/Security/SecurityDatabaseImplementation/SecurityImplementationExtensions.cs @@ -1,11 +1,12 @@ -using ToolsModule.BusinessLogics; -using ToolsModule.Interfaces; -using SecurityBusinessLogic.Interfaces; +using SecurityContract.Interfaces; +using SecurityContract.Interfaces.IGenericEntityService; using SecurityDatabaseImplementation.Implementations; +using ToolsModule.BusinessLogics; +using ToolsModule.Interfaces; namespace SecurityDatabaseImplementation { - public class SecurityImplementationExtensions : IImplementationExtension + public class SecurityImplementationExtensions : IImplementationExtension { public void RegisterServices() { diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Access/ControlAccessElement.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Access/ControlAccessElement.cs index 3fcff6b..5e4b8bb 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Access/ControlAccessElement.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Access/ControlAccessElement.cs @@ -1,18 +1,18 @@ -using ToolsDesktop.Controls; +using SecurityContract.BindingModels; +using SecurityContract.Logics.IGenericEntityLogic; +using SecurityContract.ViewModels; +using System; +using ToolsDesktop.Controls; using ToolsDesktop.Interfaces; using ToolsDesktop.Models; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.BusinessLogics; -using SecurityBusinessLogic.ViewModels; -using System; namespace SecurityWindowsDesktop.EntityControls { - /// - /// Реализация контрола для доступа - /// - public partial class ControlAccessElement : - GenericControlEntityElement, + /// + /// Реализация контрола для доступа + /// + public partial class ControlAccessElement : + GenericControlEntityElement, IGenericControlEntityElement { public ControlAccessElement() diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Access/ControlAccessList.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Access/ControlAccessList.cs index 3ba27a5..d6a24cf 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Access/ControlAccessList.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Access/ControlAccessList.cs @@ -1,32 +1,32 @@ -using ToolsDesktop.Controls; +using SecurityContract.BindingModels; +using SecurityContract.Logics.IGenericEntityLogic; +using SecurityContract.ViewModels; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using ToolsDesktop.Controls; using ToolsDesktop.Enums; using ToolsDesktop.Interfaces; using ToolsDesktop.Models; using ToolsModule.BusinessLogics; using ToolsModule.Enums; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.BusinessLogics; -using SecurityBusinessLogic.ViewModels; -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; namespace SecurityWindowsDesktop.EntityControls { - /// - /// Реализация контрола для списка доступов - /// - public partial class ControlAccessList : - GenericControlEntityList, + /// + /// Реализация контрола для списка доступов + /// + public partial class ControlAccessList : + GenericControlEntityList, IGenericControlEntityList { - private readonly RoleBusinessLogic _roleBusinessLogic; + private readonly IRoleLogic _roleLogic; public ControlAccessList() { InitializeComponent(); - _roleBusinessLogic = DependencyManager.Instance.Resolve(); + _roleLogic = DependencyManager.Instance.Resolve(); Title = "Доступы"; ControlId = new Guid("6eebc4c4-cb86-4368-93e0-33dbdbb7409a"); AccessOperation = AccessOperation.Доступы; @@ -39,7 +39,7 @@ namespace SecurityWindowsDesktop.EntityControls public ControlViewEntityListConfiguration GetConfigControl() => new() { PaginationOn = true, - PageNamesForPagination = _roleBusinessLogic.GetList(new RoleGetBindingModel())?.List?.Select(x => + PageNamesForPagination = _roleLogic.GetList(new RoleGetBindingModel())?.List?.Select(x => new PageNamesForPaginationModel { Key = x.Id, diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/EnviromentSetting/ControlEnviromentSettingElement.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/EnviromentSetting/ControlEnviromentSettingElement.cs index 55ff53e..60858de 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/EnviromentSetting/ControlEnviromentSettingElement.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/EnviromentSetting/ControlEnviromentSettingElement.cs @@ -1,18 +1,18 @@ -using ToolsDesktop.Controls; +using SecurityContract.BindingModels; +using SecurityContract.Logics.IGenericEntityLogic; +using SecurityContract.ViewModels; +using System; +using ToolsDesktop.Controls; using ToolsDesktop.Interfaces; using ToolsDesktop.Models; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.BusinessLogics; -using SecurityBusinessLogic.ViewModels; -using System; namespace SecurityWindowsDesktop.EntityControls { - /// - /// Реализация контрола для настройки среды - /// - public partial class ControlEnviromentSettingElement : - GenericControlEntityElement, + /// + /// Реализация контрола для настройки среды + /// + public partial class ControlEnviromentSettingElement : + GenericControlEntityElement, IGenericControlEntityElement { public ControlEnviromentSettingElement() diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/EnviromentSetting/ControlEnviromentSettingList.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/EnviromentSetting/ControlEnviromentSettingList.cs index c2b2dd0..e6c5f2b 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/EnviromentSetting/ControlEnviromentSettingList.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/EnviromentSetting/ControlEnviromentSettingList.cs @@ -1,21 +1,21 @@ -using ToolsDesktop.Controls; +using SecurityContract.BindingModels; +using SecurityContract.Logics.IGenericEntityLogic; +using SecurityContract.ViewModels; +using System; +using System.Collections.Generic; +using ToolsDesktop.Controls; using ToolsDesktop.Enums; using ToolsDesktop.Interfaces; using ToolsDesktop.Models; using ToolsModule.Enums; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.BusinessLogics; -using SecurityBusinessLogic.ViewModels; -using System; -using System.Collections.Generic; namespace SecurityWindowsDesktop.EntityControls { - /// - /// Реализация контрола для списка настроек среды - /// - public partial class ControlEnviromentSettingList : - GenericControlEntityList, + /// + /// Реализация контрола для списка настроек среды + /// + public partial class ControlEnviromentSettingList : + GenericControlEntityList, IGenericControlEntityList { public ControlEnviromentSettingList() diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleElement.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleElement.cs index 9b91098..f2d450c 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleElement.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleElement.cs @@ -1,18 +1,18 @@ -using ToolsDesktop.Controls; +using SecurityContract.BindingModels; +using SecurityContract.Logics.IGenericEntityLogic; +using SecurityContract.ViewModels; +using System; +using ToolsDesktop.Controls; using ToolsDesktop.Interfaces; using ToolsDesktop.Models; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.BusinessLogics; -using SecurityBusinessLogic.ViewModels; -using System; namespace SecurityWindowsDesktop.EntityControls { - /// - /// Реализация контрола для роли - /// - public partial class ControlRoleElement : - GenericControlEntityElement, + /// + /// Реализация контрола для роли + /// + public partial class ControlRoleElement : + GenericControlEntityElement, IGenericControlEntityElement { public ControlRoleElement() diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleList.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleList.cs index 136caea..f13936a 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleList.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleList.cs @@ -1,21 +1,21 @@ -using ToolsDesktop.Controls; +using SecurityContract.BindingModels; +using SecurityContract.Logics.IGenericEntityLogic; +using SecurityContract.ViewModels; +using System; +using System.Collections.Generic; +using ToolsDesktop.Controls; using ToolsDesktop.Enums; using ToolsDesktop.Interfaces; using ToolsDesktop.Models; using ToolsModule.Enums; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.BusinessLogics; -using SecurityBusinessLogic.ViewModels; -using System; -using System.Collections.Generic; namespace SecurityWindowsDesktop.EntityControls { - /// - /// Реализация контрола для списка ролей - /// - public partial class ControlRoleList : - GenericControlEntityList, + /// + /// Реализация контрола для списка ролей + /// + public partial class ControlRoleList : + GenericControlEntityList, IGenericControlEntityList { public ControlRoleList() : base() diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserElement.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserElement.cs index 049e18c..6ac934e 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserElement.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserElement.cs @@ -1,18 +1,18 @@ -using ToolsDesktop.Controls; +using SecurityContract.BindingModels; +using SecurityContract.Logics.IGenericEntityLogic; +using SecurityContract.ViewModels; +using System; +using ToolsDesktop.Controls; using ToolsDesktop.Interfaces; using ToolsDesktop.Models; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.BusinessLogics; -using SecurityBusinessLogic.ViewModels; -using System; namespace SecurityWindowsDesktop.EntityControls { - /// - /// Реализация контрола для сотрудника - /// - public partial class ControlUserElement : - GenericControlEntityElement, + /// + /// Реализация контрола для сотрудника + /// + public partial class ControlUserElement : + GenericControlEntityElement, IGenericControlEntityElement { public ControlUserElement() diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserList.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserList.cs index 09737d7..8d7c403 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserList.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserList.cs @@ -1,20 +1,20 @@ -using ToolsDesktop.BaseControls; +using SecurityContract.BindingModels; +using SecurityContract.Logics.IGenericEntityLogic; +using SecurityContract.ViewModels; +using System; +using ToolsDesktop.BaseControls; using ToolsDesktop.Controls; using ToolsDesktop.Interfaces; using ToolsDesktop.Models; using ToolsModule.Enums; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.BusinessLogics; -using SecurityBusinessLogic.ViewModels; -using System; namespace SecurityWindowsDesktop.EntityControls { - /// - /// Реализация контрола для списка пользователей - /// - public partial class ControlUserList : - GenericControlEntityList, + /// + /// Реализация контрола для списка пользователей + /// + public partial class ControlUserList : + GenericControlEntityList, IGenericControlEntityList { public ControlUserList() : base() diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleElement.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleElement.cs index 3b8459c..87e9320 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleElement.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleElement.cs @@ -1,18 +1,18 @@ -using ToolsDesktop.Controls; +using SecurityContract.BindingModels; +using SecurityContract.Logics.IGenericEntityLogic; +using SecurityContract.ViewModels; +using System; +using ToolsDesktop.Controls; using ToolsDesktop.Interfaces; using ToolsDesktop.Models; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.BusinessLogics; -using SecurityBusinessLogic.ViewModels; -using System; namespace SecurityWindowsDesktop.EntityControls { - /// - /// Реализация контрола для связи сотрудника с ролью - /// - public partial class ControlUserRoleElement : - GenericControlEntityElement, + /// + /// Реализация контрола для связи сотрудника с ролью + /// + public partial class ControlUserRoleElement : + GenericControlEntityElement, IGenericControlEntityElement { public ControlUserRoleElement() diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleList.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleList.cs index 9328dee..2e39716 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleList.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleList.cs @@ -1,21 +1,21 @@ -using ToolsDesktop.Controls; +using SecurityContract.BindingModels; +using SecurityContract.Logics.IGenericEntityLogic; +using SecurityContract.ViewModels; +using System; +using System.Collections.Generic; +using ToolsDesktop.Controls; using ToolsDesktop.Enums; using ToolsDesktop.Interfaces; using ToolsDesktop.Models; using ToolsModule.Enums; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.BusinessLogics; -using SecurityBusinessLogic.ViewModels; -using System; -using System.Collections.Generic; namespace SecurityWindowsDesktop.EntityControls { - /// - /// Реализация контрола для списка ролей пользователя - /// - public partial class ControlUserRoleList : - GenericControlEntityList, + /// + /// Реализация контрола для списка ролей пользователя + /// + public partial class ControlUserRoleList : + GenericControlEntityList, IGenericControlEntityList { public ControlUserRoleList() diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/SecurityWindowsDesktop.csproj b/DepartmentPortal/Security/SecurityWindowsDesktop/SecurityWindowsDesktop.csproj index 972b019..58e906e 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/SecurityWindowsDesktop.csproj +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/SecurityWindowsDesktop.csproj @@ -11,7 +11,7 @@ - + diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.cs index 69b4f6e..6edca73 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.cs @@ -1,25 +1,25 @@ -using ToolsDesktop.Helpers; +using SecurityContract.BindingModels; +using SecurityContract.Logics; +using System; +using System.Windows.Forms; +using System.Xml.Linq; +using ToolsDesktop.Helpers; using ToolsDesktop.Interfaces; using ToolsDesktop.Models; using ToolsModule.BusinessLogics; using ToolsModule.Enums; -using SecurityBusinessLogic.BindingModels; -using SecurityBusinessLogic.BusinessLogics; -using System; -using System.Windows.Forms; -using System.Xml.Linq; namespace SecurityWindowsDesktop.SpecialControls { - /// - /// Контрол для работы с бекапом - /// - public partial class BackupControl : UserControl, IControl + /// + /// Контрол для работы с бекапом + /// + public partial class BackupControl : UserControl, IControl { /// /// Класс с бизнес-логикой работы с бекапом /// - private readonly BackupBusinessLogic _businessLogic; + private readonly IBackupLogic _businessLogic; /// /// Событие, вызываемое при закрытии контрола @@ -32,7 +32,7 @@ namespace SecurityWindowsDesktop.SpecialControls public BackupControl() { InitializeComponent(); - _businessLogic = DependencyManager.Instance.Resolve(); + _businessLogic = DependencyManager.Instance.Resolve(); Title = "Работа с бекапом"; ControlId = new Guid("cc9844e6-5d92-4c89-b817-4c17ec382bc1"); AccessOperation = AccessOperation.РаботасБекапом; diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/SynchronizationControl.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/SynchronizationControl.cs index 26ca141..ff8bc6a 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/SynchronizationControl.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/SynchronizationControl.cs @@ -1,24 +1,24 @@ -using ToolsDesktop.Helpers; +using SecurityContract.Logics; +using System; +using System.Windows.Forms; +using System.Xml.Linq; +using ToolsDesktop.Helpers; using ToolsDesktop.Interfaces; using ToolsDesktop.Models; using ToolsModule.BusinessLogics; using ToolsModule.Enums; -using SecurityBusinessLogic.BusinessLogics; -using System; -using System.Windows.Forms; -using System.Xml.Linq; namespace SecurityWindowsDesktop.SpecialControls { - /// - /// Контрол для работы с синхронизацией - /// - public partial class SynchronizationControl : UserControl, IControl + /// + /// Контрол для работы с синхронизацией + /// + public partial class SynchronizationControl : UserControl, IControl { /// /// Класс с бизнес-логикой работы с синхронизацией /// - private readonly SynchronizationBusinessLogic _businessLogic; + private readonly ISynchronizationLogic _businessLogic; /// /// Событие, вызываемое при закрытии контрола @@ -31,7 +31,7 @@ namespace SecurityWindowsDesktop.SpecialControls public SynchronizationControl() { InitializeComponent(); - _businessLogic = DependencyManager.Instance.Resolve(); + _businessLogic = DependencyManager.Instance.Resolve(); Title = "Синхронизация"; ControlId = new Guid("c392818b-9036-4c4b-8a57-8ff935115e6a"); AccessOperation = AccessOperation.Синхронизация;