Ejemplo n.º 1
0
        private void HandleSavePatientDocumentCompleted(ReceivedResponses receivedResponses)
        {
            IsLoading = false;
            var response = receivedResponses.Get <DtoResponse <PatientDocumentDto> > ();
            var results  = response.DataTransferObject;

            if (results.HasErrors)
            {
                var errorMessageSb = new StringBuilder();

                foreach (var dataErrorInfo in results.DataErrorInfoCollection)
                {
                    errorMessageSb.AppendLine(dataErrorInfo.ToString());
                }

                var errorMessage = errorMessageSb.ToString();

                if (!string.IsNullOrEmpty(errorMessage))
                {
                    _userDialogService.ShowDialog(errorMessage, "Save Patient Document", UserDialogServiceOptions.Ok);
                }
            }
            else
            {
                var patientDocumentUploadedEvent = new PatientDocumentUploadedEventArgs
                {
                    PatientKey = PatientDocumentDto.PatientKey
                };
                RaiseViewClosing();
                _eventAggregator.GetEvent <PatientDocumentUploadedEvent> ().Publish(patientDocumentUploadedEvent);
            }
        }
 /// <summary>
 /// Patients the document uploaded events.
 /// </summary>
 /// <param name="patientDocumentUploadedEventArgs">The <see cref="Rem.Ria.PatientModule.PatientDashboard.PatientDocumentUploadedEventArgs"/> instance containing the event data.</param>
 /// <returns>A <see cref="System.Boolean"/></returns>
 public bool PatientDocumentUploadedEvents(PatientDocumentUploadedEventArgs patientDocumentUploadedEventArgs)
 {
     return(_patientKey == patientDocumentUploadedEventArgs.PatientKey);
 }
 /// <summary>
 /// Patients the document uploaded event handler.
 /// </summary>
 /// <param name="patientDocumentUploadedEventArgs">The <see cref="Rem.Ria.PatientModule.PatientDashboard.PatientDocumentUploadedEventArgs"/> instance containing the event data.</param>
 public void PatientDocumentUploadedEventHandler(
     PatientDocumentUploadedEventArgs patientDocumentUploadedEventArgs)
 {
     Deployment.Current.InvokeIfNeeded(() => GetPatientDocumentsByPatientKeyAsync(patientDocumentUploadedEventArgs.PatientKey));
 }
Ejemplo n.º 4
0
        private void HandleSavePatientDocumentCompleted( ReceivedResponses receivedResponses )
        {
            IsLoading = false;
            var response = receivedResponses.Get<DtoResponse<PatientDocumentDto>> ();
            var results = response.DataTransferObject;

            if ( results.HasErrors )
            {
                var errorMessageSb = new StringBuilder ();

                foreach ( var dataErrorInfo in results.DataErrorInfoCollection )
                {
                    errorMessageSb.AppendLine ( dataErrorInfo.ToString () );
                }

                var errorMessage = errorMessageSb.ToString ();

                if ( !string.IsNullOrEmpty ( errorMessage ) )
                {
                    _userDialogService.ShowDialog ( errorMessage, "Save Patient Document", UserDialogServiceOptions.Ok );
                }
            }
            else
            {
                var patientDocumentUploadedEvent = new PatientDocumentUploadedEventArgs
                    {
                        PatientKey = PatientDocumentDto.PatientKey
                    };
                RaiseViewClosing ();
                _eventAggregator.GetEvent<PatientDocumentUploadedEvent> ().Publish ( patientDocumentUploadedEvent );
            }
        }
 /// <summary>
 /// Patients the document uploaded events.
 /// </summary>
 /// <param name="patientDocumentUploadedEventArgs">The <see cref="Rem.Ria.PatientModule.PatientDashboard.PatientDocumentUploadedEventArgs"/> instance containing the event data.</param>
 /// <returns>A <see cref="System.Boolean"/></returns>
 public bool PatientDocumentUploadedEvents( PatientDocumentUploadedEventArgs patientDocumentUploadedEventArgs )
 {
     return _patientKey == patientDocumentUploadedEventArgs.PatientKey;
 }
 /// <summary>
 /// Patients the document uploaded event handler.
 /// </summary>
 /// <param name="patientDocumentUploadedEventArgs">The <see cref="Rem.Ria.PatientModule.PatientDashboard.PatientDocumentUploadedEventArgs"/> instance containing the event data.</param>
 public void PatientDocumentUploadedEventHandler(
     PatientDocumentUploadedEventArgs patientDocumentUploadedEventArgs )
 {
     Deployment.Current.InvokeIfNeeded ( () => GetPatientDocumentsByPatientKeyAsync ( patientDocumentUploadedEventArgs.PatientKey ) );
 }