From 6c8921128b2c762ef6c4709d3e685069f0fcc026 Mon Sep 17 00:00:00 2001 From: MaxKarme <91691525+MaxKarme@users.noreply.github.com> Date: Sun, 9 Apr 2023 01:18:06 +0400 Subject: [PATCH] fix reportLogic --- .../UniversityBuisnessLogic/BuisnessLogic/ReportLogic.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/University/UniversityBuisnessLogic/BuisnessLogic/ReportLogic.cs b/University/UniversityBuisnessLogic/BuisnessLogic/ReportLogic.cs index e258b11..7a64775 100644 --- a/University/UniversityBuisnessLogic/BuisnessLogic/ReportLogic.cs +++ b/University/UniversityBuisnessLogic/BuisnessLogic/ReportLogic.cs @@ -81,9 +81,13 @@ namespace UniversityBuisnessLogic.BuisnessLogic foreach(var discipline in disciplines) { - if(student.Statements.ContainsKey(discipline.Id)) + foreach (var statement in discipline.DisciplineStatements) { - record.Disciplines.Add(discipline.Name); + if(student.Statements.ContainsKey(statement.Key)) + { + record.Disciplines.Add(discipline.Name); + break; + } } }