From 53703e0fd6d74dcebee7a8f315bd29480562e7e4 Mon Sep 17 00:00:00 2001 From: MaxKarme <91691525+MaxKarme@users.noreply.github.com> Date: Sun, 9 Apr 2023 00:26:13 +0400 Subject: [PATCH 1/3] finalized report --- .../BuisnessLogicContracts/IReportLogic.cs | 7 ++++++- .../ViewModels/ReportStudentsViewModel.cs | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 University/UniversityContracts/ViewModels/ReportStudentsViewModel.cs diff --git a/University/UniversityContracts/BuisnessLogicContracts/IReportLogic.cs b/University/UniversityContracts/BuisnessLogicContracts/IReportLogic.cs index c5e3818..1a418ed 100644 --- a/University/UniversityContracts/BuisnessLogicContracts/IReportLogic.cs +++ b/University/UniversityContracts/BuisnessLogicContracts/IReportLogic.cs @@ -1,4 +1,5 @@ -using UniversityContracts.BindingModels; + +using UniversityContracts.BindingModels; using UniversityContracts.ViewModels; namespace UniversityContracts.BuisnessLogicContracts @@ -6,5 +7,9 @@ namespace UniversityContracts.BuisnessLogicContracts public interface IReportLogic { List GetStudentDiscipline(ReportBindingModel model); + List GetStudens(ReportBindingModel model); + void SaveStudentsToWord(); + void SaveStudentsToExcel(); + void SaveStudentsToPdf(); } } diff --git a/University/UniversityContracts/ViewModels/ReportStudentsViewModel.cs b/University/UniversityContracts/ViewModels/ReportStudentsViewModel.cs new file mode 100644 index 0000000..385cf79 --- /dev/null +++ b/University/UniversityContracts/ViewModels/ReportStudentsViewModel.cs @@ -0,0 +1,14 @@ +using UniversityDataModels.Enums; + +namespace UniversityContracts.ViewModels +{ + public class ReportStudentsViewModel + { + string StudentName { get; set; } = string.Empty; + string ExaminationForm { get; set; } = string.Empty; + MarkType mark { get; set; } = MarkType.Неизвестен; + DateTime ExaminationResultDate { get; set; } + int HoursCount { get; set; } + DateTime StatementDate { get; set; } + } +} From 47ca9689243ffbed87e7b0a1b2e74704da0628ce Mon Sep 17 00:00:00 2001 From: MaxKarme <91691525+MaxKarme@users.noreply.github.com> Date: Sun, 9 Apr 2023 00:35:50 +0400 Subject: [PATCH 2/3] add public in students report view model --- .../ViewModels/ReportStudentsViewModel.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/University/UniversityContracts/ViewModels/ReportStudentsViewModel.cs b/University/UniversityContracts/ViewModels/ReportStudentsViewModel.cs index 385cf79..fa3ff50 100644 --- a/University/UniversityContracts/ViewModels/ReportStudentsViewModel.cs +++ b/University/UniversityContracts/ViewModels/ReportStudentsViewModel.cs @@ -4,11 +4,11 @@ namespace UniversityContracts.ViewModels { public class ReportStudentsViewModel { - string StudentName { get; set; } = string.Empty; - string ExaminationForm { get; set; } = string.Empty; - MarkType mark { get; set; } = MarkType.Неизвестен; - DateTime ExaminationResultDate { get; set; } - int HoursCount { get; set; } - DateTime StatementDate { get; set; } + public string StudentName { get; set; } = string.Empty; + public string ExaminationForm { get; set; } = string.Empty; + public MarkType mark { get; set; } = MarkType.Неизвестен; + public DateTime ExaminationResultDate { get; set; } + public int HoursCount { get; set; } + public DateTime StatementDate { get; set; } } } From a174a10be3c86cac289ff2550724d64831fda19e Mon Sep 17 00:00:00 2001 From: MaxKarme <91691525+MaxKarme@users.noreply.github.com> Date: Sun, 9 Apr 2023 01:06:58 +0400 Subject: [PATCH 3/3] add statemebts in discipline --- .../UniversityContracts/BindingModels/DisciplineBindingModel.cs | 1 + .../UniversityContracts/ViewModels/DisciplineViewModel.cs | 1 + University/UniversityDataModels/Models/IDisciplineModel.cs | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/University/UniversityContracts/BindingModels/DisciplineBindingModel.cs b/University/UniversityContracts/BindingModels/DisciplineBindingModel.cs index 9b07450..627295e 100644 --- a/University/UniversityContracts/BindingModels/DisciplineBindingModel.cs +++ b/University/UniversityContracts/BindingModels/DisciplineBindingModel.cs @@ -8,5 +8,6 @@ namespace UniversityContracts.BindingModels public string Name { get; set; } = String.Empty; public string Department { get; set; } = String.Empty; public int StatementId { get; set; } + public Dictionary DisciplineStatements { get; set; } = new(); } } diff --git a/University/UniversityContracts/ViewModels/DisciplineViewModel.cs b/University/UniversityContracts/ViewModels/DisciplineViewModel.cs index 4b16129..a5f888d 100644 --- a/University/UniversityContracts/ViewModels/DisciplineViewModel.cs +++ b/University/UniversityContracts/ViewModels/DisciplineViewModel.cs @@ -8,5 +8,6 @@ namespace UniversityContracts.ViewModels public string Name { get; set; } = String.Empty; public string Department { get; set; } = String.Empty; public int StatementId { get; set; } + public Dictionary DisciplineStatements { get; set; } = new(); } } diff --git a/University/UniversityDataModels/Models/IDisciplineModel.cs b/University/UniversityDataModels/Models/IDisciplineModel.cs index c2c26ae..efd1c9d 100644 --- a/University/UniversityDataModels/Models/IDisciplineModel.cs +++ b/University/UniversityDataModels/Models/IDisciplineModel.cs @@ -4,6 +4,6 @@ { String Name { get; } String Department { get; } - int StatementId { get; } + Dictionary DisciplineStatements { get; } } }