Ejemplo n.º 1
0
 public void Delete(Appointment appt)
 {
     //delete consultation also
     foreach (Consultation cs in appt.Consultations.ToList())
         db.Consultations.DeleteObject(cs);
     db.Appointments.DeleteObject(appt);
 }
Ejemplo n.º 2
0
 public static Appointment CreateTestAppointment()
 {
     Appointment appt = new Appointment()
     {
         Appointmentid = 6,
         Patientid = 1,
         Reason = "sample Reason",
         FromTime = new DateTime(),
         ToTime = new DateTime(),
         DoctorID = 1
     };
     return appt;
 }
Ejemplo n.º 3
0
        public static List<Appointment> CreateTestAppointments()
        {
            List<Appointment> appointments = new List<Appointment>();

            for (int i = 0; i < 5; i++ )
            {
                Appointment appt = new Appointment()
                {
                 Appointmentid = i,
                 Patientid = i,
                 Reason = "sample Reason",
                 FromTime = new DateTime(),
                 ToTime =  new DateTime(),
                 DoctorID = i
             };

                appointments.Add(appt);
            }
            return appointments;
        }
Ejemplo n.º 4
0
 public void Delete(Appointment appt)
 {
     appointmentRepository.Delete(appt);
 }
Ejemplo n.º 5
0
 public void Add(Appointment appt)
 {
     appointmentRepository.Add(appt);
 }
 public void Delete(Appointment appt)
 {
 }
 public void Add(Appointment appt)
 {
     appointmentList.Add(appt);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Create a new Appointment object.
 /// </summary>
 /// <param name="appointmentid">Initial value of the Appointmentid property.</param>
 /// <param name="patientid">Initial value of the Patientid property.</param>
 /// <param name="fromTime">Initial value of the FromTime property.</param>
 /// <param name="toTime">Initial value of the ToTime property.</param>
 /// <param name="doctorID">Initial value of the DoctorID property.</param>
 public static Appointment CreateAppointment(global::System.Int32 appointmentid, global::System.Int32 patientid, global::System.DateTime fromTime, global::System.DateTime toTime, global::System.Int32 doctorID)
 {
     Appointment appointment = new Appointment();
     appointment.Appointmentid = appointmentid;
     appointment.Patientid = patientid;
     appointment.FromTime = fromTime;
     appointment.ToTime = toTime;
     appointment.DoctorID = doctorID;
     return appointment;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Appointments EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToAppointments(Appointment appointment)
 {
     base.AddObject("Appointments", appointment);
 }
Ejemplo n.º 10
0
 public void Add(Appointment appt)
 {
     db.Appointments.AddObject(appt);
     db.SaveChanges();
 }