Beispiel #1
0
        private void HandleReplacedEvent(AppointmentReplaced replacedEvent)
        {
            var originalAppointment = AppointmentData.First(appointment => appointment.Id == replacedEvent.OriginalAppointmendId);

            AppointmentData.Remove(originalAppointment);
            AppointmentData.Add(new AppointmentTransferData(originalAppointment.PatientId,
                                                            replacedEvent.NewDescription,
                                                            replacedEvent.NewDate,
                                                            replacedEvent.NewStartTime,
                                                            replacedEvent.NewEndTime,
                                                            replacedEvent.NewTherapyPlaceId,
                                                            originalAppointment.Id,
                                                            originalAppointment.MedicalPracticeId,
                                                            replacedEvent.NewLabelId));
        }
Beispiel #2
0
        private void HandleDeletedEvent(AppointmentDeleted deletedEvent)
        {
            var appointmentToDelete = AppointmentData.First(appointment => appointment.Id == deletedEvent.RemovedAppointmentId);

            AppointmentData.Remove(appointmentToDelete);
        }