Beispiel #1
0
 public void RemoveSubject(Subject subject)
 {
     Subjects.Remove(subject);
     foreach (var classRecord in ClassRecords)
     {
         if (classRecord.Subject == subject)
         {
             classRecord.Subject = null;
         }
     }
 }
Beispiel #2
0
        private static void LoadSubjects(Schedule schedule, SQLiteCommand command)
        {
            command.CommandText = "select * from subjects";

            var reader = command.ExecuteReader();
            while (reader.Read())
            {
                var subject = new Subject {Name = (string) reader["name"]};
                schedule.Subjects.Add(subject);
            }
            reader.Close();
        }
Beispiel #3
0
 public void AddSubject(Subject subject)
 {
     Subjects.Add(subject);
 }