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