/// <summary> /// Requests the completed. /// </summary> /// <param name="receivedResponses">The received responses.</param> protected override void RequestCompleted(ReceivedResponses receivedResponses) { if (EditingDto != null) { EditingDto.PropertyChanged -= HandleDtoPropertyChanged; } base.RequestCompleted(receivedResponses); if (EditingDto != null) { EditingDto.PropertyChanged += HandleDtoPropertyChanged; } IsEdit = false; if (_isCreating) { _isCreating = false; if (EditingDto.ClinicianKey != null && EditingDto.AppointmentStartDateTime != null && EditingDto.AppointmentEndDateTime != null) { var appointmentCreatedEvent = new AppointmentCreatedEventArgs { AppointmentKey = EditingDto.AppointmentKey, PatientKey = EditingDto.PatientKey, ClinicianKey = EditingDto.ClinicianKey.Value, StartDateTime = EditingDto.AppointmentStartDateTime.Value, EndDateTime = EditingDto.AppointmentEndDateTime.Value }; _eventAggregator.GetEvent <AppointmentCreatedEvent> ().Publish(appointmentCreatedEvent); } } else if (_isUpdating) { if (EditingDto.ClinicianKey != null) { var appointmentUpdatedEvent = new AppointmentUpdatedEventArgs { ClinicianKey = EditingDto.ClinicianKey.Value }; _eventAggregator.GetEvent <AppointmentUpdatedEvent> ().Publish(appointmentUpdatedEvent); } } RaisePropertyChanged(() => IsCreate); RaiseVisitChanged(); EditingWrapper.EditableDto = EditingDto; }
/// <summary> /// Filters the appointment created events. /// </summary> /// <param name="appointmentCreatedEventArgs">The <see cref="Rem.Ria.PatientModule.FrontDeskDashboard.AppointmentCreatedEventArgs"/> instance containing the event data.</param> /// <returns>A <see cref="System.Boolean"/></returns> public bool FilterAppointmentCreatedEvents ( AppointmentCreatedEventArgs appointmentCreatedEventArgs ) { return appointmentCreatedEventArgs.ClinicianKey == ClinicianSchedule.ClinicianKey; }
/// <summary> /// Appointments the created event handler. /// </summary> /// <param name="appointmentCreatedEventArgs">The <see cref="Rem.Ria.PatientModule.FrontDeskDashboard.AppointmentCreatedEventArgs"/> instance containing the event data.</param> public void AppointmentCreatedEventHandler ( AppointmentCreatedEventArgs appointmentCreatedEventArgs ) { Deployment.Current.InvokeIfNeeded ( () => UpdateSchedule ( true ) ); }
/// <summary> /// Filters the appointment created events. /// </summary> /// <param name="appointmentCreatedEventArgs">The <see cref="Rem.Ria.PatientModule.FrontDeskDashboard.AppointmentCreatedEventArgs"/> instance containing the event data.</param> /// <returns>A <see cref="System.Boolean"/></returns> public bool FilterAppointmentCreatedEvents(AppointmentCreatedEventArgs appointmentCreatedEventArgs) { return (appointmentCreatedEventArgs.ClinicianKey == ClinicianSchedule.ClinicianKey); }
/// <summary> /// Appointments the created event handler. /// </summary> /// <param name="appointmentCreatedEventArgs">The <see cref="Rem.Ria.PatientModule.FrontDeskDashboard.AppointmentCreatedEventArgs"/> instance containing the event data.</param> public void AppointmentCreatedEventHandler(AppointmentCreatedEventArgs appointmentCreatedEventArgs) { Deployment.Current.InvokeIfNeeded(() => UpdateSchedule(true)); }