private static void LoadLecturers(Schedule schedule, SQLiteCommand command) { command.CommandText = "select * from lecturers"; var reader = command.ExecuteReader(); while (reader.Read()) { var lecturer = new Lecturer { Name = (string) reader["name"], Degree = (string) reader["degree"], Department = (string) reader["department"] }; schedule.Lecturers.Add(lecturer); } reader.Close(); }
public void RemoveLecturer(Lecturer lecturer) { Lecturers.Remove(lecturer); foreach (var classRecord in ClassRecords) { if (classRecord.Lecturer == lecturer) { classRecord.Lecturer = null; } } }
public sLecturer(Lecturer lecturer) : base(lecturer) { Degree = lecturer.Degree; Department = lecturer.Department; }
public void AddLecturer(Lecturer lecturer) { Lecturers.Add(lecturer); }