public void addCourse(int name) { Course course = new Course(); course.name = name.ToString(); course.id = saveCourse(name); courses.Add(course); }
public void load() { DataTable memberTable = query("SELECT * FROM member"); foreach (DataRow row in memberTable.Rows) { Member member = new Member(); member.id = (int)row[0]; member.name = row[1].ToString(); members.Add(member); } DataTable courseTable = query("SELECT * FROM course"); foreach (DataRow row in courseTable.Rows) { Course course = new Course(); course.id = (int)row[0]; course.name = row[1].ToString(); courses.Add(course); } DataTable languageTable = query("SELECT * FROM courselanguage"); foreach (DataRow row in languageTable.Rows) { Language language = new Language(); language.id = (int)row[0]; language.name = row[1].ToString(); languages.Add(language); } }
public void addCourse(String name) { Course course = new Course(); course.name = name; course.id = saveCourse(name); courses.Add(course); }