public static void ViewStudentSchedule(student s, cours c) { using (var ef = new baron_project1Entities()) { var course = ef.studentCourseLists.Find(s.studentID); var schedule = ef.courses.Find(course.courseID); } }
public static void ViewProfessorCourseList(professor p) { using (var ef = new baron_project1Entities()) { var course = ef.studentCourseLists.Find(p.professorID); var schedule = ef.courses.Find(course.courseID); } }
public static void RegistrarAddCourse(cours c) { using (var ef = new baron_project1Entities()) { ef.courses.Add(new cours { courseDepartment = c.courseDepartment, courseName = c.courseName, courseNumber = c.courseNumber, courseEnrollment = c.courseEnrollment, courseTime = c.courseTime, courseDate = c.courseDate, professorID = c.professorID }); ef.SaveChanges(); } }
public static void RemoveStudentFromCourse(student s, cours c) { using (var ef = new baron_project1Entities()) { ef.studentCourseLists.Remove(new studentCourseList { studentID = s.studentID, courseID = c.courseID }); ef.SaveChanges(); } }