Exemplo n.º 1
0
 public void addTeacher(Teacher teacher)
 {
     try
     {
         dbcontext.teachers.Add(teacher);
         dbcontext.SaveChanges();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e.ToString());
     }
 }
 public void addTaughtCourse(TaughtCourse taughtCourse)
 {
     try
     {
         dbcontext.taughtCourses.Add(taughtCourse);
         dbcontext.SaveChanges();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e.ToString());
     }
 }
Exemplo n.º 3
0
 public void addStudent(Student student)
 {
     try
     {
         dbcontext.students.Add(student);
         dbcontext.SaveChanges();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e.ToString());
     }
 }
Exemplo n.º 4
0
 public void addPerson(Person person)
 {
     try
     {
         dbcontext.people.Add(person);
         dbcontext.SaveChanges();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e.ToString());
     }
 }
Exemplo n.º 5
0
 public void addAbsence(Absence absence)
 {
     try
     {
         dbcontext.absences.Add(absence);
         dbcontext.SaveChanges();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e.ToString());
     }
 }
Exemplo n.º 6
0
 public void addOffice(Office office)
 {
     try
     {
         dbcontext.offices.Add(office);
         dbcontext.SaveChanges();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e.ToString());
     }
 }