public void addTaughtCourse(TaughtCourse tc)
 {
     try
     {
         dbcontext.taughtcourses.Add(tc);
         dbcontext.SaveChanges();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e.ToString());
     }
 }
Esempio n. 2
0
 public void addStudent(Student student)
 {
     try
     {
         dbcontext.students.Add(student);
         dbcontext.SaveChanges();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e.ToString());
     }
 }
 public void addOffice(Office off)
 {
     try
     {
         dbcontext.offices.Add(off);
         dbcontext.SaveChanges();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e.ToString());
     }
 }
Esempio n. 4
0
 public void addEnrollment(Enrollment en)
 {
     try
     {
         dbcontext.enrollments.Add(en);
         dbcontext.SaveChanges();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e.ToString());
     }
 }
Esempio n. 5
0
 public void addPerson(Person person)
 {
     try
     {
         dbcontext.persons.Add(person);
         dbcontext.SaveChanges();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e.ToString());
     }
 }
Esempio n. 6
0
 public void addCourse(Course course)
 {
     try
     {
         dbcontext.courses.Add(course);
         dbcontext.SaveChanges();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e.ToString());
     }
 }
 public void addAbsence(Absence abs)
 {
     try
     {
         dbcontext.absences.Add(abs);
         dbcontext.SaveChanges();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e.ToString());
     }
 }
 public void addTeacher(Teacher teacher)
 {
     try
     {
         dbcontext.teachers.Add(teacher);
         dbcontext.SaveChanges();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e.ToString());
     }
 }