public void ReplaceAppointment(string newDescription, Date newDate, Time newStartTime, Time newEndTime, Guid newTherapyPlaceId, Guid newLabelId, Guid originalAppointmendId, Action <string> errorCallback) { var appointmentToBeUpdated = ObservableAppointments.GetAppointmentById(originalAppointmendId); var newTherapyPlace = medicalPractice.GetTherapyPlaceById(newTherapyPlaceId); labelRepository.RequestLabel( label => { var updatedAppointment = new Appointment(appointmentToBeUpdated.Patient, newDescription, newTherapyPlace, newDate, newStartTime, newEndTime, originalAppointmendId, label); ObservableAppointments.ReplaceAppointment(updatedAppointment); }, newLabelId, errorCallback ); }
public void AddAppointment(Guid patientId, string description, Time startTime, Time endTime, Date day, Guid therapyPlaceId, Guid appointmentId, Guid labelId, Action <string> errorCallback) { patientRepository.RequestPatient( patient => { labelRepository.RequestLabel( label => { Application.Current.Dispatcher.Invoke(() => { var newAppointment = new Appointment(patient, description, medicalPractice.GetTherapyPlaceById(therapyPlaceId), day, startTime, endTime, appointmentId, label); ObservableAppointments.AddAppointment(newAppointment); }); }, labelId, errorCallback ); }, patientId, errorCallback ); }
public void AddAppointment(Guid patientId, string description, Time startTime, Time endTime, Date day, Guid therapyPlaceId, Guid labelId, Guid appointmentId, Guid medicalPracticeId) { var newAppointment = new AppointmentTransferData(patientId, description, day, startTime, endTime, therapyPlaceId, appointmentId, medicalPracticeId, labelId); ObservableAppointments.AddAppointment(newAppointment); }
public void ReplaceAppointment(string newDescription, Date newDate, Time newStartTime, Time newEndTime, Guid newTherapyPlaceId, Guid newLabelId, Guid originalAppointmendId) { var appointmentToBeUpdated = ObservableAppointments.GetAppointmentById(originalAppointmendId); var updatedAppointment = new AppointmentTransferData(appointmentToBeUpdated.PatientId, newDescription, newDate, newStartTime, newEndTime, newTherapyPlaceId, originalAppointmendId, appointmentToBeUpdated.MedicalPracticeId, newLabelId); ObservableAppointments.ReplaceAppointment(updatedAppointment); }
public void DeleteAppointment(Guid removedAppointmentId) { ObservableAppointments.DeleteAppointment(removedAppointmentId); }