示例#1
0
        public void UpdateLists()
        {
            Educations.Clear();
            Students.Clear();
            Exams.Clear();
            Attempts.Clear();
            foreach (DataRow dr in dao.Data.Tables["Educations"].Rows)
            {
                Education e = new Education(dr);
                Educations.Add(e);

                Students.AddRange(e.Students);
                Exams.AddRange(e.Exams);
            }

            foreach (DataRow dr in dao.Data.Tables["Attempts"].Rows)
            {
                Student s = (from stud in Students where stud.ID == (int)dr["student_id"] select stud).First();
                Exam    e = (from ex in Exams where ex.ID == (int)dr["exam_id"] select ex).First();

                Attempts.Add(new Attempt(dr, e, s));
            }
        }
示例#2
0
 public void AddExams(Examination[] examList)
 {
     Exams.AddRange(examList);
 }
示例#3
0
 // Methods
 public void AddExams(params Exam[] exams) => Exams.AddRange(exams);