make report logic student discipline
This commit is contained in:
parent
f29365f88c
commit
6abd26ea3c
@ -23,6 +23,27 @@ namespace UniversityBuisnessLogic.BuisnessLogic
|
||||
if (model == null || model.Students == null) return new();
|
||||
|
||||
var disciplines = _disciplineStorage.GetFullList();
|
||||
List<ReportStudentDisciplineViewModel> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user