Пример #1
0
        private static IList <string> AddHonorRollLines(Period p, IEnumerable <StudentViewModel> students)
        {
            var outs = new List <string>();

            foreach (var kvp in students.OrderBy(s => Maintenance.GradeLevelNumber(s.GradeLevel)).GroupBy(s => s.GradeLevel))
            {
                outs.Add("-" + StudentViewModel.FormatGradeLevel(kvp.Key) + "-");
                foreach (var student in kvp)
                {
                    outs.Add(student.Name + "," + student.GradeLevel + "," + student.Gpa(p).ToString("0.00"));
                }
            }
            return(outs);
        }