コード例 #1
0
 private static void GetStudentList()
 {
     StudentByGroup = new Dictionary <String, List <String> >();
     for (int GroupIndex = 0; GroupIndex < Groups.Count; GroupIndex++)
     {
         String SubjectID            = AlgorithmRunner.GetSubjectID(Groups[GroupIndex]);
         String ClassList            = AlgorithmRunner.GetClassList(Groups[GroupIndex]);
         IEnumerable <String> Result = InputHelper.db.Database.SqlQuery <String>("select sinhvien.MaSinhVien from pdkmh, sinhvien "
                                                                                 + "where pdkmh.MaSinhVien = sinhvien.MaSinhVien "
                                                                                 + "and MaMonHoc = '" + SubjectID + "' "
                                                                                 + "and pdkmh.Nhom in(" + ClassList + ") "
                                                                                 + "order by (Ten + Ho)");
         StudentByGroup.Add(Groups[GroupIndex], Result.ToList <String>());
     }
     GroupsRoom         = new List <Room> [Groups.Count];
     GroupsRoomStudents = new List <String> [Groups.Count][];
 }