Пример #1
0
        public void AddStudent(long ID, string originalID, string firstName, string lastName, string emailAddress)
        {
            Student newStudent = new Student();

            newStudent.Id = ID;
            if (originalID != null || originalID != string.Empty)
            {
                newStudent.OriginalId = originalID;
            }
            if (firstName != null || firstName != string.Empty)
            {
                newStudent.FirstName = firstName;
            }
            if (lastName != null || lastName != string.Empty)
            {
                newStudent.LastName = lastName;
            }
            if (emailAddress != null || emailAddress != string.Empty)
            {
                newStudent.EmailAddress = emailAddress;
            }

            Whiteboard.Data.WhiteboardDataAccess wbAccess = new Whiteboard.Data.WhiteboardDataAccess();
            wbAccess.AddStudent(newStudent);
        }
Пример #2
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);
        }
Пример #3
0
 public void SendEmail(string fromEmail, string toEmail, string subject, string originalBody)
 {
     Whiteboard.Data.WhiteboardDataAccess wbAccess = new WhiteboardDataAccess();
 }
Пример #4
0
 public void DropStudentFromCourse(long studentID, long courseID)
 {
     Whiteboard.Data.WhiteboardDataAccess wbAccess = new Whiteboard.Data.WhiteboardDataAccess();
     wbAccess.DropStudentFromCourse(studentID, courseID);
 }
Пример #5
0
 public void AddStudentToCourse(long studentID, long courseID)
 {
     Whiteboard.Data.WhiteboardDataAccess wbAccess = new Whiteboard.Data.WhiteboardDataAccess();
     wbAccess.AddStudentToCourse(studentID, courseID);
 }
Пример #6
0
 public DatabaseTests()
 {
     _wbDataAccess = new WhiteboardDataAccess();
 }