public JobFunctionListViewModel( IUserDialogService userDialogService, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory) : base(accessControlManager, commandFactory) { _popupService = popupService; _userDialogService = userDialogService; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper <SystemRoleDto> (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory); CreateJobFunctionCommand = commandFactoryHelper.BuildDelegateCommand(() => CreateJobFunctionCommand, ExecuteCreateJobFunctionCommand); EditJobFunctionCommand = commandFactoryHelper.BuildDelegateCommand <SystemRoleDto> ( () => EditJobFunctionCommand, ExecuteEditJobFunctionCommand); CloneJobFunctionCommand = commandFactoryHelper.BuildDelegateCommand <SystemRoleDto> ( () => CloneJobFunctionCommand, ExecuteCloneJobFunctionCommand); DeleteJobFunctionCommand = commandFactoryHelper.BuildDelegateCommand <SystemRoleDto> ( () => DeleteJobFunctionCommand, ExecuteDeleteJobFunction); }
public JobFunctionListViewModel( IUserDialogService userDialogService, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory ) : base(accessControlManager, commandFactory) { _popupService = popupService; _userDialogService = userDialogService; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper<SystemRoleDto> (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory ); CreateJobFunctionCommand = commandFactoryHelper.BuildDelegateCommand ( () => CreateJobFunctionCommand, ExecuteCreateJobFunctionCommand ); EditJobFunctionCommand = commandFactoryHelper.BuildDelegateCommand<SystemRoleDto> ( () => EditJobFunctionCommand, ExecuteEditJobFunctionCommand ); CloneJobFunctionCommand = commandFactoryHelper.BuildDelegateCommand<SystemRoleDto> ( () => CloneJobFunctionCommand, ExecuteCloneJobFunctionCommand ); DeleteJobFunctionCommand = commandFactoryHelper.BuildDelegateCommand<SystemRoleDto> ( () => DeleteJobFunctionCommand, ExecuteDeleteJobFunction ); }
public TaskAndTakGroupListViewModel( IUserDialogService userDialogService, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory ) : base(accessControlManager, commandFactory) { _popupService = popupService; _userDialogService = userDialogService; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper<SystemRoleDto> (); InitializeGroupingDescriptions (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory ); CreateTaskOrTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand<object> ( () => CreateTaskOrTaskGroupCommand, ExecuteCreateTaskOrTaskGroupCommand ); EditTaskOrTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand<SystemRoleDto> ( () => EditTaskOrTaskGroupCommand, ExecuteEditTaskOrTaskGroupCommand ); CloneTaskOrTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand<SystemRoleDto> ( () => CloneTaskOrTaskGroupCommand, ExecuteCloneTaskOrTaskGroupCommand ); DeleteTaskOrTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand<SystemRoleDto> ( () => DeleteTaskOrTaskGroupCommand, ExecuteDeleteTaskOrTaskGroup ); }
public ClaimBatchListViewModel( IUserDialogService userDialogService, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory) : base(accessControlManager, commandFactory) { _popupService = popupService; _userDialogService = userDialogService; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper <ClaimBatchDisplayNameDto> (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory); DownloadHealthCareClaim837ProfessionalCommand = commandFactoryHelper.BuildDelegateCommand <object> ( () => DownloadHealthCareClaim837ProfessionalCommand, ExecuteDownloadHealthCareClaim837ProfessionalCommand, CanExecuteDownloadHealthCareClaim837ProfessionalCommand); RefreshCommand = commandFactoryHelper.BuildDelegateCommand <object> (() => RefreshCommand, ExecuteRefreshCommand); ResetTestDataCommand = commandFactoryHelper.BuildDelegateCommand <object> (() => ResetTestDataCommand, ExecuteResetTestDataCommand); }
public CreateProgramEnrollmentViewModel( IUserDialogService userDialogService, IEventAggregator eventAggregator, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory) : base(accessControlManager, commandFactory) { _userDialogService = userDialogService; _eventAggregator = eventAggregator; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _popupService = popupService; Wrapper = new EditableDtoWrapper(); _pagedCollectionViewWrapper = new PagedCollectionViewWrapper <ProgramEnrollmentDto> (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory); CreateProgramEnrollmentCommand = commandFactoryHelper.BuildDelegateCommand <ProgramEnrollmentDto> ( () => CreateProgramEnrollmentCommand, ExecuteCreateProgramEnrollment); ProgramSelectionChangedCommand = commandFactoryHelper.BuildDelegateCommand <ProgramDisplayNameDto> ( () => ProgramSelectionChangedCommand, ExecuteProgramSelectionChanged); ProgramOfferingLocationSelectionChangedCommand = commandFactoryHelper.BuildDelegateCommand <ProgramOfferingLocationDto> ( () => ProgramOfferingLocationSelectionChangedCommand, ExecuteProgramOfferingLocationSelectionChanged); }
public ProgramOfferingListViewModel( IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IUserDialogService userDialogService, IPopupService popupService, ICommandFactory commandFactory) : base(accessControlManager, commandFactory) { _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper <ProgramOfferingDto> (); _userDialogService = userDialogService; _popupService = popupService; var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory); _showAllCommand = commandFactoryHelper.BuildDelegateCommand(() => ShowAllCommand, ExecuteShowAll); _showActiveOnlyCommand = commandFactoryHelper.BuildDelegateCommand(() => ShowActiveOnlyCommand, ExecuteShowActiveOnly); ToggleActiveIndicatorCommand = commandFactoryHelper.BuildDelegateCommand <ProgramOfferingDto> ( () => ToggleActiveIndicatorCommand, ExecuteToggleActiveIndicator); ShowProgramOfferingAddCommand = commandFactoryHelper.BuildDelegateCommand <object> ( () => ShowProgramOfferingAddCommand, ExecuteShowProgramOfferingAddCommand); ShowProgramOfferingEditCommand = commandFactoryHelper.BuildDelegateCommand <ProgramOfferingDto> ( () => ShowProgramOfferingEditCommand, ExecuteShowProgramOfferingEditCommand); DeleteProgramOfferingCommand = commandFactoryHelper.BuildDelegateCommand <ProgramOfferingDto> ( () => DeleteProgramOfferingCommand, ExecuteDeleteProgramOfferingCommand); _showOption = ShowOption.ShowActive; _filter = FilterByActiveStatus; InitializeGroupingDescriptions(); }
public TaskAndTakGroupListViewModel( IUserDialogService userDialogService, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory) : base(accessControlManager, commandFactory) { _popupService = popupService; _userDialogService = userDialogService; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper <SystemRoleDto> (); InitializeGroupingDescriptions(); var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory); CreateTaskOrTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand <object> ( () => CreateTaskOrTaskGroupCommand, ExecuteCreateTaskOrTaskGroupCommand); EditTaskOrTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand <SystemRoleDto> ( () => EditTaskOrTaskGroupCommand, ExecuteEditTaskOrTaskGroupCommand); CloneTaskOrTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand <SystemRoleDto> ( () => CloneTaskOrTaskGroupCommand, ExecuteCloneTaskOrTaskGroupCommand); DeleteTaskOrTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand <SystemRoleDto> ( () => DeleteTaskOrTaskGroupCommand, ExecuteDeleteTaskOrTaskGroup); }
private void HandleGetAllProgramEnrollmentsByClinicalCaseCompleted(ReceivedResponses receivedResponses) { var response = receivedResponses.Get <GetAllProgramEnrollmentsByClinicalCaseResponse> (); _programEnrollmentList = new List <ProgramEnrollmentDto> (response.ProgramEnrollmentDtos); PagedCollectionViewWrapper.WrapInPagedCollectionView(_programEnrollmentList, _filter); IsLoading = false; }
private void HandleDeleteProgramEnrollmentCompleted(ReceivedResponses receivedResponse) { var response = receivedResponse.Get <DeleteProgramEnrollmentResponse> (); _programEnrollmentList = new List <ProgramEnrollmentDto> (response.ProgramEnrollmentDtos); PagedCollectionViewWrapper.WrapInPagedCollectionView(_programEnrollmentList, _filter); IsLoading = false; }
private void ExecuteShowAll() { if (_showOption != ShowOption.ShowAll) { _showOption = ShowOption.ShowAll; PagedCollectionViewWrapper.SetFilter(_filter); } }
private void ExecuteShowAll() { if (_showOption != MedicationListViewModel.ShowOption.ShowAll) { _showOption = MedicationListViewModel.ShowOption.ShowAll; PagedCollectionViewWrapper.SetFilter(_filter); } }
private void HandleClaimBatchesCompleted(ReceivedResponses receivedResponses) { var response = receivedResponses.Get <GetClaimBatchDisplayNamesByClaimBatchStatusResponse> (); var claimBatchList = new List <ClaimBatchDisplayNameDto> (response.ClaimBatchDisplayNames); PagedCollectionViewWrapper.WrapInPagedCollectionView(claimBatchList); IsLoading = false; }
private void ExecuteShowActiveOnly() { if (_showOption == ShowOption.ShowActive) { return; } _showOption = ShowOption.ShowActive; PagedCollectionViewWrapper.SetFilter(_filter); }
public CaseProblemListViewModel( IUserDialogService userDialogService, IEventAggregator eventAggregator, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory) : base(accessControlManager, commandFactory) { _popupService = popupService; _showOption = ShowOption.ShowActive; _filter = FilterByActiveStatus; _userDialogService = userDialogService; _eventAggregator = eventAggregator; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher(); IsLoading = true; requestDispatcher .AddLookupValuesRequest(ProblemTypeLookupName) .AddLookupValuesRequest(ProblemStatusLookupName) .ProcessRequests(HandleGetLookupValuesCompleted, HandleGetLookupValuesException); _pagedCollectionViewWrapper = new PagedCollectionViewWrapper <ProblemDto> (); InitializeGroupingDescriptions(); var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory); ShowAllCommand = commandFactoryHelper.BuildDelegateCommand(() => ShowAllCommand, ExecuteShowAll); ShowActiveOnlyCommand = commandFactoryHelper.BuildDelegateCommand(() => ShowActiveOnlyCommand, ExecuteShowActiveOnly); DeleteProblemCommand = commandFactoryHelper.BuildDelegateCommand <ProblemDto> ( () => DeleteProblemCommand, ExecuteDeleteProblem, CanExecuteDeleteProblem); _eventAggregator.GetEvent <ClinicalCaseChangedEvent> ().Subscribe( ClinicalCaseChangedEventHandler, ThreadOption.BackgroundThread, false, FilterClinicalCaseChangedEvents); EditProblemCommand = commandFactoryHelper.BuildDelegateCommand <ProblemDto> (() => EditProblemCommand, ExecuteEditProblemCommand); DragQueryCommand = commandFactoryHelper.BuildDelegateCommand <DragDropQueryEventArgs> (() => DragQueryCommand, ExecuteDragQueryCommand); GenerateHL7ProblemCommand = commandFactoryHelper.BuildDelegateCommand <ProblemDto> ( () => GenerateHL7ProblemCommand, ExecuteGenerateHL7ProblemCommand); }
public ProgramEnrollmentListViewModel( IUserDialogService userDialogService, IEventAggregator eventAggregator, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory) : base(accessControlManager, commandFactory) { _popupService = popupService; _showOption = ShowOption.ShowActive; _filter = FilterByActiveStatus; _userDialogService = userDialogService; _eventAggregator = eventAggregator; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper <ProgramEnrollmentDto> (); InitializeGroupingDescriptions(); var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory); ShowAllCommand = commandFactoryHelper.BuildDelegateCommand(() => ShowAllCommand, ExecuteShowAll); ShowActiveOnlyCommand = commandFactoryHelper.BuildDelegateCommand(() => ShowActiveOnlyCommand, ExecuteShowActiveOnly); CreateProgramEnrollmentCommand = commandFactoryHelper.BuildDelegateCommand( () => CreateProgramEnrollmentCommand, ExecuteCreateProgramEnrollmentCommand); EditProgramEnrollmentCommand = commandFactoryHelper.BuildDelegateCommand <ProgramEnrollmentDto> ( () => EditProgramEnrollmentCommand, ExecuteEditProgramEnrollmentCommand); DisenrollProgramEnrollmentCommand = commandFactoryHelper.BuildDelegateCommand <ProgramEnrollmentDto> ( () => DisenrollProgramEnrollmentCommand, ExecuteDisenrollProgramEnrollmentCommand); DeleteProgramEnrollmentCommand = commandFactoryHelper.BuildDelegateCommand <ProgramEnrollmentDto> ( () => DeleteProgramEnrollmentCommand, ExecuteDeleteProgramEnrollment, CanExecuteDeleteProgramEnrollment); DragQueryCommand = commandFactoryHelper.BuildDelegateCommand <DragDropQueryEventArgs> (() => DragQueryCommand, ExecuteDragQueryCommand); _eventAggregator.GetEvent <ClinicalCaseChangedEvent> () .Subscribe(ClinicalCaseChangedEventHandler, ThreadOption.BackgroundThread, false, FilterClinicalCaseChangedEvents); _eventAggregator.GetEvent <ProgramEnrollmentChangedEvent> () .Subscribe(ProgramEnrollmentChangedEventHandler, ThreadOption.BackgroundThread, false, FilterProgramEnrollmentChangedEvents); }
/// <summary> /// Initializes a new instance of the <see cref="ClinicianMedicationOrdersTileViewModel"/> class. /// </summary> /// <param name="accessControlManager">The access control manager.</param> /// <param name="commandFactory">The command factory.</param> public ClinicianMedicationOrdersTileViewModel( IAccessControlManager accessControlManager, ICommandFactory commandFactory ) : base(accessControlManager, commandFactory) { _pagedCollectionViewWrapper = new PagedCollectionViewWrapper<MedicationDto> (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory ); _showAllCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowAllCommand, ExecuteShowAll ); _showActiveOnlyCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowActiveOnlyCommand, ExecuteShowActiveOnly ); _showOption = MedicationListViewModel.ShowOption.ShowAll; _filter = FilterByActiveStatus; InitializeGroupingDescriptions (); //TODO: this needs to be removed and real data needs to be loaded. InitTempData (); }
/// <summary> /// Initializes a new instance of the <see cref="ClinicianMedicationOrdersTileViewModel"/> class. /// </summary> /// <param name="accessControlManager">The access control manager.</param> /// <param name="commandFactory">The command factory.</param> public ClinicianMedicationOrdersTileViewModel(IAccessControlManager accessControlManager, ICommandFactory commandFactory) : base(accessControlManager, commandFactory) { _pagedCollectionViewWrapper = new PagedCollectionViewWrapper <MedicationDto> (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper( this, commandFactory); _showAllCommand = commandFactoryHelper.BuildDelegateCommand(() => ShowAllCommand, ExecuteShowAll); _showActiveOnlyCommand = commandFactoryHelper.BuildDelegateCommand(() => ShowActiveOnlyCommand, ExecuteShowActiveOnly); _showOption = MedicationListViewModel.ShowOption.ShowAll; _filter = FilterByActiveStatus; InitializeGroupingDescriptions(); //TODO: this needs to be removed and real data needs to be loaded. InitTempData(); }
/// <summary> /// Navigates to default command. /// </summary> /// <param name="parameters">The parameters.</param> protected override void NavigateToDefaultCommand(KeyValuePair <string, string>[] parameters) { var visitList = new List <VisitForBillingDto> { new VisitForBillingDto { DisplayName = "Established Patient - Primary Care - Adult", Key = 13000, PatientName = "Henry Levin", Status = "Reviewed", VisitDate = DateTime.Parse("2010-10-10") }, new VisitForBillingDto { DisplayName = "Established Patient - Primary Care - Adult", Key = 13001, PatientName = "Henry Levin", Status = "Reviewed", VisitDate = DateTime.Parse("2010-10-11") }, new VisitForBillingDto { DisplayName = "Established Patient - Primary Care - Adult", Key = 421000, PatientName = "Payne Feit", Status = "Reviewed", VisitDate = DateTime.Parse("2010-10-14") }, new VisitForBillingDto { DisplayName = "New Established Patient - Primary Care - Adult", Key = 100010081003, PatientName = "Tad Young", Status = "Reviewed", VisitDate = DateTime.Parse("2011-03-15") } }; PagedCollectionViewWrapper.WrapInPagedCollectionView(visitList); IsLoading = false; }
public EditCaseProblemViewModel( IUserDialogService userDialogService, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory) : base(accessControlManager, commandFactory) { _userDialogService = userDialogService; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _popupService = popupService; Wrapper = new EditableDtoWrapper(); _pagedCollectionViewWrapper = new PagedCollectionViewWrapper <ProblemDto> (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory); SaveProblemCommand = commandFactoryHelper.BuildDelegateCommand <ProblemDto> (() => SaveProblemCommand, ExecuteSaveProblem); DtsSearchSelectionChangedCommand = commandFactoryHelper.BuildDelegateCommand <ProblemDto> ( () => DtsSearchSelectionChangedCommand, ExecuteDtsSearchSelectionChangedCommand); }
private void ProcessSystemRoleResponses(IEnumerable <SystemRoleDto> systemRoleDtos, List <DataErrorInfo> validationErrors) { IsLoading = false; if (validationErrors.Count() == 0) { var jobFunctionList = new List <SystemRoleDto> (systemRoleDtos); PagedCollectionViewWrapper.WrapInPagedCollectionView(jobFunctionList); } else { var errors = new StringBuilder(); errors.AppendLine("The following errors occurred:"); foreach (var validationError in validationErrors) { errors.AppendLine(validationError.Message); } _userDialogService.ShowDialog(errors.ToString(), "Errors", UserDialogServiceOptions.Ok); } }
public VisitForBillingListViewModel( IUserDialogService userDialogService, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory) : base(accessControlManager, commandFactory) { _popupService = popupService; _userDialogService = userDialogService; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper <VisitForBillingDto> (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory); SendToBilling = commandFactoryHelper.BuildDelegateCommand <object> ( () => SendToBilling, ExecuteSendToBillingCommand, CanExecuteSendToBilling); SendToBillingDirectly = commandFactoryHelper.BuildDelegateCommand <object> ( () => SendToBillingDirectly, ExecuteSendToBillingCommandDirectly, CanExecuteSendToBilling); }
public MedicationListViewModel( IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IUserDialogService userDialogService, IEventAggregator eventAggregator, IAccessControlManager accessControlManager, INavigationService navigationService, ICommandFactory commandFactory) : base(accessControlManager, commandFactory) { _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _userDialogService = userDialogService; _eventAggregator = eventAggregator; _navigationService = navigationService; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper <MedicationDto> (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory); _showAllCommand = commandFactoryHelper.BuildDelegateCommand(() => ShowAllCommand, ExecuteShowAll); _showActiveOnlyCommand = commandFactoryHelper.BuildDelegateCommand(() => ShowActiveOnlyCommand, ExecuteShowActiveOnly); ToggleActiveIndicatorCommand = commandFactoryHelper.BuildDelegateCommand <MedicationDto> ( () => ToggleActiveIndicatorCommand, ExecuteToggleActiveIndicator); ShowMedicationCommand = commandFactoryHelper.BuildDelegateCommand <MedicationDto> ( () => ShowMedicationCommand, ExecuteShowMedicationCommand); _showOption = ShowOption.ShowActive; _filter = FilterByActiveStatus; InitializeGroupingDescriptions(); _pagedCollectionViewWrapper.SortDescription = new SortDescription("StartDate", ListSortDirection.Ascending); _eventAggregator.GetEvent <MedicationChangedEvent> ().Subscribe( MedicationChangedEventHandler, ThreadOption.BackgroundThread, false, FilterMedicationChangedEvents); }
private void HandleDeleteProgramCompleted(ReceivedResponses receivedResponse) { var response = receivedResponse.Get <DeleteProgramResponse> (); var dto = response.DataTransferObject; IsLoading = false; if (dto.HasErrors) { var message = string.Empty; foreach (var dataErrorInfo in dto.DataErrorInfoCollection) { message += dataErrorInfo.ErrorLevel + ": " + dataErrorInfo.Message + Environment.NewLine; } _userDialogService.ShowDialog(message, "Could not delete", UserDialogServiceOptions.Ok); } else { _programList = new List <ProgramDto> (response.ProgramDtos); PagedCollectionViewWrapper.WrapInPagedCollectionView(_programList, _filter); } }
public ProgramListViewModel( IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IUserDialogService userDialogService, IPopupService popupService, IEventAggregator eventAggregator, ICommandFactory commandFactory) : base(accessControlManager, commandFactory) { _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper <ProgramDto> (); _userDialogService = userDialogService; _popupService = popupService; _eventAggregator = eventAggregator; var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory); _showAllCommand = commandFactoryHelper.BuildDelegateCommand(() => ShowAllCommand, ExecuteShowAll); _showActiveOnlyCommand = commandFactoryHelper.BuildDelegateCommand(() => ShowActiveOnlyCommand, ExecuteShowActiveOnly); ToggleActiveIndicatorCommand = commandFactoryHelper.BuildDelegateCommand <ProgramDto> ( () => ToggleActiveIndicatorCommand, ExecuteToggleActiveIndicator); ShowProgramAddCommand = commandFactoryHelper.BuildDelegateCommand <object> (() => ShowProgramAddCommand, ExecuteShowProgramAddCommand); ShowProgramEditCommand = commandFactoryHelper.BuildDelegateCommand <ProgramDto> ( () => ShowProgramEditCommand, ExecuteShowProgramEditCommand); DeleteProgramCommand = commandFactoryHelper.BuildDelegateCommand <ProgramDto> (() => DeleteProgramCommand, ExecuteDeleteProgramCommand); _showOption = ShowOption.ShowActive; _filter = FilterByActiveStatus; InitializeGroupingDescriptions(); _eventAggregator.GetEvent <ProgramChangedEvent> ().Subscribe( ProgramChangedEventHandler, ThreadOption.BackgroundThread, false, FilterProgramChangedEvents); }
public ProgramOfferingListViewModel( IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IUserDialogService userDialogService, IPopupService popupService, ICommandFactory commandFactory ) : base(accessControlManager, commandFactory) { _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper<ProgramOfferingDto> (); _userDialogService = userDialogService; _popupService = popupService; var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory ); _showAllCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowAllCommand, ExecuteShowAll ); _showActiveOnlyCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowActiveOnlyCommand, ExecuteShowActiveOnly ); ToggleActiveIndicatorCommand = commandFactoryHelper.BuildDelegateCommand<ProgramOfferingDto> ( () => ToggleActiveIndicatorCommand, ExecuteToggleActiveIndicator ); ShowProgramOfferingAddCommand = commandFactoryHelper.BuildDelegateCommand<object> ( () => ShowProgramOfferingAddCommand, ExecuteShowProgramOfferingAddCommand ); ShowProgramOfferingEditCommand = commandFactoryHelper.BuildDelegateCommand<ProgramOfferingDto> ( () => ShowProgramOfferingEditCommand, ExecuteShowProgramOfferingEditCommand ); DeleteProgramOfferingCommand = commandFactoryHelper.BuildDelegateCommand<ProgramOfferingDto> ( () => DeleteProgramOfferingCommand, ExecuteDeleteProgramOfferingCommand ); _showOption = ShowOption.ShowActive; _filter = FilterByActiveStatus; InitializeGroupingDescriptions (); }
public ProgramEnrollmentListViewModel( IUserDialogService userDialogService, IEventAggregator eventAggregator, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory ) : base(accessControlManager, commandFactory) { _popupService = popupService; _showOption = ShowOption.ShowActive; _filter = FilterByActiveStatus; _userDialogService = userDialogService; _eventAggregator = eventAggregator; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper<ProgramEnrollmentDto> (); InitializeGroupingDescriptions (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory ); ShowAllCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowAllCommand, ExecuteShowAll ); ShowActiveOnlyCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowActiveOnlyCommand, ExecuteShowActiveOnly ); CreateProgramEnrollmentCommand = commandFactoryHelper.BuildDelegateCommand ( () => CreateProgramEnrollmentCommand, ExecuteCreateProgramEnrollmentCommand ); EditProgramEnrollmentCommand = commandFactoryHelper.BuildDelegateCommand<ProgramEnrollmentDto> ( () => EditProgramEnrollmentCommand, ExecuteEditProgramEnrollmentCommand ); DisenrollProgramEnrollmentCommand = commandFactoryHelper.BuildDelegateCommand<ProgramEnrollmentDto> ( () => DisenrollProgramEnrollmentCommand, ExecuteDisenrollProgramEnrollmentCommand ); DeleteProgramEnrollmentCommand = commandFactoryHelper.BuildDelegateCommand<ProgramEnrollmentDto> ( () => DeleteProgramEnrollmentCommand, ExecuteDeleteProgramEnrollment, CanExecuteDeleteProgramEnrollment ); DragQueryCommand = commandFactoryHelper.BuildDelegateCommand<DragDropQueryEventArgs> ( () => DragQueryCommand, ExecuteDragQueryCommand ); _eventAggregator.GetEvent<ClinicalCaseChangedEvent> () .Subscribe ( ClinicalCaseChangedEventHandler, ThreadOption.BackgroundThread, false, FilterClinicalCaseChangedEvents ); _eventAggregator.GetEvent<ProgramEnrollmentChangedEvent> () .Subscribe ( ProgramEnrollmentChangedEventHandler, ThreadOption.BackgroundThread, false, FilterProgramEnrollmentChangedEvents ); }
public ProgramListViewModel( IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IUserDialogService userDialogService, IPopupService popupService, IEventAggregator eventAggregator, ICommandFactory commandFactory ) : base(accessControlManager, commandFactory) { _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper<ProgramDto> (); _userDialogService = userDialogService; _popupService = popupService; _eventAggregator = eventAggregator; var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory ); _showAllCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowAllCommand, ExecuteShowAll ); _showActiveOnlyCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowActiveOnlyCommand, ExecuteShowActiveOnly ); ToggleActiveIndicatorCommand = commandFactoryHelper.BuildDelegateCommand<ProgramDto> ( () => ToggleActiveIndicatorCommand, ExecuteToggleActiveIndicator ); ShowProgramAddCommand = commandFactoryHelper.BuildDelegateCommand<object> ( () => ShowProgramAddCommand, ExecuteShowProgramAddCommand ); ShowProgramEditCommand = commandFactoryHelper.BuildDelegateCommand<ProgramDto> ( () => ShowProgramEditCommand, ExecuteShowProgramEditCommand ); DeleteProgramCommand = commandFactoryHelper.BuildDelegateCommand<ProgramDto> ( () => DeleteProgramCommand, ExecuteDeleteProgramCommand ); _showOption = ShowOption.ShowActive; _filter = FilterByActiveStatus; InitializeGroupingDescriptions (); _eventAggregator.GetEvent<ProgramChangedEvent> ().Subscribe ( ProgramChangedEventHandler, ThreadOption.BackgroundThread, false, FilterProgramChangedEvents ); }
public VisitForBillingListViewModel( IUserDialogService userDialogService, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory ) : base(accessControlManager, commandFactory) { _popupService = popupService; _userDialogService = userDialogService; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper<VisitForBillingDto> (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory ); SendToBilling = commandFactoryHelper.BuildDelegateCommand<object> ( () => SendToBilling, ExecuteSendToBillingCommand, CanExecuteSendToBilling ); SendToBillingDirectly = commandFactoryHelper.BuildDelegateCommand<object> ( () => SendToBillingDirectly, ExecuteSendToBillingCommandDirectly, CanExecuteSendToBilling ); }
public EditProgramEnrollmentViewModel( IUserDialogService userDialogService, IEventAggregator eventAggregator, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory ) : base(accessControlManager, commandFactory) { _userDialogService = userDialogService; _eventAggregator = eventAggregator; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _popupService = popupService; Wrapper = new EditableDtoWrapper (); _pagedCollectionViewWrapper = new PagedCollectionViewWrapper<ProgramEnrollmentDto> (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory ); EditProgramEnrollmentCommand = commandFactoryHelper.BuildDelegateCommand<ProgramEnrollmentDto> ( () => EditProgramEnrollmentCommand, ExecuteEditProgramEnrollment ); }
public EditCaseProblemViewModel( IUserDialogService userDialogService, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory ) : base(accessControlManager, commandFactory) { _userDialogService = userDialogService; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _popupService = popupService; Wrapper = new EditableDtoWrapper (); _pagedCollectionViewWrapper = new PagedCollectionViewWrapper<ProblemDto> (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory ); SaveProblemCommand = commandFactoryHelper.BuildDelegateCommand<ProblemDto> ( () => SaveProblemCommand, ExecuteSaveProblem ); DtsSearchSelectionChangedCommand = commandFactoryHelper.BuildDelegateCommand<ProblemDto> ( () => DtsSearchSelectionChangedCommand, ExecuteDtsSearchSelectionChangedCommand ); }
public ClaimBatchListViewModel( IUserDialogService userDialogService, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory ) : base(accessControlManager, commandFactory) { _popupService = popupService; _userDialogService = userDialogService; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper<ClaimBatchDisplayNameDto> (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory ); DownloadHealthCareClaim837ProfessionalCommand = commandFactoryHelper.BuildDelegateCommand<object> ( () => DownloadHealthCareClaim837ProfessionalCommand, ExecuteDownloadHealthCareClaim837ProfessionalCommand, CanExecuteDownloadHealthCareClaim837ProfessionalCommand ); RefreshCommand = commandFactoryHelper.BuildDelegateCommand<object> ( () => RefreshCommand, ExecuteRefreshCommand ); ResetTestDataCommand = commandFactoryHelper.BuildDelegateCommand<object> ( () => ResetTestDataCommand, ExecuteResetTestDataCommand ); }
public CaseProblemListViewModel( IUserDialogService userDialogService, IEventAggregator eventAggregator, IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IAccessControlManager accessControlManager, IPopupService popupService, ICommandFactory commandFactory ) : base(accessControlManager, commandFactory) { _popupService = popupService; _showOption = ShowOption.ShowActive; _filter = FilterByActiveStatus; _userDialogService = userDialogService; _eventAggregator = eventAggregator; _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher (); IsLoading = true; requestDispatcher .AddLookupValuesRequest ( ProblemTypeLookupName ) .AddLookupValuesRequest ( ProblemStatusLookupName ) .ProcessRequests ( HandleGetLookupValuesCompleted, HandleGetLookupValuesException ); _pagedCollectionViewWrapper = new PagedCollectionViewWrapper<ProblemDto> (); InitializeGroupingDescriptions (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory ); ShowAllCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowAllCommand, ExecuteShowAll ); ShowActiveOnlyCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowActiveOnlyCommand, ExecuteShowActiveOnly ); DeleteProblemCommand = commandFactoryHelper.BuildDelegateCommand<ProblemDto> ( () => DeleteProblemCommand, ExecuteDeleteProblem, CanExecuteDeleteProblem ); _eventAggregator.GetEvent<ClinicalCaseChangedEvent> ().Subscribe ( ClinicalCaseChangedEventHandler, ThreadOption.BackgroundThread, false, FilterClinicalCaseChangedEvents ); EditProblemCommand = commandFactoryHelper.BuildDelegateCommand<ProblemDto> ( () => EditProblemCommand, ExecuteEditProblemCommand ); DragQueryCommand = commandFactoryHelper.BuildDelegateCommand<DragDropQueryEventArgs> ( () => DragQueryCommand, ExecuteDragQueryCommand ); GenerateHL7ProblemCommand = commandFactoryHelper.BuildDelegateCommand<ProblemDto> ( () => GenerateHL7ProblemCommand, ExecuteGenerateHL7ProblemCommand ); }
public MedicationListViewModel( IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory, IUserDialogService userDialogService, IEventAggregator eventAggregator, IAccessControlManager accessControlManager, INavigationService navigationService, ICommandFactory commandFactory ) : base(accessControlManager, commandFactory) { _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory; _userDialogService = userDialogService; _eventAggregator = eventAggregator; _navigationService = navigationService; _pagedCollectionViewWrapper = new PagedCollectionViewWrapper<MedicationDto> (); var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory ); _showAllCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowAllCommand, ExecuteShowAll ); _showActiveOnlyCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowActiveOnlyCommand, ExecuteShowActiveOnly ); ToggleActiveIndicatorCommand = commandFactoryHelper.BuildDelegateCommand<MedicationDto> ( () => ToggleActiveIndicatorCommand, ExecuteToggleActiveIndicator ); ShowMedicationCommand = commandFactoryHelper.BuildDelegateCommand<MedicationDto> ( () => ShowMedicationCommand, ExecuteShowMedicationCommand ); _showOption = ShowOption.ShowActive; _filter = FilterByActiveStatus; InitializeGroupingDescriptions (); _pagedCollectionViewWrapper.SortDescription = new SortDescription ( "StartDate", ListSortDirection.Ascending ); _eventAggregator.GetEvent<MedicationChangedEvent> ().Subscribe ( MedicationChangedEventHandler, ThreadOption.BackgroundThread, false, FilterMedicationChangedEvents ); }