コード例 #1
0
        private void HandleUpdateClinicianAppointmentException(ExceptionInfo ex)
        {
            UpdateSchedule(true);
            _userDialogService.ShowDialog(ex.Message, "UpdateClinicianAppointmentCompleted", UserDialogServiceOptions.Ok);

            if (_previousClinicanKey != 0)
            {
                var appointmentUpdatedEventArgs = new AppointmentUpdatedEventArgs
                {
                    ClinicianKey = _previousClinicanKey
                };
                _eventAggregator.GetEvent <AppointmentUpdatedEvent> ().Publish(appointmentUpdatedEventArgs);
            }
        }
コード例 #2
0
        /// <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;
        }
コード例 #3
0
        private void HandleUpdateClinicianAppointmentCompleted(ReceivedResponses receivedResponses)
        {
            var response = receivedResponses.Get <UpdateClinicianAppointmentResponse> ();

            var clinicianAppointmentDto = response.ClinicianAppointmentDto;

            RaiseVisitChanged(clinicianAppointmentDto);
            ClinicianSchedule.AvailableAppointments =
                ClinicianSchedule.TotalAppointments - ClinicianSchedule.ClinicianAppointments.Count;

            if (_previousClinicanKey != 0)
            {
                var appointmentUpdatedEventArgs = new AppointmentUpdatedEventArgs
                {
                    ClinicianKey = _previousClinicanKey
                };
                _eventAggregator.GetEvent <AppointmentUpdatedEvent> ().Publish(appointmentUpdatedEventArgs);
            }
            IsLoading = false;
        }
コード例 #4
0
        private void HandleUpdateClinicianAppointmentException ( ExceptionInfo ex )
        {
            UpdateSchedule ( true );
            _userDialogService.ShowDialog ( ex.Message, "UpdateClinicianAppointmentCompleted", UserDialogServiceOptions.Ok );

            if ( _previousClinicanKey != 0 )
            {
                var appointmentUpdatedEventArgs = new AppointmentUpdatedEventArgs
                    {
                        ClinicianKey = _previousClinicanKey
                    };
                _eventAggregator.GetEvent<AppointmentUpdatedEvent> ().Publish ( appointmentUpdatedEventArgs );
            }
        }
コード例 #5
0
        private void HandleUpdateClinicianAppointmentCompleted ( ReceivedResponses receivedResponses )
        {
            var response = receivedResponses.Get<UpdateClinicianAppointmentResponse> ();

            var clinicianAppointmentDto = response.ClinicianAppointmentDto;
            RaiseVisitChanged ( clinicianAppointmentDto );
            ClinicianSchedule.AvailableAppointments =
                ClinicianSchedule.TotalAppointments - ClinicianSchedule.ClinicianAppointments.Count;

            if ( _previousClinicanKey != 0 )
            {
                var appointmentUpdatedEventArgs = new AppointmentUpdatedEventArgs
                    {
                        ClinicianKey = _previousClinicanKey
                    };
                _eventAggregator.GetEvent<AppointmentUpdatedEvent> ().Publish ( appointmentUpdatedEventArgs );
            }
            IsLoading = false;
        }
コード例 #6
0
 /// <summary>
 /// Filters the appointment updated events.
 /// </summary>
 /// <param name="appointmentUpdatedEventArgs">The <see cref="Rem.Ria.PatientModule.FrontDeskDashboard.AppointmentUpdatedEventArgs"/> instance containing the event data.</param>
 /// <returns>A <see cref="System.Boolean"/></returns>
 public bool FilterAppointmentUpdatedEvents ( AppointmentUpdatedEventArgs appointmentUpdatedEventArgs )
 {
     return appointmentUpdatedEventArgs.ClinicianKey == ClinicianSchedule.ClinicianKey;
 }
コード例 #7
0
 /// <summary>
 /// Appointments the updated event handler.
 /// </summary>
 /// <param name="obj">The <see cref="Rem.Ria.PatientModule.FrontDeskDashboard.AppointmentUpdatedEventArgs"/> instance containing the event data.</param>
 public void AppointmentUpdatedEventHandler ( AppointmentUpdatedEventArgs obj )
 {
     Deployment.Current.InvokeIfNeeded ( () => UpdateSchedule ( true ) );
 }
コード例 #8
0
 /// <summary>
 /// Filters the appointment updated events.
 /// </summary>
 /// <param name="appointmentUpdatedEventArgs">The <see cref="Rem.Ria.PatientModule.FrontDeskDashboard.AppointmentUpdatedEventArgs"/> instance containing the event data.</param>
 /// <returns>A <see cref="System.Boolean"/></returns>
 public bool FilterAppointmentUpdatedEvents(AppointmentUpdatedEventArgs appointmentUpdatedEventArgs)
 {
     return(appointmentUpdatedEventArgs.ClinicianKey == ClinicianSchedule.ClinicianKey);
 }
コード例 #9
0
 /// <summary>
 /// Appointments the updated event handler.
 /// </summary>
 /// <param name="obj">The <see cref="Rem.Ria.PatientModule.FrontDeskDashboard.AppointmentUpdatedEventArgs"/> instance containing the event data.</param>
 public void AppointmentUpdatedEventHandler(AppointmentUpdatedEventArgs obj)
 {
     Deployment.Current.InvokeIfNeeded(() => UpdateSchedule(true));
 }