Ejemplo n.º 1
0
 private void ExecuteToggleActiveIndicator( MedicationDto medicationDto )
 {
     var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher ();
     requestDispatcher.Add ( new SaveDtoRequest<MedicationDto> { DataTransferObject = medicationDto } );
     requestDispatcher.ProcessRequests ( HandleSaveMedicationCompleted, HandleSaveMedicationException );
 }
Ejemplo n.º 2
0
        /// <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 ();
        }
Ejemplo n.º 3
0
 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 () )
             } );
 }