예제 #1
0
 /// <summary>
 /// Add a new treatment
 /// </summary>
 /// <param name="treatment">The treatment to add</param>
 /// <returns>True if treatment is added successfuly otherwise false</returns>
 public bool AddTreatment(Treatment treatment)
 {
     if (treatment != null)
     {
         db.Treatment.Add(treatment);
         db.SaveChanges();
         return(true);
     }
     return(false);
 }
예제 #2
0
 /// <summary>
 /// Add a new student
 /// </summary>
 /// <param name="student">The student to add</param>
 /// <returns>True if student is added successfuly otherwise false</returns>
 public bool AddStudent(Student student)
 {
     if (student != null)
     {
         db.Student.Add(student);
         db.SaveChanges();
         return(true);
     }
     return(false);
 }
예제 #3
0
 public bool AddParent(Parent parent)
 {
     if (parent != null)
     {
         db.Parent.Add(parent);
         db.SaveChanges();
         return(true);
     }
     return(false);
 }
예제 #4
0
 public bool AddAddress(Address address)
 {
     if (address != null)
     {
         db.Address.Add(address);
         db.SaveChanges();
         return(true);
     }
     return(false);
 }
예제 #5
0
 /// <summary>
 /// Add a new employee
 /// </summary>
 /// <param name="employee">The employee to add</param>
 /// <returns>True if employee is added successfuly otherwise false</returns>
 public bool AddEmployee(Employee employee)
 {
     if (employee != null)
     {
         db.Employee.Add(employee);
         db.SaveChanges();
         return(true);
     }
     return(false);
 }
예제 #6
0
 /// <summary>
 /// Add a new class
 /// </summary>
 /// <param name="class">The class to add</param>
 /// <returns>True if class is added successfuly otherwise false</returns>
 public bool AddClass(Class studentClass)
 {
     if (studentClass != null)
     {
         db.Class.Add(studentClass);
         db.SaveChanges();
         return(true);
     }
     return(false);
 }
예제 #7
0
 public bool AddFamilyDoctor(FamilyDoctor familyDoctor)
 {
     if (familyDoctor != null)
     {
         db.FamilyDoctor.Add(familyDoctor);
         db.SaveChanges();
         return(true);
     }
     return(false);
 }
예제 #8
0
 public bool AddInventory(Inventory inventory)
 {
     if (inventory != null)
     {
         db.Inventory.Add(inventory);
         db.SaveChanges();
         return(true);
     }
     return(false);
 }
예제 #9
0
 /// <summary>
 /// Add a new visit
 /// </summary>
 /// <param name="visit">The visit to add</param>
 /// <returns>True if visit is added successfuly otherwise false</returns>
 public bool AddVisit(Visit visit)
 {
     if (visit != null)
     {
         db.Visit.Add(visit);
         db.SaveChanges();
         return(true);
     }
     return(false);
 }
예제 #10
0
 /// <summary>
 /// Add a new Appointment
 /// </summary>
 /// <param name="appointment">The Appointment to add</param>
 /// <returns>True if Appointment is added successfuly otherwise false</returns>
 public bool AddAppointment(Appointment appointment)
 {
     if (appointment != null)
     {
         db.Appointment.Add(appointment);
         db.SaveChanges();
         return(true);
     }
     return(false);
 }