private void ExecuteToggleActiveIndicator( MedicationDto medicationDto ) { var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher (); requestDispatcher.Add ( new SaveDtoRequest<MedicationDto> { DataTransferObject = medicationDto } ); requestDispatcher.ProcessRequests ( HandleSaveMedicationCompleted, HandleSaveMedicationException ); }
/// <summary> /// Navigates to default command. /// </summary> /// <param name="parameters">The parameters.</param> protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters ) { var key = parameters.GetValue<long> ( "MedicationKey" ); var patientkey = parameters.GetValue<long> ( "PatientKey" ); var dispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher (); if ( key == 0 ) { Medication = new MedicationDto (); Medication.PatientKey = patientkey; } else { dispatcher.Add ( new GetMedicationByKeyRequest { Key = key } ); IsLoading = true; } dispatcher.AddLookupValuesRequest ( "MedicationStatus" ); dispatcher.AddLookupValuesRequest ( "DiscontinuedReason" ); dispatcher.ProcessRequests ( HandleRequestComplete, HandleRequestDispatcherException ); IsLoading = true; StartRuleWatch (); }
private void ExecuteShowMedicationCommand( MedicationDto medicationDto ) { _navigationService.Navigate ( "ModalPopupRegion", "EditMedicationView", null, new[] { new KeyValuePair<string, string> ( "MedicationKey", medicationDto.Key.ToString () ), new KeyValuePair<string, string> ( "PatientKey", _patientKey.ToString () ) } ); }