예제 #1
0
 /// <see cref="AppointmentDAL.CreateAppointment(Appointment)"
 public bool CreateAppointment(Appointment appointment)
 {
     if (appointment == null || appointment.PatientID == null || appointment.DoctorID == null)
     {
         throw new ArgumentNullException("appointment, patientID, and doctorID cannot be null");
     }
     if (appointment.AppointmentDateTime == null)
     {
         throw new ArgumentNullException("please specify a time for the visit");
     }
     if (String.IsNullOrWhiteSpace(appointment.ReasonForVisit))
     {
         throw new ArgumentNullException("please give a reason for the visit");
     }
     return(AppointmentDAL.CreateAppointment(appointment));
 }
예제 #2
0
 // Creates the appointment
 public static int CreateAppointment(Appointment appointment)
 {
     return(AppointmentDAL.CreateAppointment(appointment));
 }