From dadcc5b61a5cf2e9ac1aa83b8ef7ccaac5af79f9 Mon Sep 17 00:00:00 2001 From: MaxKarme <91691525+MaxKarme@users.noreply.github.com> Date: Sat, 8 Apr 2023 22:27:21 +0400 Subject: [PATCH 1/3] add report --- .../BindingModels/ReportBindingModel.cs | 12 ++++++++++++ .../BuisnessLogicContracts/IReportLogic.cs | 10 ++++++++++ .../ViewModels/ReportStudentDisciplineViewModel.cs | 8 ++++++++ 3 files changed, 30 insertions(+) create mode 100644 University/UniversityContracts/BindingModels/ReportBindingModel.cs create mode 100644 University/UniversityContracts/BuisnessLogicContracts/IReportLogic.cs create mode 100644 University/UniversityContracts/ViewModels/ReportStudentDisciplineViewModel.cs diff --git a/University/UniversityContracts/BindingModels/ReportBindingModel.cs b/University/UniversityContracts/BindingModels/ReportBindingModel.cs new file mode 100644 index 0000000..f0ef3a5 --- /dev/null +++ b/University/UniversityContracts/BindingModels/ReportBindingModel.cs @@ -0,0 +1,12 @@ +using UniversityContracts.ViewModels; + +namespace UniversityContracts.BindingModels +{ + public class ReportBindingModel + { + public string? FileName { get; set; } = string.Empty; + public DateTime? From { get; set; } + public DateTime? To { get; set; } + List Students { get; set; } = new(); + } +} diff --git a/University/UniversityContracts/BuisnessLogicContracts/IReportLogic.cs b/University/UniversityContracts/BuisnessLogicContracts/IReportLogic.cs new file mode 100644 index 0000000..c5e3818 --- /dev/null +++ b/University/UniversityContracts/BuisnessLogicContracts/IReportLogic.cs @@ -0,0 +1,10 @@ +using UniversityContracts.BindingModels; +using UniversityContracts.ViewModels; + +namespace UniversityContracts.BuisnessLogicContracts +{ + public interface IReportLogic + { + List GetStudentDiscipline(ReportBindingModel model); + } +} diff --git a/University/UniversityContracts/ViewModels/ReportStudentDisciplineViewModel.cs b/University/UniversityContracts/ViewModels/ReportStudentDisciplineViewModel.cs new file mode 100644 index 0000000..9ce5ab1 --- /dev/null +++ b/University/UniversityContracts/ViewModels/ReportStudentDisciplineViewModel.cs @@ -0,0 +1,8 @@ +namespace UniversityContracts.ViewModels +{ + public class ReportStudentDisciplineViewModel + { + public string StudentName { get; set; } = string.Empty; + public List Disciplines { get; set; } = new(); + } +} From e3ec7c8acdb7527680ca470c063c006e6e1037d5 Mon Sep 17 00:00:00 2001 From: MaxKarme <91691525+MaxKarme@users.noreply.github.com> Date: Sat, 8 Apr 2023 22:32:28 +0400 Subject: [PATCH 2/3] add public in report --- .../UniversityContracts/BindingModels/ReportBindingModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/University/UniversityContracts/BindingModels/ReportBindingModel.cs b/University/UniversityContracts/BindingModels/ReportBindingModel.cs index f0ef3a5..38b7fbe 100644 --- a/University/UniversityContracts/BindingModels/ReportBindingModel.cs +++ b/University/UniversityContracts/BindingModels/ReportBindingModel.cs @@ -7,6 +7,6 @@ namespace UniversityContracts.BindingModels public string? FileName { get; set; } = string.Empty; public DateTime? From { get; set; } public DateTime? To { get; set; } - List Students { get; set; } = new(); + public List Students { get; set; } = new(); } } From 59e6a1418f0d15a5cbedcda79c38347285c18df9 Mon Sep 17 00:00:00 2001 From: MaxKarme <91691525+MaxKarme@users.noreply.github.com> Date: Sat, 8 Apr 2023 23:17:52 +0400 Subject: [PATCH 3/3] change dictionaries --- University/UniversityDataModels/Models/IDisciplineModel.cs | 1 + University/UniversityDataModels/Models/IStatementModel.cs | 1 - University/UniversityDataModels/Models/IStudentModel.cs | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/University/UniversityDataModels/Models/IDisciplineModel.cs b/University/UniversityDataModels/Models/IDisciplineModel.cs index a40373f..c2c26ae 100644 --- a/University/UniversityDataModels/Models/IDisciplineModel.cs +++ b/University/UniversityDataModels/Models/IDisciplineModel.cs @@ -4,5 +4,6 @@ { String Name { get; } String Department { get; } + int StatementId { get; } } } diff --git a/University/UniversityDataModels/Models/IStatementModel.cs b/University/UniversityDataModels/Models/IStatementModel.cs index 6188a75..681f016 100644 --- a/University/UniversityDataModels/Models/IStatementModel.cs +++ b/University/UniversityDataModels/Models/IStatementModel.cs @@ -4,6 +4,5 @@ { DateTime Date { get; } int HoursCount { get; } - Dictionary Students { get; } } } diff --git a/University/UniversityDataModels/Models/IStudentModel.cs b/University/UniversityDataModels/Models/IStudentModel.cs index ce5db79..1ff6eb5 100644 --- a/University/UniversityDataModels/Models/IStudentModel.cs +++ b/University/UniversityDataModels/Models/IStudentModel.cs @@ -5,5 +5,6 @@ String Name { get; } String RecordCardNumber { get; } Dictionary Results { get; } + Dictionary Statements { get; } } }