コード例 #1
0
 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);
     }
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
 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();
     }
 }
コード例 #4
0
 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();
     }
 }