private void ExecuteShowPayorCoverageEditorCommand(PayorCoverageCacheDto dto) { var command = dto == null ? "Create" : "Edit"; var title = dto == null ? "Create Payor" : "Edit Payor"; var key = dto == null ? 0 : dto.Key; _popupService.ShowPopup ( "EditPayorCoverageView", command, title, new[] { new KeyValuePair<string, string> ( "PayorCoverageKey", key.ToString () ), new KeyValuePair<string, string> ( "PatientKey", _patientKey.ToString () ) }, false, GetPayorCoverages ); }
private void OnNavigateToCreateCommand( KeyValuePair<string, string>[] parameters ) { var patientKey = parameters.GetValue<long> ( "PatientKey" ); if(PayorCoverage != null) { _ruleExecutor.StopWatchingSubject ( this ); } PayorCoverage = new PayorCoverageCacheDto (); PayorCoverage.PatientKey = patientKey; _ruleExecutor.WatchSubject ( this ); var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher (); requestDispatcher.Add ( new GetDtoRequest<PatientSummaryDto> { Key = patientKey } ); AddLookupRequests ( requestDispatcher ); requestDispatcher.ProcessRequests ( HandleInitializationCompleted, HandleInitializationError ); }
private void ExecuteDeletePayorCoverageCommand( PayorCoverageCacheDto dto ) { var results = _userDialogService.ShowDialog ( "Are you sure you would like to delete this payor?", "Delete", UserDialogServiceOptions.OkCancel ); if (results == UserDialogServiceResult.Ok) { dto.EditStatus = EditStatus.Delete; var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher (); requestDispatcher.Add ( new SaveDtoRequest<PayorCoverageCacheDto> { DataTransferObject = dto } ); requestDispatcher.ProcessRequests ( HandleSavePayorCoverageCompleted, HandleSavePayorCoverageError ); IsLoading = true; } }