예제 #1
0
        public void AddCourse(string courseCode, string courseName, int courseNumber, string section, string semester, DateTime StartDateTime, DateTime EndDateTime)
        {
            Course c = new Course();

            c.CourseCode = courseCode;
            c.CourseName = courseName;
            c.CourseNumber = courseNumber;
            c.Section = section;
            c.Semester = semester;
            c.StartDateTime = StartDateTime;
            c.EndDateTime = EndDateTime;

            Whiteboard.Data.WhiteboardDataAccess wbAccess = new Whiteboard.Data.WhiteboardDataAccess();
            wbAccess.AddCourse(c);
        }
예제 #2
0
        public void TestAddCourse()
        {
            var course = new Course
            {
                CourseCode = "123",
                CourseName = "Underwater Basket Weaving",
                Section = "2002",
                CourseNumber = 110,
                StartDateTime = new DateTime(2014, 9, 2),
                EndDateTime = new DateTime(2014, 12, 18)
            };

            _wbDataAccess.AddCourse(course);

            Assert.IsTrue(course.Id != 0L);
        }
예제 #3
0
 public void AddStudentToCourse(long studentId, Course course)
 {
     AddStudentToCourse(studentId, course.Id);
 }
예제 #4
0
 public void AddStudentToCourse(Student student, Course course)
 {
     AddStudentToCourse(student.Id, course.Id);
 }
예제 #5
0
 public void AddCourse(Course course)
 {
     _courseRepo.Add(course);
 }
예제 #6
0
 public void DropStudentFromCourse(long studentId, Course course)
 {
     DropStudentFromCourse(studentId, course.Id);
 }
예제 #7
0
 public void DropStudentFromCourse(Student student, Course course)
 {
     DropStudentFromCourse(student.Id, course.Id);
 }