Beispiel #1
0
 public void AddSubject(int subject)
 {
     if (!SubjectsList.Contains(subject))
     {
         SubjectsList.Add(subject);
         StudentList.ForEach(stud =>
         {
             stud.AssessmentsList.Add(subject, 0);
         });
     }
     UpdateTable();
 }
Beispiel #2
0
 public void RemoveSubject(int subject, bool update = true)
 {
     if (SubjectsList.Contains(subject))
     {
         SubjectsList.Remove(subject);
         StudentList.ForEach(stud =>
         {
             if (stud.AssessmentsList.ContainsKey(subject))
             {
                 stud.AssessmentsList.Remove(subject);
             }
         });
     }
     if (update)
     {
         UpdateTable();
     }
 }