From f9397fd277bd9f4e6d2afc3dc6d433c2dbc12673 Mon Sep 17 00:00:00 2001 From: DyCTaTOR <125912249+DyCTaTOR@users.noreply.github.com> Date: Thu, 18 Apr 2024 19:35:33 +0400 Subject: [PATCH] =?UTF-8?q?+=20=D1=87=D0=B0=D1=81=D1=82=D0=B8=D1=87=D0=BD?= =?UTF-8?q?=D0=BE=20=D0=BA=D0=BE=D0=BD=D1=82=D1=80=D0=B0=D0=BA=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BindingModel/AttestationBindingModel.cs | 17 +++++++++++++++ .../BindingModel/PlanOfStudyBindingModel.cs | 17 +++++++++++++++ .../IAttestationLogic.cs | 20 ++++++++++++++++++ .../IPlanOfStudyLogic.cs | 20 ++++++++++++++++++ .../SearchModels/AttestationSearchModel.cs | 15 +++++++++++++ .../SearchModels/PlanOfStudySearchModel.cs | 14 +++++++++++++ .../SearchModels/StudentSearchModel.cs | 2 +- .../StorageContracts/IAttestationStorage.cs | 21 +++++++++++++++++++ .../StorageContracts/IPlanOfStudyStorage.cs | 21 +++++++++++++++++++ .../ViewModels/AttestationViewModel.cs | 20 ++++++++++++++++++ .../ViewModels/PlanOfStudyViewModel.cs | 20 ++++++++++++++++++ 11 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 University/UniversityContracts/BindingModel/AttestationBindingModel.cs create mode 100644 University/UniversityContracts/BindingModel/PlanOfStudyBindingModel.cs create mode 100644 University/UniversityContracts/BusinessLogicsContracts/IAttestationLogic.cs create mode 100644 University/UniversityContracts/BusinessLogicsContracts/IPlanOfStudyLogic.cs create mode 100644 University/UniversityContracts/SearchModels/AttestationSearchModel.cs create mode 100644 University/UniversityContracts/SearchModels/PlanOfStudySearchModel.cs create mode 100644 University/UniversityContracts/StorageContracts/IAttestationStorage.cs create mode 100644 University/UniversityContracts/StorageContracts/IPlanOfStudyStorage.cs create mode 100644 University/UniversityContracts/ViewModels/AttestationViewModel.cs create mode 100644 University/UniversityContracts/ViewModels/PlanOfStudyViewModel.cs diff --git a/University/UniversityContracts/BindingModel/AttestationBindingModel.cs b/University/UniversityContracts/BindingModel/AttestationBindingModel.cs new file mode 100644 index 0000000..37408ea --- /dev/null +++ b/University/UniversityContracts/BindingModel/AttestationBindingModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityDataModels.Models; + +namespace UniversityContracts.BindingModel +{ + public class AttestationBindingModel : IAttestationModel + { + public int Id { get; set; } + public string FormOfEvaluation { get; set; } = string.Empty; + public string Score { get; set; } = string.Empty; + public int StudentId { get; set; } + } +} diff --git a/University/UniversityContracts/BindingModel/PlanOfStudyBindingModel.cs b/University/UniversityContracts/BindingModel/PlanOfStudyBindingModel.cs new file mode 100644 index 0000000..7c81892 --- /dev/null +++ b/University/UniversityContracts/BindingModel/PlanOfStudyBindingModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityDataModels.Models; + +namespace UniversityContracts.BindingModel +{ + public class PlanOfStudyBindingModel : IPlanOfStudyModel + { + public int Id { get; set; } + public string Profile { get; set; } = string.Empty; + public string FormOfStudy { get; set; } = string.Empty; + public int WorkerId { get; set; } + } +} diff --git a/University/UniversityContracts/BusinessLogicsContracts/IAttestationLogic.cs b/University/UniversityContracts/BusinessLogicsContracts/IAttestationLogic.cs new file mode 100644 index 0000000..8fd72fd --- /dev/null +++ b/University/UniversityContracts/BusinessLogicsContracts/IAttestationLogic.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityContracts.BindingModel; +using UniversityContracts.SearchModels; +using UniversityContracts.ViewModels; + +namespace UniversityContracts.BusinessLogicsContracts +{ + internal interface IAttestationLogic + { + List? ReadList(AttestationSearchModel? model); + AttestationViewModel? ReadElement(AttestationSearchModel model); + bool Create(AttestationBindingModel model); + bool Update(AttestationBindingModel model); + bool Delete(AttestationBindingModel model); + } +} diff --git a/University/UniversityContracts/BusinessLogicsContracts/IPlanOfStudyLogic.cs b/University/UniversityContracts/BusinessLogicsContracts/IPlanOfStudyLogic.cs new file mode 100644 index 0000000..3fcdd72 --- /dev/null +++ b/University/UniversityContracts/BusinessLogicsContracts/IPlanOfStudyLogic.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityContracts.BindingModel; +using UniversityContracts.SearchModels; +using UniversityContracts.ViewModels; + +namespace UniversityContracts.BusinessLogicsContracts +{ + internal interface IPlanOfStudyLogic + { + List? ReadList(PlanOfStudySearchModel? model); + PlanOfStudyViewModel? ReadElement(PlanOfStudySearchModel model); + bool Create(PlanOfStudyBindingModel model); + bool Update(PlanOfStudyBindingModel model); + bool Delete(PlanOfStudyBindingModel model); + } +} diff --git a/University/UniversityContracts/SearchModels/AttestationSearchModel.cs b/University/UniversityContracts/SearchModels/AttestationSearchModel.cs new file mode 100644 index 0000000..df13d0f --- /dev/null +++ b/University/UniversityContracts/SearchModels/AttestationSearchModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace UniversityContracts.SearchModels +{ + public class AttestationSearchModel + { + public int? Id { get; set; } + public string? FormOfEvaluation { get; set; } + public string? Score { get; set; } + } +} diff --git a/University/UniversityContracts/SearchModels/PlanOfStudySearchModel.cs b/University/UniversityContracts/SearchModels/PlanOfStudySearchModel.cs new file mode 100644 index 0000000..9a4005c --- /dev/null +++ b/University/UniversityContracts/SearchModels/PlanOfStudySearchModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace UniversityContracts.SearchModels +{ + public class PlanOfStudySearchModel + { + public int? Id { get; set; } + public string? Profile { get; set; } + } +} diff --git a/University/UniversityContracts/SearchModels/StudentSearchModel.cs b/University/UniversityContracts/SearchModels/StudentSearchModel.cs index daccb01..7e47e4c 100644 --- a/University/UniversityContracts/SearchModels/StudentSearchModel.cs +++ b/University/UniversityContracts/SearchModels/StudentSearchModel.cs @@ -1,4 +1,4 @@ -using University.DataModels.Models; +using UniversityDataModels.Models; namespace UniversityContracts.SearchModels { diff --git a/University/UniversityContracts/StorageContracts/IAttestationStorage.cs b/University/UniversityContracts/StorageContracts/IAttestationStorage.cs new file mode 100644 index 0000000..fab43f2 --- /dev/null +++ b/University/UniversityContracts/StorageContracts/IAttestationStorage.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityContracts.BindingModel; +using UniversityContracts.SearchModels; +using UniversityContracts.ViewModels; + +namespace UniversityContracts.StorageContracts +{ + public interface IAttestationStorage + { + List GetFullList(); + List GetFilteredList(AttestationSearchModel model); + AttestationViewModel? GetElement(AttestationSearchModel model); + AttestationViewModel? Insert(AttestationBindingModel model); + AttestationViewModel? Update(AttestationBindingModel model); + AttestationViewModel? Delete(AttestationBindingModel model); + } +} diff --git a/University/UniversityContracts/StorageContracts/IPlanOfStudyStorage.cs b/University/UniversityContracts/StorageContracts/IPlanOfStudyStorage.cs new file mode 100644 index 0000000..0c36c8f --- /dev/null +++ b/University/UniversityContracts/StorageContracts/IPlanOfStudyStorage.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityContracts.BindingModel; +using UniversityContracts.SearchModels; +using UniversityContracts.ViewModels; + +namespace UniversityContracts.StorageContracts +{ + public interface IPlanOfStudyStorage + { + List GetFullList(); + List GetFilteredList(PlanOfStudySearchModel model); + PlanOfStudyViewModel? GetElement(PlanOfStudySearchModel model); + PlanOfStudyViewModel? Insert(PlanOfStudyBindingModel model); + PlanOfStudyViewModel? Update(PlanOfStudyBindingModel model); + PlanOfStudyViewModel? Delete(PlanOfStudyBindingModel model); + } +} diff --git a/University/UniversityContracts/ViewModels/AttestationViewModel.cs b/University/UniversityContracts/ViewModels/AttestationViewModel.cs new file mode 100644 index 0000000..eaf6eb9 --- /dev/null +++ b/University/UniversityContracts/ViewModels/AttestationViewModel.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityDataModels.Models; + +namespace UniversityContracts.ViewModels +{ + public class AttestationViewModel : IAttestationModel + { + public int Id { get; set; } + public int StudentId { get; set; } + [DisplayName("Форма оценивания")] + public string FormOfEvaluation { get; set; } = string.Empty; + [DisplayName("Оценка")] + public string Score { get; set; } = string.Empty; + } +} diff --git a/University/UniversityContracts/ViewModels/PlanOfStudyViewModel.cs b/University/UniversityContracts/ViewModels/PlanOfStudyViewModel.cs new file mode 100644 index 0000000..dbb7b07 --- /dev/null +++ b/University/UniversityContracts/ViewModels/PlanOfStudyViewModel.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityDataModels.Models; + +namespace UniversityContracts.ViewModels +{ + public class PlanOfStudyViewModel : IPlanOfStudyModel + { + public int Id { get; set; } + public int WorkerId { get; set; } + [DisplayName("Профиль")] + public string Profile { get; set; } = string.Empty; + [DisplayName("Форма обучения")] + public string FormOfStudy { get; set; } = string.Empty; + } +}