From 2fe6b9346e343dbe3242b8f29ac18216dad6f95f Mon Sep 17 00:00:00 2001 From: maxnes3 <112558334+maxnes3@users.noreply.github.com> Date: Sat, 1 Apr 2023 19:39:50 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20Us?= =?UTF-8?q?erId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BindingModels/ContractBindingModel.cs | 2 ++ .../BindingModels/DealBindingModel.cs | 2 ++ .../BindingModels/HearingBindingModel.cs | 2 ++ .../BindingModels/LawyerBindingModel.cs | 2 ++ .../BindingModels/SpecializationBindingModel.cs | 2 ++ .../BusinessLogicContracts/ILawyerLogic.cs | 12 ++++++++++-- .../ViewModels/ContractViewModel.cs | 3 ++- .../ViewModels/DealViewModel.cs | 3 ++- .../ViewModels/HearingViewModel.cs | 4 ++-- .../ViewModels/LawyerViewModel.cs | 3 ++- .../ViewModels/SpecializationViewModel.cs | 3 ++- .../Models/IContractModel.cs | 3 ++- .../CaseAccountingDataModels/Models/IDealModel.cs | 3 ++- .../CaseAccountingDataModels/Models/IHearingModel.cs | 5 +++-- .../CaseAccountingDataModels/Models/ILawyerModel.cs | 3 ++- .../Models/ISpecializationModel.cs | 3 ++- 16 files changed, 41 insertions(+), 14 deletions(-) diff --git a/CaseAccounting/CaseAccountingContracts/BindingModels/ContractBindingModel.cs b/CaseAccounting/CaseAccountingContracts/BindingModels/ContractBindingModel.cs index 8e49cbe..1eeae6f 100644 --- a/CaseAccounting/CaseAccountingContracts/BindingModels/ContractBindingModel.cs +++ b/CaseAccounting/CaseAccountingContracts/BindingModels/ContractBindingModel.cs @@ -15,6 +15,8 @@ namespace CaseAccountingContracts.BindingModels public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); + public int UserId { get; set; } + public int Id { get; set; } } } diff --git a/CaseAccounting/CaseAccountingContracts/BindingModels/DealBindingModel.cs b/CaseAccounting/CaseAccountingContracts/BindingModels/DealBindingModel.cs index e085752..d353c05 100644 --- a/CaseAccounting/CaseAccountingContracts/BindingModels/DealBindingModel.cs +++ b/CaseAccounting/CaseAccountingContracts/BindingModels/DealBindingModel.cs @@ -15,6 +15,8 @@ namespace CaseAccountingContracts.BindingModels public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); + public int UserId { get; set; } + public int Id { get; set; } } } diff --git a/CaseAccounting/CaseAccountingContracts/BindingModels/HearingBindingModel.cs b/CaseAccounting/CaseAccountingContracts/BindingModels/HearingBindingModel.cs index 0aeb6cd..a49e5ff 100644 --- a/CaseAccounting/CaseAccountingContracts/BindingModels/HearingBindingModel.cs +++ b/CaseAccounting/CaseAccountingContracts/BindingModels/HearingBindingModel.cs @@ -15,6 +15,8 @@ namespace CaseAccountingContracts.BindingModels public int CaseId { get; set; } + public int UserId { get; set; } + public int Id { get; set; } } } diff --git a/CaseAccounting/CaseAccountingContracts/BindingModels/LawyerBindingModel.cs b/CaseAccounting/CaseAccountingContracts/BindingModels/LawyerBindingModel.cs index 512642d..f961c6c 100644 --- a/CaseAccounting/CaseAccountingContracts/BindingModels/LawyerBindingModel.cs +++ b/CaseAccounting/CaseAccountingContracts/BindingModels/LawyerBindingModel.cs @@ -19,6 +19,8 @@ namespace CaseAccountingContracts.BindingModels public int SpecializationId { get; set; } + public int UserId { get; set; } + public int Id { get; set; } } } diff --git a/CaseAccounting/CaseAccountingContracts/BindingModels/SpecializationBindingModel.cs b/CaseAccounting/CaseAccountingContracts/BindingModels/SpecializationBindingModel.cs index 3de52e3..5b76c9d 100644 --- a/CaseAccounting/CaseAccountingContracts/BindingModels/SpecializationBindingModel.cs +++ b/CaseAccounting/CaseAccountingContracts/BindingModels/SpecializationBindingModel.cs @@ -11,6 +11,8 @@ namespace CaseAccountingContracts.BindingModels { public string Name { get; set; } = string.Empty; + public int UserId { get; set; } + public int Id { get; set; } } } diff --git a/CaseAccounting/CaseAccountingContracts/BusinessLogicContracts/ILawyerLogic.cs b/CaseAccounting/CaseAccountingContracts/BusinessLogicContracts/ILawyerLogic.cs index a716259..52d0c2b 100644 --- a/CaseAccounting/CaseAccountingContracts/BusinessLogicContracts/ILawyerLogic.cs +++ b/CaseAccounting/CaseAccountingContracts/BusinessLogicContracts/ILawyerLogic.cs @@ -1,4 +1,7 @@ -using System; +using CaseAccountingContracts.BindingModels; +using CaseAccountingContracts.SearchModels; +using CaseAccountingContracts.ViewModels; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,7 +9,12 @@ using System.Threading.Tasks; namespace CaseAccountingContracts.BusinessLogicContracts { - internal interface ILawyerLogic + public interface ILawyerLogic { + List? ReadList(LawyerSearchModel? model); + LawyerViewModel? ReadElement(LawyerSearchModel model); + bool Create(LawyerBindingModel model); + bool Update(LawyerBindingModel model); + bool Delete(LawyerBindingModel model); } } diff --git a/CaseAccounting/CaseAccountingContracts/ViewModels/ContractViewModel.cs b/CaseAccounting/CaseAccountingContracts/ViewModels/ContractViewModel.cs index d650c69..ae18caa 100644 --- a/CaseAccounting/CaseAccountingContracts/ViewModels/ContractViewModel.cs +++ b/CaseAccounting/CaseAccountingContracts/ViewModels/ContractViewModel.cs @@ -16,6 +16,7 @@ namespace CaseAccountingContracts.ViewModels public decimal Coast { get; set; } [DisplayName("Дата подписания")] public DateTime Date { get; set; } - public int Id { get; set; } + public int UserId { get; set; } + public int Id { get; set; } } } diff --git a/CaseAccounting/CaseAccountingContracts/ViewModels/DealViewModel.cs b/CaseAccounting/CaseAccountingContracts/ViewModels/DealViewModel.cs index 6067a1b..38be17d 100644 --- a/CaseAccounting/CaseAccountingContracts/ViewModels/DealViewModel.cs +++ b/CaseAccounting/CaseAccountingContracts/ViewModels/DealViewModel.cs @@ -16,6 +16,7 @@ namespace CaseAccountingContracts.ViewModels public string Responsibilities { get; set; } = string.Empty; [DisplayName("Дата составления")] public DateTime Date { get; set; } - public int Id { get; set; } + public int UserId { get; set; } + public int Id { get; set; } } } diff --git a/CaseAccounting/CaseAccountingContracts/ViewModels/HearingViewModel.cs b/CaseAccounting/CaseAccountingContracts/ViewModels/HearingViewModel.cs index cf245e0..a0df77a 100644 --- a/CaseAccounting/CaseAccountingContracts/ViewModels/HearingViewModel.cs +++ b/CaseAccounting/CaseAccountingContracts/ViewModels/HearingViewModel.cs @@ -16,7 +16,7 @@ namespace CaseAccountingContracts.ViewModels public DateTime Date { get; set; } [DisplayName("Номер дела")] public int CaseId { get; set; } - - public int Id { get; set; } + public int UserId { get; set; } + public int Id { get; set; } } } diff --git a/CaseAccounting/CaseAccountingContracts/ViewModels/LawyerViewModel.cs b/CaseAccounting/CaseAccountingContracts/ViewModels/LawyerViewModel.cs index 06b39e5..9526c25 100644 --- a/CaseAccounting/CaseAccountingContracts/ViewModels/LawyerViewModel.cs +++ b/CaseAccounting/CaseAccountingContracts/ViewModels/LawyerViewModel.cs @@ -21,6 +21,7 @@ namespace CaseAccountingContracts.ViewModels public int SpecializationId { get; set; } [DisplayName("Специализация")] public string Specialization { get; set; } = string.Empty; - public int Id { get; set; } + public int UserId { get; set; } + public int Id { get; set; } } } diff --git a/CaseAccounting/CaseAccountingContracts/ViewModels/SpecializationViewModel.cs b/CaseAccounting/CaseAccountingContracts/ViewModels/SpecializationViewModel.cs index 4613925..590a299 100644 --- a/CaseAccounting/CaseAccountingContracts/ViewModels/SpecializationViewModel.cs +++ b/CaseAccounting/CaseAccountingContracts/ViewModels/SpecializationViewModel.cs @@ -12,6 +12,7 @@ namespace CaseAccountingContracts.ViewModels { [DisplayName("Название")] public string Name { get; set; } = string.Empty; - public int Id { get; set; } + public int UserId { get; set; } + public int Id { get; set; } } } diff --git a/CaseAccounting/CaseAccountingDataModels/Models/IContractModel.cs b/CaseAccounting/CaseAccountingDataModels/Models/IContractModel.cs index 0f2c8dc..41bc1e3 100644 --- a/CaseAccounting/CaseAccountingDataModels/Models/IContractModel.cs +++ b/CaseAccounting/CaseAccountingDataModels/Models/IContractModel.cs @@ -11,5 +11,6 @@ namespace CaseAccountingDataModels.Models string Service { get; } decimal Coast { get; } DateTime Date { get; } - } + int UserId { get; } + } } diff --git a/CaseAccounting/CaseAccountingDataModels/Models/IDealModel.cs b/CaseAccounting/CaseAccountingDataModels/Models/IDealModel.cs index 4e0c162..d4e0c93 100644 --- a/CaseAccounting/CaseAccountingDataModels/Models/IDealModel.cs +++ b/CaseAccounting/CaseAccountingDataModels/Models/IDealModel.cs @@ -11,5 +11,6 @@ namespace CaseAccountingDataModels.Models string Subject { get; } string Responsibilities { get; } DateTime Date { get; } - } + int UserId { get; } + } } diff --git a/CaseAccounting/CaseAccountingDataModels/Models/IHearingModel.cs b/CaseAccounting/CaseAccountingDataModels/Models/IHearingModel.cs index 200b3b9..64eafa6 100644 --- a/CaseAccounting/CaseAccountingDataModels/Models/IHearingModel.cs +++ b/CaseAccounting/CaseAccountingDataModels/Models/IHearingModel.cs @@ -10,6 +10,7 @@ namespace CaseAccountingDataModels.Models { string Information { get; } DateTime Date { get; } - int CaseId { get; } - } + int CaseId { get; } + int UserId { get; } + } } diff --git a/CaseAccounting/CaseAccountingDataModels/Models/ILawyerModel.cs b/CaseAccounting/CaseAccountingDataModels/Models/ILawyerModel.cs index c7d0b23..a036500 100644 --- a/CaseAccounting/CaseAccountingDataModels/Models/ILawyerModel.cs +++ b/CaseAccounting/CaseAccountingDataModels/Models/ILawyerModel.cs @@ -13,5 +13,6 @@ namespace CaseAccountingDataModels.Models string Patronymic { get; } int Experience { get; } int SpecializationId { get; } - } + int UserId { get; } + } } diff --git a/CaseAccounting/CaseAccountingDataModels/Models/ISpecializationModel.cs b/CaseAccounting/CaseAccountingDataModels/Models/ISpecializationModel.cs index 732847b..ebf6293 100644 --- a/CaseAccounting/CaseAccountingDataModels/Models/ISpecializationModel.cs +++ b/CaseAccounting/CaseAccountingDataModels/Models/ISpecializationModel.cs @@ -9,5 +9,6 @@ namespace CaseAccountingDataModels.Models public interface ISpecializationModel : IId { string Name { get; } - } + int UserId { get; } + } }