コード例 #1
0
 public void addCourse(int name)
 {
     Course course = new Course();
     course.name = name.ToString();
     course.id = saveCourse(name);
     courses.Add(course);
 }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 public void addCourse(String name)
 {
     Course course = new Course();
     course.name = name;
     course.id = saveCourse(name);
     courses.Add(course);
 }