рефакторинг, добавлен проект контрактов, применено к безопасности
This commit is contained in:
parent
513c14b73d
commit
07060426c4
@ -11,7 +11,7 @@ using System.Linq;
|
|||||||
|
|
||||||
namespace CoreDatabase
|
namespace CoreDatabase
|
||||||
{
|
{
|
||||||
public abstract class AbstractGenerticEntityService<G, S, T, L, E> : IGenerticEntityService<G, S>
|
public abstract class AbstractGenerticEntityService<G, S, T, L, E> : IGenericEntityService<G, S>
|
||||||
where G : GetBindingModel
|
where G : GetBindingModel
|
||||||
where S : SetBindingModel
|
where S : SetBindingModel
|
||||||
where T : BaseEntity
|
where T : BaseEntity
|
||||||
|
@ -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.Enums;
|
||||||
using ToolsDesktop.Helpers;
|
using ToolsDesktop.Helpers;
|
||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
@ -8,13 +13,8 @@ using ToolsModule.BindingModels;
|
|||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.BusinessLogics;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using ToolsModule.Extensions;
|
using ToolsModule.Extensions;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
using ToolsModule.ViewModels;
|
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
|
namespace ToolsDesktop.Controls
|
||||||
{
|
{
|
||||||
@ -23,7 +23,7 @@ namespace ToolsDesktop.Controls
|
|||||||
where S : SetBindingModel, new()
|
where S : SetBindingModel, new()
|
||||||
where L : ListViewModel<E>
|
where L : ListViewModel<E>
|
||||||
where E : ElementViewModel
|
where E : ElementViewModel
|
||||||
where BL : GenericBusinessLogic<G, S, L, E>
|
where BL : IGenericEntityLogic<G, S, L, E>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Объект бизнес-логики для получения данных
|
/// Объект бизнес-логики для получения данных
|
||||||
|
@ -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.Helpers;
|
||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
@ -7,13 +13,8 @@ using ToolsModule.BindingModels;
|
|||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.BusinessLogics;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using ToolsModule.Extensions;
|
using ToolsModule.Extensions;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
using ToolsModule.ViewModels;
|
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
|
namespace ToolsDesktop.Controls
|
||||||
{
|
{
|
||||||
@ -22,7 +23,7 @@ namespace ToolsDesktop.Controls
|
|||||||
where S : SetBindingModel, new()
|
where S : SetBindingModel, new()
|
||||||
where L : ListViewModel<E>
|
where L : ListViewModel<E>
|
||||||
where E : ElementViewModel
|
where E : ElementViewModel
|
||||||
where BL : GenericBusinessLogic<G, S, L, E>
|
where BL : IGenericEntityLogic<G, S, L, E>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Режим работы
|
/// Режим работы
|
||||||
|
@ -13,7 +13,7 @@ namespace ToolsModule.BusinessLogics
|
|||||||
/// <typeparam name="S"></typeparam>
|
/// <typeparam name="S"></typeparam>
|
||||||
/// <typeparam name="L"></typeparam>
|
/// <typeparam name="L"></typeparam>
|
||||||
/// <typeparam name="E"></typeparam>
|
/// <typeparam name="E"></typeparam>
|
||||||
public class GenericBusinessLogic<G, S, L, E> : CoreBusinessLogic
|
public class GenericBusinessLogic<G, S, L, E> : CoreBusinessLogic, IGenericEntityLogic<G, S, L, E>
|
||||||
where G : GetBindingModel
|
where G : GetBindingModel
|
||||||
where S : SetBindingModel
|
where S : SetBindingModel
|
||||||
where L : ListViewModel<E>
|
where L : ListViewModel<E>
|
||||||
@ -22,14 +22,14 @@ namespace ToolsModule.BusinessLogics
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Сервис с хранилищем данных
|
/// Сервис с хранилищем данных
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected IGenerticEntityService<G, S> Service { get; set; }
|
protected IGenericEntityService<G, S> Service { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Возможен ли просмотр без авторизации
|
/// Возможен ли просмотр без авторизации
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected bool _allowSimpleView = true;
|
protected bool _allowSimpleView = true;
|
||||||
|
|
||||||
public GenericBusinessLogic(IGenerticEntityService<G, S> service, string entity, AccessOperation serviceOperation)
|
public GenericBusinessLogic(IGenericEntityService<G, S> service, string entity, AccessOperation serviceOperation)
|
||||||
{
|
{
|
||||||
Service = service;
|
Service = service;
|
||||||
_entity = entity;
|
_entity = entity;
|
||||||
|
12
DepartmentPortal/Common/ToolsModule/Interfaces/IErrors.cs
Normal file
12
DepartmentPortal/Common/ToolsModule/Interfaces/IErrors.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace ToolsModule.Interfaces
|
||||||
|
{
|
||||||
|
public interface IErrors
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Перечень ошибок при выполнении операции
|
||||||
|
/// </summary>
|
||||||
|
List<(string Title, string Message)> Errors { get; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
using ToolsModule.BindingModels;
|
||||||
|
using ToolsModule.ViewModels;
|
||||||
|
|
||||||
|
namespace ToolsModule.Interfaces
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Описание действий для логики сущности
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="G"></typeparam>
|
||||||
|
/// <typeparam name="S"></typeparam>
|
||||||
|
/// <typeparam name="L"></typeparam>
|
||||||
|
/// <typeparam name="E"></typeparam>
|
||||||
|
public interface IGenericEntityLogic<G, S, L, E> : IErrors
|
||||||
|
where G : GetBindingModel
|
||||||
|
where S : SetBindingModel
|
||||||
|
where L : ListViewModel<E>
|
||||||
|
where E : ElementViewModel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Получение списка записей
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
L GetList(G model);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Получение записи
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
E GetElement(G model);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Создание записи
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
E Create(S model);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Изменение записи
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
E Update(S model);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Удаление записи
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
bool Delete(G model);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Восстанолвение записи
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
E Restore(G model);
|
||||||
|
}
|
||||||
|
}
|
@ -4,9 +4,9 @@ using ToolsModule.Models;
|
|||||||
namespace ToolsModule.Interfaces
|
namespace ToolsModule.Interfaces
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Описание логики для хранилища сущности
|
/// Описание действий для хранилища сущности
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IGenerticEntityService<G, S>
|
public interface IGenericEntityService<G, S>
|
||||||
where G : GetBindingModel
|
where G : GetBindingModel
|
||||||
where S : SetBindingModel
|
where S : SetBindingModel
|
||||||
{
|
{
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение записей учебного плана
|
/// Хранение записей учебного плана
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IAcademicPlanRecordService : IGenerticEntityService<AcademicPlanRecordGetBindingModel, AcademicPlanRecordSetBindingModel> { }
|
public interface IAcademicPlanRecordService : IGenericEntityService<AcademicPlanRecordGetBindingModel, AcademicPlanRecordSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение часов нагрузки записи чебного плана
|
/// Хранение часов нагрузки записи чебного плана
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IAcademicPlanRecordTimeNormHourService : IGenerticEntityService<AcademicPlanRecordTimeNormHourGetBindingModel, AcademicPlanRecordTimeNormHourSetBindingModel> { }
|
public interface IAcademicPlanRecordTimeNormHourService : IGenericEntityService<AcademicPlanRecordTimeNormHourGetBindingModel, AcademicPlanRecordTimeNormHourSetBindingModel> { }
|
||||||
}
|
}
|
@ -7,7 +7,7 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение учебных планов
|
/// Хранение учебных планов
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IAcademicPlanService : IGenerticEntityService<AcademicPlanGetBindingModel, AcademicPlanSetBindingModel>
|
public interface IAcademicPlanService : IGenericEntityService<AcademicPlanGetBindingModel, AcademicPlanSetBindingModel>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Загрузка учебного плана
|
/// Загрузка учебного плана
|
||||||
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение аудиторий
|
/// Хранение аудиторий
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IClassroomService : IGenerticEntityService<ClassroomGetBindingModel, ClassroomSetBindingModel> { }
|
public interface IClassroomService : IGenericEntityService<ClassroomGetBindingModel, ClassroomSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение блоков дисциплин
|
/// Хранение блоков дисциплин
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IDisciplineBlockService : IGenerticEntityService<DisciplineBlockGetBindingModel, DisciplineBlockSetBindingModel> { }
|
public interface IDisciplineBlockService : IGenericEntityService<DisciplineBlockGetBindingModel, DisciplineBlockSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение дисциплин
|
/// Хранение дисциплин
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IDisciplineService : IGenerticEntityService<DisciplineGetBindingModel, DisciplineSetBindingModel> { }
|
public interface IDisciplineService : IGenericEntityService<DisciplineGetBindingModel, DisciplineSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение нправлений обучений
|
/// Хранение нправлений обучений
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IEducationDirectionService : IGenerticEntityService<EducationDirectionGetBindingModel, EducationDirectionSetBindingModel> { }
|
public interface IEducationDirectionService : IGenericEntityService<EducationDirectionGetBindingModel, EducationDirectionSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение связей сотрудников и должностей
|
/// Хранение связей сотрудников и должностей
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IEmployeePostService : IGenerticEntityService<EmployeePostGetBindingModel, EmployeePostSetBindingModel> { }
|
public interface IEmployeePostService : IGenericEntityService<EmployeePostGetBindingModel, EmployeePostSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение сотрудников
|
/// Хранение сотрудников
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IEmployeeService : IGenerticEntityService<EmployeeGetBindingModel, EmployeeSetBindingModel> { }
|
public interface IEmployeeService : IGenericEntityService<EmployeeGetBindingModel, EmployeeSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение ученых степеней преподавателей
|
/// Хранение ученых степеней преподавателей
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ILecturerAcademicDegreeService : IGenerticEntityService<LecturerAcademicDegreeGetBindingModel, LecturerAcademicDegreeSetBindingModel> { }
|
public interface ILecturerAcademicDegreeService : IGenericEntityService<LecturerAcademicDegreeGetBindingModel, LecturerAcademicDegreeSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение ученых званий преподавателей
|
/// Хранение ученых званий преподавателей
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ILecturerAcademicRankService : IGenerticEntityService<LecturerAcademicRankGetBindingModel, LecturerAcademicRankSetBindingModel> { }
|
public interface ILecturerAcademicRankService : IGenericEntityService<LecturerAcademicRankGetBindingModel, LecturerAcademicRankSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение должностей преподавателей
|
/// Хранение должностей преподавателей
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ILecturerPostService : IGenerticEntityService<LecturerPostGetBindingModel, LecturerPostSetBindingModel> { }
|
public interface ILecturerPostService : IGenericEntityService<LecturerPostGetBindingModel, LecturerPostSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение преподавателей
|
/// Хранение преподавателей
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ILecturerService : IGenerticEntityService<LecturerGetBindingModel, LecturerSetBindingModel> { }
|
public interface ILecturerService : IGenericEntityService<LecturerGetBindingModel, LecturerSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение приказов
|
/// Хранение приказов
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IOrderService : IGenerticEntityService<OrderGetBindingModel, OrderSetBindingModel> { }
|
public interface IOrderService : IGenericEntityService<OrderGetBindingModel, OrderSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение записей приказов по студентам
|
/// Хранение записей приказов по студентам
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IOrderStudentRecordService : IGenerticEntityService<OrderStudentRecordGetBindingModel, OrderStudentRecordSetBindingModel> { }
|
public interface IOrderStudentRecordService : IGenericEntityService<OrderStudentRecordGetBindingModel, OrderStudentRecordSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение записей историй синхронизации приказов
|
/// Хранение записей историй синхронизации приказов
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IOrderSyncHistoryRecordService : IGenerticEntityService<OrderSyncHistoryRecordGetBindingModel, OrderSyncHistoryRecordSetBindingModel> { }
|
public interface IOrderSyncHistoryRecordService : IGenericEntityService<OrderSyncHistoryRecordGetBindingModel, OrderSyncHistoryRecordSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение историй синхронизации приказов
|
/// Хранение историй синхронизации приказов
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IOrderSyncHistoryService : IGenerticEntityService<OrderSyncHistoryGetBindingModel, OrderSyncHistorySetBindingModel> { }
|
public interface IOrderSyncHistoryService : IGenericEntityService<OrderSyncHistoryGetBindingModel, OrderSyncHistorySetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение должностей
|
/// Хранение должностей
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IPostService : IGenerticEntityService<PostGetBindingModel, PostSetBindingModel> { }
|
public interface IPostService : IGenericEntityService<PostGetBindingModel, PostSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение учебных групп
|
/// Хранение учебных групп
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IStudentGroupService : IGenerticEntityService<StudentGroupGetBindingModel, StudentGroupSetBindingModel> { }
|
public interface IStudentGroupService : IGenericEntityService<StudentGroupGetBindingModel, StudentGroupSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение студентов
|
/// Хранение студентов
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IStudentService : IGenerticEntityService<StudentGetBindingModel, StudentSetBindingModel> { }
|
public interface IStudentService : IGenericEntityService<StudentGetBindingModel, StudentSetBindingModel> { }
|
||||||
}
|
}
|
@ -6,5 +6,5 @@ namespace DepartmentBusinessLogic.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Хранение норм времени
|
/// Хранение норм времени
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ITimeNormService : IGenerticEntityService<TimeNormGetBindingModel, TimeNormSetBindingModel> { }
|
public interface ITimeNormService : IGenericEntityService<TimeNormGetBindingModel, TimeNormSetBindingModel> { }
|
||||||
}
|
}
|
@ -25,11 +25,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DepartmentWindowsDesktop",
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoreModels", "Common\CoreModels\CoreModels.csproj", "{FDF81413-ABAD-4890-A60F-4FEC62DD2A7D}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoreModels", "Common\CoreModels\CoreModels.csproj", "{FDF81413-ABAD-4890-A60F-4FEC62DD2A7D}"
|
||||||
EndProject
|
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
|
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
|
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
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
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}.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.ActiveCfg = Release|Any CPU
|
||||||
{C2AADB97-4122-48AB-9E48-6C2A9C33BFE4}.Release|Any CPU.Build.0 = 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
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@ -96,6 +102,7 @@ Global
|
|||||||
{26F68044-DA58-4E85-ACD7-FCC0B52B422B} = {6F154F8D-3437-45EE-9D89-02B96BDF3E8E}
|
{26F68044-DA58-4E85-ACD7-FCC0B52B422B} = {6F154F8D-3437-45EE-9D89-02B96BDF3E8E}
|
||||||
{FF2FD244-613D-4BE7-A6D6-6B71A45C662E} = {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}
|
{C2AADB97-4122-48AB-9E48-6C2A9C33BFE4} = {6F154F8D-3437-45EE-9D89-02B96BDF3E8E}
|
||||||
|
{E9F9B0D8-18F3-40C3-843F-53D2F8B2293E} = {7DA26C36-778E-4563-9AEC-966E26EA7B2A}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {FBA0CB49-EF2D-4538-9D00-FCEDA24879A9}
|
SolutionGuid = {FBA0CB49-EF2D-4538-9D00-FCEDA24879A9}
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
using ToolsModule.BusinessLogics;
|
|
||||||
using ToolsModule.Enums;
|
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.Interfaces;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.BusinessLogics
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Логика работы с доступами
|
|
||||||
/// </summary>
|
|
||||||
public class AccessBusinessLogic : GenericBusinessLogic<AccessGetBindingModel, AccessSetBindingModel, AccessListViewModel, AccessViewModel>
|
|
||||||
{
|
|
||||||
public AccessBusinessLogic(IAccessService service) : base(service, "Доступы", AccessOperation.Доступы) { }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,17 +1,18 @@
|
|||||||
using ToolsModule.BusinessLogics;
|
using SecurityContract.BindingModels;
|
||||||
using ToolsModule.Enums;
|
using SecurityContract.Interfaces;
|
||||||
using ToolsModule.Extensions;
|
using SecurityContract.Logics;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.Interfaces;
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using ToolsModule.BusinessLogics;
|
||||||
|
using ToolsModule.Enums;
|
||||||
|
using ToolsModule.Extensions;
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.BusinessLogics
|
namespace SecurityBusinessLogic.BusinessLogics
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Логика работы с бекапом
|
/// Логика работы с бекапом
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BackupBusinessLogic : CoreBusinessLogic
|
public class BackupBusinessLogic : CoreBusinessLogic, IBackupLogic
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Серивс для работы с бекапом
|
/// Серивс для работы с бекапом
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
using ToolsModule.BusinessLogics;
|
|
||||||
using ToolsModule.Enums;
|
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.Interfaces;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.BusinessLogics
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Логика работы с общими настройками системы
|
|
||||||
/// </summary>
|
|
||||||
public class EnviromentSettingBusinessLogic : GenericBusinessLogic<EnviromentSettingGetBindingModel, EnviromentSettingSetBindingModel,
|
|
||||||
EnviromentSettingListViewModel, EnviromentSettingViewModel>
|
|
||||||
{
|
|
||||||
public EnviromentSettingBusinessLogic(IEnviromentSettingService service) : base(service, "Настройки Среды", AccessOperation.НастройкиСреды) { }
|
|
||||||
}
|
|
||||||
}
|
|
@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика работы с доступами
|
||||||
|
/// </summary>
|
||||||
|
public class AccessBusinessLogic : GenericBusinessLogic<AccessGetBindingModel, AccessSetBindingModel, AccessListViewModel, AccessViewModel>, IAccessLogic
|
||||||
|
{
|
||||||
|
public AccessBusinessLogic(IAccessService service) : base(service, "Доступы", AccessOperation.Доступы) { }
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика работы с общими настройками системы
|
||||||
|
/// </summary>
|
||||||
|
public class EnviromentSettingBusinessLogic : GenericBusinessLogic<EnviromentSettingGetBindingModel, EnviromentSettingSetBindingModel,
|
||||||
|
EnviromentSettingListViewModel, EnviromentSettingViewModel>, IEnviromentSettingLogic
|
||||||
|
{
|
||||||
|
public EnviromentSettingBusinessLogic(IEnviromentSettingService service) : base(service, "Настройки Среды", AccessOperation.НастройкиСреды) { }
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика работы с ролями
|
||||||
|
/// </summary>
|
||||||
|
public class RoleBusinessLogic : GenericBusinessLogic<RoleGetBindingModel, RoleSetBindingModel, RoleListViewModel, RoleViewModel>, IRoleLogic
|
||||||
|
{
|
||||||
|
public RoleBusinessLogic(IRoleService service) : base(service, "Роли", AccessOperation.Роли) { }
|
||||||
|
}
|
||||||
|
}
|
@ -1,17 +1,18 @@
|
|||||||
using ToolsModule.BusinessLogics;
|
using SecurityContract.BindingModels;
|
||||||
using ToolsModule.Enums;
|
using SecurityContract.Interfaces.IGenericEntityService;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
using SecurityContract.Logics.IGenericEntityLogic;
|
||||||
using SecurityBusinessLogic.Interfaces;
|
using SecurityContract.ViewModels;
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using ToolsModule.BusinessLogics;
|
||||||
|
using ToolsModule.Enums;
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.BusinessLogics
|
namespace SecurityBusinessLogic.BusinessLogics.GenericBusinessLogic
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Логика работы с пользователями
|
/// Логика работы с пользователями
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class UserBusinessLogic : GenericBusinessLogic<UserGetBindingModel, UserSetBindingModel, UserListViewModel, UserViewModel>
|
public class UserBusinessLogic : GenericBusinessLogic<UserGetBindingModel, UserSetBindingModel, UserListViewModel, UserViewModel>, IUserLogic
|
||||||
{
|
{
|
||||||
public UserBusinessLogic(IUserService service) : base(service, "Пользователи", AccessOperation.Пользователи) { }
|
public UserBusinessLogic(IUserService service) : base(service, "Пользователи", AccessOperation.Пользователи) { }
|
||||||
|
|
@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика работы со связями пользователями с ролями
|
||||||
|
/// </summary>
|
||||||
|
public class UserRoleBusinessLogic : GenericBusinessLogic<UserRoleGetBindingModel, UserRoleSetBindingModel, UserRoleListViewModel, UserRoleViewModel>, IUserRoleLogic
|
||||||
|
{
|
||||||
|
public UserRoleBusinessLogic(IUserRoleService service) : base(service, "Свзяь пользователей с ролями", AccessOperation.ПользователиРоли) { }
|
||||||
|
}
|
||||||
|
}
|
@ -1,16 +0,0 @@
|
|||||||
using ToolsModule.BusinessLogics;
|
|
||||||
using ToolsModule.Enums;
|
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.Interfaces;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.BusinessLogics
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Логика работы с ролями
|
|
||||||
/// </summary>
|
|
||||||
public class RoleBusinessLogic : GenericBusinessLogic<RoleGetBindingModel, RoleSetBindingModel, RoleListViewModel, RoleViewModel>
|
|
||||||
{
|
|
||||||
public RoleBusinessLogic(IRoleService service) : base(service, "Роли", AccessOperation.Роли) { }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,14 +1,15 @@
|
|||||||
using ToolsModule.BusinessLogics;
|
using SecurityContract.Interfaces;
|
||||||
using ToolsModule.Enums;
|
using SecurityContract.Logics;
|
||||||
using SecurityBusinessLogic.Interfaces;
|
|
||||||
using System;
|
using System;
|
||||||
|
using ToolsModule.BusinessLogics;
|
||||||
|
using ToolsModule.Enums;
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.BusinessLogics
|
namespace SecurityBusinessLogic.BusinessLogics
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Логика синхронизации пользователей
|
/// Логика синхронизации пользователей
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SynchronizationBusinessLogic : CoreBusinessLogic
|
public class SynchronizationBusinessLogic : CoreBusinessLogic, ISynchronizationLogic
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Серивс для работы с бекапом
|
/// Серивс для работы с бекапом
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
using ToolsModule.BusinessLogics;
|
|
||||||
using ToolsModule.Enums;
|
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.Interfaces;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.BusinessLogics
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Логика работы со связями пользователями с ролями
|
|
||||||
/// </summary>
|
|
||||||
public class UserRoleBusinessLogic : GenericBusinessLogic<UserRoleGetBindingModel, UserRoleSetBindingModel, UserRoleListViewModel, UserRoleViewModel>
|
|
||||||
{
|
|
||||||
public UserRoleBusinessLogic(IUserRoleService service) : base(service, "Свзяь пользователей с ролями", AccessOperation.ПользователиРоли) { }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
using ToolsModule.Interfaces;
|
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.Interfaces
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Хранение доступов
|
|
||||||
/// </summary>
|
|
||||||
public interface IAccessService : IGenerticEntityService<AccessGetBindingModel, AccessSetBindingModel> { }
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
using ToolsModule.Interfaces;
|
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.Interfaces
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Хранение общих настроек системы
|
|
||||||
/// </summary>
|
|
||||||
public interface IEnviromentSettingService : IGenerticEntityService<EnviromentSettingGetBindingModel, EnviromentSettingSetBindingModel> { }
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
using ToolsModule.Interfaces;
|
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.Interfaces
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Хранение ролей
|
|
||||||
/// </summary>
|
|
||||||
public interface IRoleService : IGenerticEntityService<RoleGetBindingModel, RoleSetBindingModel> { }
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
using ToolsModule.Models;
|
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.Interfaces
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Синхронизация пользователей (преподаватели, сотрудники, студенты)
|
|
||||||
/// </summary>
|
|
||||||
public interface ISynchronizationService
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Синхронизация
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="model"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
OperationResultModel RunSynchronization();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
using ToolsModule.Interfaces;
|
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.Interfaces
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Хранение связей пользователей с ролями
|
|
||||||
/// </summary>
|
|
||||||
public interface IUserRoleService : IGenerticEntityService<UserRoleGetBindingModel, UserRoleSetBindingModel> { }
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
using ToolsModule.Interfaces;
|
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.Interfaces
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Хранение пользователей
|
|
||||||
/// </summary>
|
|
||||||
public interface IUserService : IGenerticEntityService<UserGetBindingModel, UserSetBindingModel> { }
|
|
||||||
}
|
|
@ -5,11 +5,14 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Enums\" />
|
<Compile Remove="Enums\**" />
|
||||||
|
<EmbeddedResource Remove="Enums\**" />
|
||||||
|
<None Remove="Enums\**" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\Common\CoreModels\CoreModels.csproj" />
|
<ProjectReference Include="..\..\Common\CoreModels\CoreModels.csproj" />
|
||||||
|
<ProjectReference Include="..\SecurityContract\SecurityContract.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||||
|
@ -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<IAccessLogic, AccessBusinessLogic>();
|
||||||
|
DependencyManager.Instance.RegisterType<IEnviromentSettingLogic, EnviromentSettingBusinessLogic>();
|
||||||
|
DependencyManager.Instance.RegisterType<IRoleLogic, RoleBusinessLogic>();
|
||||||
|
DependencyManager.Instance.RegisterType<IUserLogic, UserBusinessLogic>();
|
||||||
|
DependencyManager.Instance.RegisterType<IUserRoleLogic, UserRoleBusinessLogic>();
|
||||||
|
|
||||||
|
DependencyManager.Instance.RegisterType<IBackupLogic, BackupBusinessLogic>();
|
||||||
|
DependencyManager.Instance.RegisterType<ISynchronizationLogic, SynchronizationBusinessLogic>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -4,7 +4,7 @@ using ToolsModule.Enums;
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.BindingModels
|
namespace SecurityContract.BindingModels
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получение информации по доступу
|
/// Получение информации по доступу
|
@ -1,4 +1,4 @@
|
|||||||
namespace SecurityBusinessLogic.BindingModels
|
namespace SecurityContract.BindingModels
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Информация по выгрузки/загрузки данных
|
/// Информация по выгрузки/загрузки данных
|
@ -2,7 +2,7 @@
|
|||||||
using ToolsModule.BindingModels;
|
using ToolsModule.BindingModels;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.BindingModels
|
namespace SecurityContract.BindingModels
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получение общих настроек системы
|
/// Получение общих настроек системы
|
@ -2,7 +2,7 @@
|
|||||||
using ToolsModule.BindingModels;
|
using ToolsModule.BindingModels;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.BindingModels
|
namespace SecurityContract.BindingModels
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получение роли
|
/// Получение роли
|
@ -3,7 +3,7 @@ using ToolsModule.BindingModels;
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.BindingModels
|
namespace SecurityContract.BindingModels
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получение пользователя
|
/// Получение пользователя
|
@ -3,7 +3,7 @@ using ToolsModule.BindingModels;
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.BindingModels
|
namespace SecurityContract.BindingModels
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получение связи пользователя с ролью
|
/// Получение связи пользователя с ролью
|
@ -0,0 +1,25 @@
|
|||||||
|
using SecurityContract.BindingModels;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
|
|
||||||
|
namespace SecurityContract.Logics
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика работы с бекапом
|
||||||
|
/// </summary>
|
||||||
|
public interface IBackupLogic : IErrors
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Создание бекапа с данными
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
bool CreateBackUp(BackupBindingModel model);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Восстанволение данных через бекап
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
bool RestoreBackUp(BackupBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
using SecurityContract.BindingModels;
|
||||||
|
using SecurityContract.ViewModels;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
|
|
||||||
|
namespace SecurityContract.Logics.IGenericEntityLogic
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика работы с доступами
|
||||||
|
/// </summary>
|
||||||
|
public interface IAccessLogic : IGenericEntityLogic<AccessGetBindingModel, AccessSetBindingModel, AccessListViewModel, AccessViewModel> { }
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
using SecurityContract.BindingModels;
|
||||||
|
using SecurityContract.ViewModels;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
|
|
||||||
|
namespace SecurityContract.Logics.IGenericEntityLogic
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика работы с общими настройками системы
|
||||||
|
/// </summary>
|
||||||
|
public interface IEnviromentSettingLogic : IGenericEntityLogic<EnviromentSettingGetBindingModel, EnviromentSettingSetBindingModel, EnviromentSettingListViewModel, EnviromentSettingViewModel> { }
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
using SecurityContract.BindingModels;
|
||||||
|
using SecurityContract.ViewModels;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
|
|
||||||
|
namespace SecurityContract.Logics.IGenericEntityLogic
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика работы с ролями
|
||||||
|
/// </summary>
|
||||||
|
public interface IRoleLogic : IGenericEntityLogic<RoleGetBindingModel, RoleSetBindingModel, RoleListViewModel, RoleViewModel> { }
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using SecurityContract.BindingModels;
|
||||||
|
using SecurityContract.ViewModels;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
|
|
||||||
|
namespace SecurityContract.Logics.IGenericEntityLogic
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика работы с пользователями
|
||||||
|
/// </summary>
|
||||||
|
public interface IUserLogic : IGenericEntityLogic<UserGetBindingModel, UserSetBindingModel, UserListViewModel, UserViewModel>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Метод получения или создания пользователя для студента/сотрудника/преподавателя
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <param name="password"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
UserViewModel GetOrCreateUser(UserGetBindingModel model, string password);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
using SecurityContract.BindingModels;
|
||||||
|
using SecurityContract.ViewModels;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
|
|
||||||
|
namespace SecurityContract.Logics.IGenericEntityLogic
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика работы со связями пользователями с ролями
|
||||||
|
/// </summary>
|
||||||
|
public interface IUserRoleLogic : IGenericEntityLogic<UserRoleGetBindingModel, UserRoleSetBindingModel, UserRoleListViewModel, UserRoleViewModel> { }
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
using ToolsModule.Interfaces;
|
||||||
|
|
||||||
|
namespace SecurityContract.Logics
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика синхронизации пользователей
|
||||||
|
/// </summary>
|
||||||
|
public interface ISynchronizationLogic : IErrors
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Запуск синхронизации
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
bool RunSynchronization();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net5.0</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\Common\CoreModels\CoreModels.csproj" />
|
||||||
|
<ProjectReference Include="..\..\Common\ToolsModule\ToolsModule.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -1,12 +1,12 @@
|
|||||||
using ToolsModule.Models;
|
using SecurityContract.BindingModels;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
using ToolsModule.Models;
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.Interfaces
|
namespace SecurityContract.Interfaces
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Сервис работы по выгрузке и загрузке данных
|
/// Сервис работы по выгрузке и загрузке данных
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IBackupService
|
public interface IBackupService
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Создание бекапа с данными
|
/// Создание бекапа с данными
|
@ -0,0 +1,10 @@
|
|||||||
|
using SecurityContract.BindingModels;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
|
|
||||||
|
namespace SecurityContract.Interfaces.IGenericEntityService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Хранение доступов
|
||||||
|
/// </summary>
|
||||||
|
public interface IAccessService : IGenericEntityService<AccessGetBindingModel, AccessSetBindingModel> { }
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
using SecurityContract.BindingModels;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
|
|
||||||
|
namespace SecurityContract.Interfaces.IGenericEntityService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Хранение общих настроек системы
|
||||||
|
/// </summary>
|
||||||
|
public interface IEnviromentSettingService : IGenericEntityService<EnviromentSettingGetBindingModel, EnviromentSettingSetBindingModel> { }
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
using SecurityContract.BindingModels;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
|
|
||||||
|
namespace SecurityContract.Interfaces.IGenericEntityService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Хранение ролей
|
||||||
|
/// </summary>
|
||||||
|
public interface IRoleService : IGenericEntityService<RoleGetBindingModel, RoleSetBindingModel> { }
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
using SecurityContract.BindingModels;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
|
|
||||||
|
namespace SecurityContract.Interfaces.IGenericEntityService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Хранение связей пользователей с ролями
|
||||||
|
/// </summary>
|
||||||
|
public interface IUserRoleService : IGenericEntityService<UserRoleGetBindingModel, UserRoleSetBindingModel> { }
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
using SecurityContract.BindingModels;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
|
|
||||||
|
namespace SecurityContract.Interfaces.IGenericEntityService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Хранение пользователей
|
||||||
|
/// </summary>
|
||||||
|
public interface IUserService : IGenericEntityService<UserGetBindingModel, UserSetBindingModel> { }
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
using ToolsModule.Models;
|
||||||
|
|
||||||
|
namespace SecurityContract.Interfaces
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Синхронизация пользователей (преподаватели, сотрудники, студенты)
|
||||||
|
/// </summary>
|
||||||
|
public interface ISynchronizationService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Синхронизация
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
OperationResultModel RunSynchronization();
|
||||||
|
}
|
||||||
|
}
|
@ -4,7 +4,7 @@ using ToolsModule.Enums;
|
|||||||
using ToolsModule.ViewModels;
|
using ToolsModule.ViewModels;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.ViewModels
|
namespace SecurityContract.ViewModels
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Список достпуов
|
/// Список достпуов
|
@ -3,7 +3,7 @@ using ToolsModule.Attributes;
|
|||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using ToolsModule.ViewModels;
|
using ToolsModule.ViewModels;
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.ViewModels
|
namespace SecurityContract.ViewModels
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Список общих настроек системы
|
/// Список общих настроек системы
|
@ -3,7 +3,7 @@ using ToolsModule.Attributes;
|
|||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using ToolsModule.ViewModels;
|
using ToolsModule.ViewModels;
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.ViewModels
|
namespace SecurityContract.ViewModels
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Список ролей
|
/// Список ролей
|
@ -4,7 +4,7 @@ using ToolsModule.Enums;
|
|||||||
using ToolsModule.ViewModels;
|
using ToolsModule.ViewModels;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.ViewModels
|
namespace SecurityContract.ViewModels
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Список пользователей
|
/// Список пользователей
|
@ -4,7 +4,7 @@ using ToolsModule.Enums;
|
|||||||
using ToolsModule.ViewModels;
|
using ToolsModule.ViewModels;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SecurityBusinessLogic.ViewModels
|
namespace SecurityContract.ViewModels
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Список пользователей
|
/// Список пользователей
|
@ -1,18 +1,18 @@
|
|||||||
using CoreDatabase;
|
using CoreDatabase;
|
||||||
using CoreDatabase.Models.Security;
|
using CoreDatabase.Models.Security;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using ToolsModule.Models;
|
using SecurityContract.BindingModels;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
using SecurityContract.Interfaces.IGenericEntityService;
|
||||||
using SecurityBusinessLogic.Interfaces;
|
using SecurityContract.ViewModels;
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using ToolsModule.Models;
|
||||||
|
|
||||||
namespace SecurityDatabaseImplementation.Implementations
|
namespace SecurityDatabaseImplementation.Implementations
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация IAccessService
|
/// Реализация IAccessService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class AccessService :
|
public class AccessService :
|
||||||
AbstractGenerticEntityService<AccessGetBindingModel, AccessSetBindingModel, Access, AccessListViewModel, AccessViewModel>,
|
AbstractGenerticEntityService<AccessGetBindingModel, AccessSetBindingModel, Access, AccessListViewModel, AccessViewModel>,
|
||||||
IAccessService
|
IAccessService
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
using CoreDatabase;
|
using CoreDatabase;
|
||||||
using ToolsModule.Attributes;
|
using SecurityContract.BindingModels;
|
||||||
using ToolsModule.Extensions;
|
using SecurityContract.Interfaces;
|
||||||
using ToolsModule.Interfaces;
|
|
||||||
using ToolsModule.Models;
|
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.Interfaces;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@ -12,13 +8,17 @@ using System.IO.Compression;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.Serialization.Json;
|
using System.Runtime.Serialization.Json;
|
||||||
|
using ToolsModule.Attributes;
|
||||||
|
using ToolsModule.Extensions;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
|
using ToolsModule.Models;
|
||||||
|
|
||||||
namespace SecurityDatabaseImplementation.Implementations
|
namespace SecurityDatabaseImplementation.Implementations
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация IBackupService для сохранения в JSON через JsonContract
|
/// Реализация IBackupService для сохранения в JSON через JsonContract
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BackupJsonContractService : IBackupService
|
public class BackupJsonContractService : IBackupService
|
||||||
{
|
{
|
||||||
public OperationResultModel CreateBackUp(BackupBindingModel model)
|
public OperationResultModel CreateBackUp(BackupBindingModel model)
|
||||||
{
|
{
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
using CoreDatabase;
|
using CoreDatabase;
|
||||||
using CoreDatabase.Models.Security;
|
using CoreDatabase.Models.Security;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using SecurityContract.BindingModels;
|
||||||
|
using SecurityContract.Interfaces.IGenericEntityService;
|
||||||
|
using SecurityContract.ViewModels;
|
||||||
|
using System.Linq;
|
||||||
using ToolsModule.Extensions;
|
using ToolsModule.Extensions;
|
||||||
using ToolsModule.Models;
|
using ToolsModule.Models;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.Interfaces;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace SecurityDatabaseImplementation.Implementations
|
namespace SecurityDatabaseImplementation.Implementations
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация IEnviromentSettingService
|
/// Реализация IEnviromentSettingService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EnviromentSettingService :
|
public class EnviromentSettingService :
|
||||||
AbstractGenerticEntityService<EnviromentSettingGetBindingModel, EnviromentSettingSetBindingModel, EnviromentSetting, EnviromentSettingListViewModel, EnviromentSettingViewModel>,
|
AbstractGenerticEntityService<EnviromentSettingGetBindingModel, EnviromentSettingSetBindingModel, EnviromentSetting, EnviromentSettingListViewModel, EnviromentSettingViewModel>,
|
||||||
IEnviromentSettingService
|
IEnviromentSettingService
|
||||||
{
|
{
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
using CoreDatabase;
|
using CoreDatabase;
|
||||||
using CoreDatabase.Models.Security;
|
using CoreDatabase.Models.Security;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using SecurityContract.BindingModels;
|
||||||
|
using SecurityContract.Interfaces.IGenericEntityService;
|
||||||
|
using SecurityContract.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using ToolsModule.Extensions;
|
using ToolsModule.Extensions;
|
||||||
using ToolsModule.Models;
|
using ToolsModule.Models;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.Interfaces;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
using System;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace SecurityDatabaseImplementation.Implementations
|
namespace SecurityDatabaseImplementation.Implementations
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация IRoleService
|
/// Реализация IRoleService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class RoleService :
|
public class RoleService :
|
||||||
AbstractGenerticEntityService<RoleGetBindingModel, RoleSetBindingModel, Role, RoleListViewModel, RoleViewModel>,
|
AbstractGenerticEntityService<RoleGetBindingModel, RoleSetBindingModel, Role, RoleListViewModel, RoleViewModel>,
|
||||||
IRoleService
|
IRoleService
|
||||||
{
|
{
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
using ToolsModule.Models;
|
using SecurityContract.Interfaces;
|
||||||
using SecurityBusinessLogic.Interfaces;
|
using ToolsModule.Models;
|
||||||
|
|
||||||
namespace SecurityDatabaseImplementation.Implementations
|
namespace SecurityDatabaseImplementation.Implementations
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация ISynchronizationService
|
/// Реализация ISynchronizationService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SynchronizationService : ISynchronizationService
|
public class SynchronizationService : ISynchronizationService
|
||||||
{
|
{
|
||||||
public OperationResultModel RunSynchronization()
|
public OperationResultModel RunSynchronization()
|
||||||
{
|
{
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
using CoreDatabase;
|
using CoreDatabase;
|
||||||
using CoreDatabase.Models.Security;
|
using CoreDatabase.Models.Security;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using ToolsModule.Models;
|
using SecurityContract.BindingModels;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
using SecurityContract.Interfaces.IGenericEntityService;
|
||||||
using SecurityBusinessLogic.Interfaces;
|
using SecurityContract.ViewModels;
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using ToolsModule.Models;
|
||||||
|
|
||||||
namespace SecurityDatabaseImplementation.Implementations
|
namespace SecurityDatabaseImplementation.Implementations
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация IUserRoleService
|
/// Реализация IUserRoleService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class UserRoleService :
|
public class UserRoleService :
|
||||||
AbstractGenerticEntityService<UserRoleGetBindingModel, UserRoleSetBindingModel, UserRole, UserRoleListViewModel, UserRoleViewModel>,
|
AbstractGenerticEntityService<UserRoleGetBindingModel, UserRoleSetBindingModel, UserRole, UserRoleListViewModel, UserRoleViewModel>,
|
||||||
IUserRoleService
|
IUserRoleService
|
||||||
{
|
{
|
||||||
|
@ -2,21 +2,21 @@
|
|||||||
using CoreDatabase.Models.Department;
|
using CoreDatabase.Models.Department;
|
||||||
using CoreDatabase.Models.Security;
|
using CoreDatabase.Models.Security;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using SecurityContract.BindingModels;
|
||||||
|
using SecurityContract.Interfaces.IGenericEntityService;
|
||||||
|
using SecurityContract.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using ToolsModule.Extensions;
|
using ToolsModule.Extensions;
|
||||||
using ToolsModule.Models;
|
using ToolsModule.Models;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.Interfaces;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
using System;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace SecurityDatabaseImplementation.Implementations
|
namespace SecurityDatabaseImplementation.Implementations
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация IUserService
|
/// Реализация IUserService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class UserService :
|
public class UserService :
|
||||||
AbstractGenerticEntityService<UserGetBindingModel, UserSetBindingModel, User, UserListViewModel, UserViewModel>,
|
AbstractGenerticEntityService<UserGetBindingModel, UserSetBindingModel, User, UserListViewModel, UserViewModel>,
|
||||||
IUserService
|
IUserService
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\Common\CoreDatabase\CoreDatabase.csproj" />
|
<ProjectReference Include="..\..\Common\CoreDatabase\CoreDatabase.csproj" />
|
||||||
<ProjectReference Include="..\SecurityBusinessLogic\SecurityBusinessLogic.csproj" />
|
<ProjectReference Include="..\SecurityContract\SecurityContract.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
using ToolsModule.BusinessLogics;
|
using SecurityContract.Interfaces;
|
||||||
using ToolsModule.Interfaces;
|
using SecurityContract.Interfaces.IGenericEntityService;
|
||||||
using SecurityBusinessLogic.Interfaces;
|
|
||||||
using SecurityDatabaseImplementation.Implementations;
|
using SecurityDatabaseImplementation.Implementations;
|
||||||
|
using ToolsModule.BusinessLogics;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
|
|
||||||
namespace SecurityDatabaseImplementation
|
namespace SecurityDatabaseImplementation
|
||||||
{
|
{
|
||||||
public class SecurityImplementationExtensions : IImplementationExtension
|
public class SecurityImplementationExtensions : IImplementationExtension
|
||||||
{
|
{
|
||||||
public void RegisterServices()
|
public void RegisterServices()
|
||||||
{
|
{
|
||||||
|
@ -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.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.BusinessLogics;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace SecurityWindowsDesktop.EntityControls
|
namespace SecurityWindowsDesktop.EntityControls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация контрола для доступа
|
/// Реализация контрола для доступа
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ControlAccessElement :
|
public partial class ControlAccessElement :
|
||||||
GenericControlEntityElement<AccessGetBindingModel, AccessSetBindingModel, AccessListViewModel, AccessViewModel, AccessBusinessLogic>,
|
GenericControlEntityElement<AccessGetBindingModel, AccessSetBindingModel, AccessListViewModel, AccessViewModel, IAccessLogic>,
|
||||||
IGenericControlEntityElement
|
IGenericControlEntityElement
|
||||||
{
|
{
|
||||||
public ControlAccessElement()
|
public ControlAccessElement()
|
||||||
|
@ -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.Enums;
|
||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.BusinessLogics;
|
||||||
using ToolsModule.Enums;
|
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
|
namespace SecurityWindowsDesktop.EntityControls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация контрола для списка доступов
|
/// Реализация контрола для списка доступов
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ControlAccessList :
|
public partial class ControlAccessList :
|
||||||
GenericControlEntityList<AccessGetBindingModel, AccessSetBindingModel, AccessListViewModel, AccessViewModel, AccessBusinessLogic>,
|
GenericControlEntityList<AccessGetBindingModel, AccessSetBindingModel, AccessListViewModel, AccessViewModel, IAccessLogic>,
|
||||||
IGenericControlEntityList
|
IGenericControlEntityList
|
||||||
{
|
{
|
||||||
private readonly RoleBusinessLogic _roleBusinessLogic;
|
private readonly IRoleLogic _roleLogic;
|
||||||
|
|
||||||
public ControlAccessList()
|
public ControlAccessList()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_roleBusinessLogic = DependencyManager.Instance.Resolve<RoleBusinessLogic>();
|
_roleLogic = DependencyManager.Instance.Resolve<IRoleLogic>();
|
||||||
Title = "Доступы";
|
Title = "Доступы";
|
||||||
ControlId = new Guid("6eebc4c4-cb86-4368-93e0-33dbdbb7409a");
|
ControlId = new Guid("6eebc4c4-cb86-4368-93e0-33dbdbb7409a");
|
||||||
AccessOperation = AccessOperation.Доступы;
|
AccessOperation = AccessOperation.Доступы;
|
||||||
@ -39,7 +39,7 @@ namespace SecurityWindowsDesktop.EntityControls
|
|||||||
public ControlViewEntityListConfiguration GetConfigControl() => new()
|
public ControlViewEntityListConfiguration GetConfigControl() => new()
|
||||||
{
|
{
|
||||||
PaginationOn = true,
|
PaginationOn = true,
|
||||||
PageNamesForPagination = _roleBusinessLogic.GetList(new RoleGetBindingModel())?.List?.Select(x =>
|
PageNamesForPagination = _roleLogic.GetList(new RoleGetBindingModel())?.List?.Select(x =>
|
||||||
new PageNamesForPaginationModel
|
new PageNamesForPaginationModel
|
||||||
{
|
{
|
||||||
Key = x.Id,
|
Key = x.Id,
|
||||||
|
@ -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.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.BusinessLogics;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace SecurityWindowsDesktop.EntityControls
|
namespace SecurityWindowsDesktop.EntityControls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация контрола для настройки среды
|
/// Реализация контрола для настройки среды
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ControlEnviromentSettingElement :
|
public partial class ControlEnviromentSettingElement :
|
||||||
GenericControlEntityElement<EnviromentSettingGetBindingModel, EnviromentSettingSetBindingModel, EnviromentSettingListViewModel, EnviromentSettingViewModel, EnviromentSettingBusinessLogic>,
|
GenericControlEntityElement<EnviromentSettingGetBindingModel, EnviromentSettingSetBindingModel, EnviromentSettingListViewModel, EnviromentSettingViewModel, IEnviromentSettingLogic>,
|
||||||
IGenericControlEntityElement
|
IGenericControlEntityElement
|
||||||
{
|
{
|
||||||
public ControlEnviromentSettingElement()
|
public ControlEnviromentSettingElement()
|
||||||
|
@ -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.Enums;
|
||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.BusinessLogics;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace SecurityWindowsDesktop.EntityControls
|
namespace SecurityWindowsDesktop.EntityControls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация контрола для списка настроек среды
|
/// Реализация контрола для списка настроек среды
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ControlEnviromentSettingList :
|
public partial class ControlEnviromentSettingList :
|
||||||
GenericControlEntityList<EnviromentSettingGetBindingModel, EnviromentSettingSetBindingModel, EnviromentSettingListViewModel, EnviromentSettingViewModel, EnviromentSettingBusinessLogic>,
|
GenericControlEntityList<EnviromentSettingGetBindingModel, EnviromentSettingSetBindingModel, EnviromentSettingListViewModel, EnviromentSettingViewModel, IEnviromentSettingLogic>,
|
||||||
IGenericControlEntityList
|
IGenericControlEntityList
|
||||||
{
|
{
|
||||||
public ControlEnviromentSettingList()
|
public ControlEnviromentSettingList()
|
||||||
|
@ -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.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.BusinessLogics;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace SecurityWindowsDesktop.EntityControls
|
namespace SecurityWindowsDesktop.EntityControls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация контрола для роли
|
/// Реализация контрола для роли
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ControlRoleElement :
|
public partial class ControlRoleElement :
|
||||||
GenericControlEntityElement<RoleGetBindingModel, RoleSetBindingModel, RoleListViewModel, RoleViewModel, RoleBusinessLogic>,
|
GenericControlEntityElement<RoleGetBindingModel, RoleSetBindingModel, RoleListViewModel, RoleViewModel, IRoleLogic>,
|
||||||
IGenericControlEntityElement
|
IGenericControlEntityElement
|
||||||
{
|
{
|
||||||
public ControlRoleElement()
|
public ControlRoleElement()
|
||||||
|
@ -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.Enums;
|
||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.BusinessLogics;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace SecurityWindowsDesktop.EntityControls
|
namespace SecurityWindowsDesktop.EntityControls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация контрола для списка ролей
|
/// Реализация контрола для списка ролей
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ControlRoleList :
|
public partial class ControlRoleList :
|
||||||
GenericControlEntityList<RoleGetBindingModel, RoleSetBindingModel, RoleListViewModel, RoleViewModel, RoleBusinessLogic>,
|
GenericControlEntityList<RoleGetBindingModel, RoleSetBindingModel, RoleListViewModel, RoleViewModel, IRoleLogic>,
|
||||||
IGenericControlEntityList
|
IGenericControlEntityList
|
||||||
{
|
{
|
||||||
public ControlRoleList() : base()
|
public ControlRoleList() : base()
|
||||||
|
@ -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.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.BusinessLogics;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace SecurityWindowsDesktop.EntityControls
|
namespace SecurityWindowsDesktop.EntityControls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация контрола для сотрудника
|
/// Реализация контрола для сотрудника
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ControlUserElement :
|
public partial class ControlUserElement :
|
||||||
GenericControlEntityElement<UserGetBindingModel, UserSetBindingModel, UserListViewModel, UserViewModel, UserBusinessLogic>,
|
GenericControlEntityElement<UserGetBindingModel, UserSetBindingModel, UserListViewModel, UserViewModel, IUserLogic>,
|
||||||
IGenericControlEntityElement
|
IGenericControlEntityElement
|
||||||
{
|
{
|
||||||
public ControlUserElement()
|
public ControlUserElement()
|
||||||
|
@ -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.Controls;
|
||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.BusinessLogics;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace SecurityWindowsDesktop.EntityControls
|
namespace SecurityWindowsDesktop.EntityControls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация контрола для списка пользователей
|
/// Реализация контрола для списка пользователей
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ControlUserList :
|
public partial class ControlUserList :
|
||||||
GenericControlEntityList<UserGetBindingModel, UserSetBindingModel, UserListViewModel, UserViewModel, UserBusinessLogic>,
|
GenericControlEntityList<UserGetBindingModel, UserSetBindingModel, UserListViewModel, UserViewModel, IUserLogic>,
|
||||||
IGenericControlEntityList
|
IGenericControlEntityList
|
||||||
{
|
{
|
||||||
public ControlUserList() : base()
|
public ControlUserList() : base()
|
||||||
|
@ -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.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.BusinessLogics;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace SecurityWindowsDesktop.EntityControls
|
namespace SecurityWindowsDesktop.EntityControls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация контрола для связи сотрудника с ролью
|
/// Реализация контрола для связи сотрудника с ролью
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ControlUserRoleElement :
|
public partial class ControlUserRoleElement :
|
||||||
GenericControlEntityElement<UserRoleGetBindingModel, UserRoleSetBindingModel, UserRoleListViewModel, UserRoleViewModel, UserRoleBusinessLogic>,
|
GenericControlEntityElement<UserRoleGetBindingModel, UserRoleSetBindingModel, UserRoleListViewModel, UserRoleViewModel, IUserRoleLogic>,
|
||||||
IGenericControlEntityElement
|
IGenericControlEntityElement
|
||||||
{
|
{
|
||||||
public ControlUserRoleElement()
|
public ControlUserRoleElement()
|
||||||
|
@ -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.Enums;
|
||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.BusinessLogics;
|
|
||||||
using SecurityBusinessLogic.ViewModels;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace SecurityWindowsDesktop.EntityControls
|
namespace SecurityWindowsDesktop.EntityControls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация контрола для списка ролей пользователя
|
/// Реализация контрола для списка ролей пользователя
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ControlUserRoleList :
|
public partial class ControlUserRoleList :
|
||||||
GenericControlEntityList<UserRoleGetBindingModel, UserRoleSetBindingModel, UserRoleListViewModel, UserRoleViewModel, UserRoleBusinessLogic>,
|
GenericControlEntityList<UserRoleGetBindingModel, UserRoleSetBindingModel, UserRoleListViewModel, UserRoleViewModel, IUserRoleLogic>,
|
||||||
IGenericControlEntityList
|
IGenericControlEntityList
|
||||||
{
|
{
|
||||||
public ControlUserRoleList()
|
public ControlUserRoleList()
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\Common\ToolsDesktop\ToolsDesktop.csproj" />
|
<ProjectReference Include="..\..\Common\ToolsDesktop\ToolsDesktop.csproj" />
|
||||||
<ProjectReference Include="..\SecurityBusinessLogic\SecurityBusinessLogic.csproj" />
|
<ProjectReference Include="..\SecurityContract\SecurityContract.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -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.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.BusinessLogics;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using SecurityBusinessLogic.BindingModels;
|
|
||||||
using SecurityBusinessLogic.BusinessLogics;
|
|
||||||
using System;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Xml.Linq;
|
|
||||||
|
|
||||||
namespace SecurityWindowsDesktop.SpecialControls
|
namespace SecurityWindowsDesktop.SpecialControls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Контрол для работы с бекапом
|
/// Контрол для работы с бекапом
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class BackupControl : UserControl, IControl
|
public partial class BackupControl : UserControl, IControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Класс с бизнес-логикой работы с бекапом
|
/// Класс с бизнес-логикой работы с бекапом
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly BackupBusinessLogic _businessLogic;
|
private readonly IBackupLogic _businessLogic;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Событие, вызываемое при закрытии контрола
|
/// Событие, вызываемое при закрытии контрола
|
||||||
@ -32,7 +32,7 @@ namespace SecurityWindowsDesktop.SpecialControls
|
|||||||
public BackupControl()
|
public BackupControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_businessLogic = DependencyManager.Instance.Resolve<BackupBusinessLogic>();
|
_businessLogic = DependencyManager.Instance.Resolve<IBackupLogic>();
|
||||||
Title = "Работа с бекапом";
|
Title = "Работа с бекапом";
|
||||||
ControlId = new Guid("cc9844e6-5d92-4c89-b817-4c17ec382bc1");
|
ControlId = new Guid("cc9844e6-5d92-4c89-b817-4c17ec382bc1");
|
||||||
AccessOperation = AccessOperation.РаботасБекапом;
|
AccessOperation = AccessOperation.РаботасБекапом;
|
||||||
|
@ -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.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.BusinessLogics;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using SecurityBusinessLogic.BusinessLogics;
|
|
||||||
using System;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Xml.Linq;
|
|
||||||
|
|
||||||
namespace SecurityWindowsDesktop.SpecialControls
|
namespace SecurityWindowsDesktop.SpecialControls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Контрол для работы с синхронизацией
|
/// Контрол для работы с синхронизацией
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class SynchronizationControl : UserControl, IControl
|
public partial class SynchronizationControl : UserControl, IControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Класс с бизнес-логикой работы с синхронизацией
|
/// Класс с бизнес-логикой работы с синхронизацией
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly SynchronizationBusinessLogic _businessLogic;
|
private readonly ISynchronizationLogic _businessLogic;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Событие, вызываемое при закрытии контрола
|
/// Событие, вызываемое при закрытии контрола
|
||||||
@ -31,7 +31,7 @@ namespace SecurityWindowsDesktop.SpecialControls
|
|||||||
public SynchronizationControl()
|
public SynchronizationControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_businessLogic = DependencyManager.Instance.Resolve<SynchronizationBusinessLogic>();
|
_businessLogic = DependencyManager.Instance.Resolve<ISynchronizationLogic>();
|
||||||
Title = "Синхронизация";
|
Title = "Синхронизация";
|
||||||
ControlId = new Guid("c392818b-9036-4c4b-8a57-8ff935115e6a");
|
ControlId = new Guid("c392818b-9036-4c4b-8a57-8ff935115e6a");
|
||||||
AccessOperation = AccessOperation.Синхронизация;
|
AccessOperation = AccessOperation.Синхронизация;
|
||||||
|
Loading…
Reference in New Issue
Block a user