diff --git a/University/UniversityBuisnessLogic/BuisnessLogic/ReportLogic.cs b/University/UniversityBuisnessLogic/BuisnessLogic/ReportLogic.cs index 277fee3..e0141ce 100644 --- a/University/UniversityBuisnessLogic/BuisnessLogic/ReportLogic.cs +++ b/University/UniversityBuisnessLogic/BuisnessLogic/ReportLogic.cs @@ -23,6 +23,27 @@ namespace UniversityBuisnessLogic.BuisnessLogic if (model == null || model.Students == null) return new(); var disciplines = _disciplineStorage.GetFullList(); + List result = new(); + + foreach(var student in model.Students) + { + var record = new ReportStudentDisciplineViewModel + { + StudentName = student.Name, + }; + + foreach(var discipline in disciplines) + { + if(student.Statements.ContainsKey(discipline.Id)) + { + record.Disciplines.Add(discipline.Name); + } + } + + result.Add(record); + } + + return result; } } }