Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PatientReminderViewModel"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        public PatientReminderViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory)
            : base(accessControlManager, commandFactory)
        {
            _userDialogService             = userDialogService;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory);

            SearchCommand = commandFactoryHelper.BuildDelegateCommand(() => SearchCommand, ExecuteSearchCommand);
            ClearCommand  = commandFactoryHelper.BuildDelegateCommand(() => ClearCommand, ExecuteClearCommand);

            PageSize = DEFAULTPAGESIZE;
            PatientReminderCriteria = new PatientReminderCriteriaDto
            {
                PageSize = DEFAULTPAGESIZE,
                LabResultFilterModifier = FilterModifier.EqualTo,
                AgeFilterModifier       = FilterModifier.EqualTo
            };

            FilterModifierList = new List <string>
            {
                FilterModifier.EqualTo,
                FilterModifier.GreaterThan,
                FilterModifier.GreaterThanOrEqualTo,
                FilterModifier.LessThen,
                FilterModifier.LessThenOrEqualTo
            };
        }
Example #2
0
 protected Presenter(TView view, IEventAggregator eventAggregator, IAsyncRequestDispatcherFactory requestDispatcherFactory)
 {
     View                     = view;
     EventAggregator          = eventAggregator;
     RequestDispatcherFactory = requestDispatcherFactory;
     BindingModel             = new TBindingModel();
 }
Example #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ProgramOfferingEditorViewModel"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        /// <param name="popupService">The popup service.</param>
        public ProgramOfferingEditorViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            IPopupService popupService)
            : base(userDialogService, asyncRequestDispatcherFactory, accessControlManager, commandFactory)
        {
            _userDialogService             = userDialogService;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _popupService = popupService;

            CreateCommand = NavigationCommandManager.BuildCommand(() => CreateCommand, NavigateToCreateCommand);
            EditCommand   = NavigationCommandManager.BuildCommand(() => EditCommand, NavigateToEditCommand);

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory);

            SaveCommand = commandFactoryHelper.BuildDelegateCommand <KeyedDataTransferObject> (
                () => SaveCommand,
                dto =>
            {
                var name = PropertyUtil.ExtractPropertyName(() => EditingDto);
                if (dto != null && EditingDto.GetType() != dto.GetType())
                {
                    name = EditingDto.GetType().GetProperties().First(pi => pi.PropertyType == dto.GetType()).Name;
                }
                return(name);
            },
                ExecuteSaveCommand,
                CanExecuteSaveCommand);
        }
        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();
        }
Example #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ActivityViewModelBase&lt;TDto&gt;"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="commandFactory">The command factory.</param>
        protected ActivityViewModelBase(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            IEventAggregator eventAggregator,
            ICommandFactory commandFactory)
            : base(userDialogService, asyncRequestDispatcherFactory, accessControlManager, commandFactory)
        {
            _eventAggregator = eventAggregator;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService             = userDialogService;

            _eventAggregator.GetEvent <VisitChangedEvent> ().Subscribe(
                HandleVisitChanged,
                ThreadOption.BackgroundThread,
                false,
                FilterVisitChangedEvents);

            PropertyChanged += (s, e) =>
            {
                if (e.PropertyName == PropertyUtil.ExtractPropertyName(() => EditingDto))
                {
                    UpdateDtoReadOnly();
                }
            };

            EditActivityCommand = NavigationCommandManager.BuildCommand(
                () => EditActivityCommand, NavigateToEditActivityCommand, CanNavigateToEditActivityCommand);
        }
 public SecurityService(
     IAsyncRequestDispatcherFactory asycnRequestDispatcherFactory,
     ICurrentUser currentUser)
 {
     _asycnRequestDispatcherFactory = asycnRequestDispatcherFactory;
     _currentUser = currentUser;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="MessageCenterWorkspaceViewModel"/> class.
        /// </summary>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        /// <param name="popupService">The popup service.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="dispatcherFactory">The dispatcher factory.</param>
        public MessageCenterWorkspaceViewModel(
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            IPopupService popupService,
            IEventAggregator eventAggregator,
            IAsyncRequestDispatcherFactory dispatcherFactory
            )
            : base(accessControlManager, commandFactory)
        {
            _popupService = popupService;
            _dispatcherFactory = dispatcherFactory;
            IncomingMail = new ObservableCollection<DirectMailDto>();
            SentMail = new ObservableCollection<DirectMailDto>();

            CommandFactoryHelper<MessageCenterWorkspaceViewModel> commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );
            SendNewMailCommand = commandFactoryHelper.BuildDelegateCommand ( () => SendNewMailCommand, ExecuteSendNewMail );
            OpenSaveToExternalPatientHistoryCommand =
                commandFactoryHelper.BuildDelegateCommand<string> (
                    () => OpenSaveToExternalPatientHistoryCommand, ExecuteOpenSaveToExternalPatientHistory );
            DownloadMailAttachmentCommand = commandFactoryHelper.BuildDelegateCommand<string>(
                () => DownloadMailAttachmentCommand, DownloadMailAttachment);
            DragQueryCommand = commandFactoryHelper.BuildDelegateCommand<DragDropQueryEventArgs>(() => DragQueryCommand, ExecuteDragQuery);

            eventAggregator.GetEvent<MessageSentEvent> ().Subscribe ( HandleMessageSent );

            SetupImapFolderTimers ();
            RequestInboxContent ( null, null );
            RequestSentItemsContent ( null, null );
        }
        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 UpdateStatusViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;

            SaveCommand = new DelegateCommand(Save);
        }
        public UpdateStatusViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;

            SaveCommand = new DelegateCommand(Save);
        }
        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 );
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="NidaDrugQuestionnaireViewModel"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="commandFactory">The command factory.</param>
        public NidaDrugQuestionnaireViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            IEventAggregator eventAggregator,
            ICommandFactory commandFactory)
            : base(userDialogService, asyncRequestDispatcherFactory, accessControlManager, eventAggregator, commandFactory)
        {
            _eventAggregator = eventAggregator;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService             = userDialogService;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory);

            SaveCommand = commandFactoryHelper.BuildDelegateCommand <KeyedDataTransferObject> (
                () => SaveCommand,
                dto =>
            {
                var name = PropertyUtil.ExtractPropertyName(() => EditingDto);
                if (dto != null && EditingDto.GetType() != dto.GetType())
                {
                    name = EditingDto.GetType().GetProperties().First(pi => pi.PropertyType == dto.GetType()).Name;
                }
                return(name);
            },
                ExecuteSaveCommand,
                CanExecuteSaveCommand);

            var ruleExecutor = new NotifyPropertyChangedRuleExecutor <NidaDrugQuestionnaireViewModel, IDataTransferObject> ();

            ruleExecutor.AddRunAllRulesProperty(vm => vm.EditingDto);
            ruleExecutor.WatchSubject(this);
        }
        public ClientViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IDialogService dialogService,
            IAddClientViewModel addClientViewModel,
            IAddPositionViewModel addPositionViewModel,
            IAddIndustryViewModel addIndustryViewModel)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _dialogService = dialogService;
            _addClientViewModel = addClientViewModel;
            _addPositionViewModel = addPositionViewModel;
            _addIndustryViewModel = addIndustryViewModel;

            _addClientRequest = new InteractionRequest<ResponseNotification>();
            _addPositionRequest = new InteractionRequest<ResponseNotification>();
            _addIndustryRequest = new InteractionRequest<ResponseNotification>();

            AddClientCommand = new DelegateCommand(AddClient);
            RemoveClientCommand = new DelegateCommand(RemoveClient);
            AddPositionCommand = new DelegateCommand(AddPosition);
            RemovePositionCommand = new DelegateCommand(RemovePosition);
            AddIndustryCommand = new DelegateCommand(AddIndustry);
            RemoveIndustryCommand = new DelegateCommand(RemoveIndustry);
            EditClientCommand = new DelegateCommand<ClientModel>(EditClient);
        }
        public ClientViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IDialogService dialogService,
            IAddClientViewModel addClientViewModel,
            IAddPositionViewModel addPositionViewModel,
            IAddIndustryViewModel addIndustryViewModel)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _dialogService        = dialogService;
            _addClientViewModel   = addClientViewModel;
            _addPositionViewModel = addPositionViewModel;
            _addIndustryViewModel = addIndustryViewModel;

            _addClientRequest   = new InteractionRequest <ResponseNotification>();
            _addPositionRequest = new InteractionRequest <ResponseNotification>();
            _addIndustryRequest = new InteractionRequest <ResponseNotification>();

            AddClientCommand      = new DelegateCommand(AddClient);
            RemoveClientCommand   = new DelegateCommand(RemoveClient);
            AddPositionCommand    = new DelegateCommand(AddPosition);
            RemovePositionCommand = new DelegateCommand(RemovePosition);
            AddIndustryCommand    = new DelegateCommand(AddIndustry);
            RemoveIndustryCommand = new DelegateCommand(RemoveIndustry);
            EditClientCommand     = new DelegateCommand <ClientModel>(EditClient);
        }
Example #15
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PayorCoverageViewModel"/> class.
        /// </summary>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="popupService">The popup service.</param>
        /// <param name="navigationService">The navigation service.</param>
        public PayorCoverageViewModel(
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IUserDialogService userDialogService,
            IPopupService popupService,
            INavigationService navigationService)
            : base(accessControlManager, commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService             = userDialogService;
            _popupService      = popupService;
            _navigationService = navigationService;

            PageSize = 50;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory);

            DeletePayorCoverageCommand = commandFactoryHelper.BuildDelegateCommand <PayorCoverageCacheDto> (
                () => DeletePayorCoverageCommand, ExecuteDeletePayorCoverageCommand);
            ShowPayorCoverageEditorCommand = commandFactoryHelper.BuildDelegateCommand <PayorCoverageCacheDto> (
                () => ShowPayorCoverageEditorCommand, ExecuteShowPayorCoverageEditorCommand);
            GoToPatientHistoryCommand = commandFactoryHelper.BuildDelegateCommand(
                () => GoToPatientHistoryCommand, ExecuteGoToPatientHistoryCommand);
        }
Example #16
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AgencyWorkspaceViewModel"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="navigationService">The navigation service.</param>
        /// <param name="commandFactory">The command factory.</param>
        public AgencyWorkspaceViewModel(
            IUserDialogService userDialogService,
            IEventAggregator eventAggregator,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            INavigationService navigationService,
            ICommandFactory commandFactory)
            : base(accessControlManager, commandFactory)
        {
            _userDialogService             = userDialogService;
            _eventAggregator               = eventAggregator;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _navigationService             = navigationService;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory);

            UploadLabResultCommand = commandFactoryHelper.BuildDelegateCommand <object> (() => UploadLabResultCommand, ExecuteUploadLabResultCommand);
            GoToDashboardCommand   = commandFactoryHelper.BuildDelegateCommand(() => GoToDashboardCommand, ExecuteGoToDashboard);
            GoToProfileCommand     = commandFactoryHelper.BuildDelegateCommand <object> (() => GoToProfileCommand, ExecuteGoToProfile);

            _eventAggregator.GetEvent <AgencyChangedEvent> ().Subscribe(
                AgencyChangedEventHandler,
                ThreadOption.BackgroundThread,
                false,
                FilterAgencyChangedEvents);
        }
Example #17
0
        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);
        }
Example #18
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SendC32ViewModel"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="popupService">The popup service.</param>
        /// <param name="currentUserContextService">The current user context service.</param>
        public SendC32ViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            IEventAggregator eventAggregator,
            IPopupService popupService,
            ICurrentUserContextService currentUserContextService)
            : base(accessControlManager, commandFactory)
        {
            _userDialogService             = userDialogService;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _eventAggregator = eventAggregator;
            _popupService    = popupService;

            currentUserContextService.RegisterForContext((cuc, b) => _currentContext = cuc);

            // UI Commands
            SendC32Command = CommandFactoryHelper
                             .CreateHelper(this, commandFactory)
                             .BuildDelegateCommand(() => SendC32Command, ExecuteSendC32);

            OpenAddressBookCommand = CommandFactoryHelper
                                     .CreateHelper(this, commandFactory)
                                     .BuildDelegateCommand(() => OpenAddressBookCommand, ExecuteOpenAddressBook);

            // Navigation Commands

            OpenSendC32ViewCommand = NavigationCommandManager.BuildCommand(() => OpenSendC32ViewCommand, NavigateToOpenSendC32ViewCommand);

            _eventAggregator.GetEvent <DirectAddressRecipientSelectedEvent> ().Subscribe(HandleDirectAddressRecipientSelectedEventHandler);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MainPatientSearchViewModel"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="navigationService">The navigation service.</param>
        /// <param name="commandFactory">The command factory.</param>
        public MainPatientSearchViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            INavigationService navigationService,
            ICommandFactory commandFactory )
            : base(userDialogService,
                asyncRequestDispatcherFactory,
                accessControlManager,
                navigationService,
                commandFactory)
        {
            _userDialogService = userDialogService;
            _navigationService = navigationService;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            DragStartingCommand = commandFactoryHelper.BuildDelegateCommand<object> ( () => DragStartingCommand, ExecuteDragStartingCommand );
            ViewDashboardCommand = commandFactoryHelper.BuildDelegateCommand<PatientSearchResultDto> (
                () => ViewDashboardCommand, ExecuteViewDashboard );
            ViewProfileCommand = commandFactoryHelper.BuildDelegateCommand<PatientSearchResultDto> ( () => ViewProfileCommand, ExecuteViewProfile );
            ApplyPaymentCommand = commandFactoryHelper.BuildDelegateCommand<PatientSearchResultDto> ( () => ApplyPaymentCommand, ExecuteApplyPayment );
            CreateNewAppointmentCommand = commandFactoryHelper.BuildDelegateCommand<PatientSearchResultDto> (
                () => CreateNewAppointmentCommand, ExecuteCreateNewAppointment );
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TedsAdmissionInterviewViewModel"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="commandFactory">The command factory.</param>
        public TedsAdmissionInterviewViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            IEventAggregator eventAggregator,
            ICommandFactory commandFactory)
            : base(userDialogService, asyncRequestDispatcherFactory, accessControlManager, eventAggregator, commandFactory)
        {
            _userDialogService             = userDialogService;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;

            _primaryDetailedDrugCodeList   = new ObservableCollection <DetailedDrugCodeDto> ();
            _secondaryDetailedDrugCodeList = new ObservableCollection <DetailedDrugCodeDto> ();
            _tertiaryDetailedDrugCodeList  = new ObservableCollection <DetailedDrugCodeDto> ();

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory);

            RemoveSubstanceUsageCommand = commandFactoryHelper.BuildDelegateCommand <string> (
                () => RemoveSubstanceUsageCommand, ExecuteRemoveSubstanceUsage);

            var ruleExecutor = new NotifyPropertyChangedRuleExecutor <TedsAdmissionInterviewViewModel, IDataTransferObject>();

            ruleExecutor.AddRunAllRulesProperty(vm => vm.EditingDto);
            ruleExecutor.WatchSubject(this);
        }
Example #21
0
        public EditJobFunctionViewModel(
            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();

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory);

            SaveJobFunctionCommand  = commandFactoryHelper.BuildDelegateCommand(() => SaveJobFunctionCommand, ExecuteSaveJobFunctionCommand);
            GrantSystemRoleCommand  = commandFactoryHelper.BuildDelegateCommand(() => GrantSystemRoleCommand, ExecuteGrantSystemRoleCommand);
            RevokeSystemRoleCommand = commandFactoryHelper.BuildDelegateCommand <SystemRoleDto> (
                () => RevokeSystemRoleCommand, ExecuteRevokeSystemRoleCommand);
            CancelCommand = commandFactoryHelper.BuildDelegateCommand(() => CancelCommand, ExecuteCancelCommand);

            CreateCommand = NavigationCommandManager.BuildCommand(() => CreateCommand, NavigateToCreateCommand);
            EditCommand   = NavigationCommandManager.BuildCommand(() => EditCommand, NavigateToEditCommand);
            CloneCommand  = NavigationCommandManager.BuildCommand(() => CloneCommand, NavigateToCloneCommand);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MessageCenterWorkspaceViewModel"/> class.
        /// </summary>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        /// <param name="popupService">The popup service.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="dispatcherFactory">The dispatcher factory.</param>
        public MessageCenterWorkspaceViewModel(
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            IPopupService popupService,
            IEventAggregator eventAggregator,
            IAsyncRequestDispatcherFactory dispatcherFactory
            )
            : base(accessControlManager, commandFactory)
        {
            _popupService      = popupService;
            _dispatcherFactory = dispatcherFactory;
            IncomingMail       = new ObservableCollection <DirectMailDto>();
            SentMail           = new ObservableCollection <DirectMailDto>();

            CommandFactoryHelper <MessageCenterWorkspaceViewModel> commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory);

            SendNewMailCommand = commandFactoryHelper.BuildDelegateCommand(() => SendNewMailCommand, ExecuteSendNewMail);
            OpenSaveToExternalPatientHistoryCommand =
                commandFactoryHelper.BuildDelegateCommand <string> (
                    () => OpenSaveToExternalPatientHistoryCommand, ExecuteOpenSaveToExternalPatientHistory);
            DownloadMailAttachmentCommand = commandFactoryHelper.BuildDelegateCommand <string>(
                () => DownloadMailAttachmentCommand, DownloadMailAttachment);
            DragQueryCommand = commandFactoryHelper.BuildDelegateCommand <DragDropQueryEventArgs>(() => DragQueryCommand, ExecuteDragQuery);

            eventAggregator.GetEvent <MessageSentEvent> ().Subscribe(HandleMessageSent);

            SetupImapFolderTimers();
            RequestInboxContent(null, null);
            RequestSentItemsContent(null, null);
        }
Example #23
0
        public AppointmentSchedulerViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IUserDialogService userDialogService,
            IAccessControlManager accessControlManager,
            IEventAggregator eventAggregator,
            INavigationService navigationService,
            ICommandFactory commandFactory)
            : base(accessControlManager, commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService             = userDialogService;
            _eventAggregator   = eventAggregator;
            _navigationService = navigationService;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory);

            _nextDayCommand     = commandFactoryHelper.BuildDelegateCommand(() => NextDayCommand, ExecuteNextDayCommand, CanExecuteNextDayCommand);
            _previousDayCommand = commandFactoryHelper.BuildDelegateCommand(
                () => PreviousDayCommand, ExecutePreviousDayCommand, CanExecutePreviousDayCommand);
            _goToTodayCommand = commandFactoryHelper.BuildDelegateCommand(
                () => GoToTodayCommand, ExecuteGoToTodayCommand, CanExecuteGoToTodayCommand);

            eventAggregator.GetEvent <FrontDeskDashboardDateChangedEvent> ().Subscribe(
                OnFrontDeskDashboardDateChanged, ThreadOption.PublisherThread, false, FilterFrontDeskDashboardDateChanged);

            _selectedDate = DateTime.Now.Date;

            ApplyContextChanges = true;
        }
        public AppointmentSchedulerViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IUserDialogService userDialogService,
            IAccessControlManager accessControlManager,
            IEventAggregator eventAggregator,
            INavigationService navigationService,
            ICommandFactory commandFactory )
            : base(accessControlManager, commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService = userDialogService;
            _eventAggregator = eventAggregator;
            _navigationService = navigationService;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            _nextDayCommand = commandFactoryHelper.BuildDelegateCommand ( () => NextDayCommand, ExecuteNextDayCommand, CanExecuteNextDayCommand );
            _previousDayCommand = commandFactoryHelper.BuildDelegateCommand (
                () => PreviousDayCommand, ExecutePreviousDayCommand, CanExecutePreviousDayCommand );
            _goToTodayCommand = commandFactoryHelper.BuildDelegateCommand (
                () => GoToTodayCommand, ExecuteGoToTodayCommand, CanExecuteGoToTodayCommand );

            eventAggregator.GetEvent<FrontDeskDashboardDateChangedEvent> ().Subscribe (
                OnFrontDeskDashboardDateChanged, ThreadOption.PublisherThread, false, FilterFrontDeskDashboardDateChanged );

            _selectedDate = DateTime.Now.Date;

            ApplyContextChanges = true;
        }
Example #25
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PayorCoverageViewModel"/> class.
        /// </summary>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="popupService">The popup service.</param>
        /// <param name="navigationService">The navigation service.</param>
        public PayorCoverageViewModel(
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IUserDialogService userDialogService,
            IPopupService popupService,
            INavigationService navigationService)
            : base(accessControlManager, commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService = userDialogService;
            _popupService = popupService;
            _navigationService = navigationService;

            PageSize = 50;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            DeletePayorCoverageCommand = commandFactoryHelper.BuildDelegateCommand<PayorCoverageCacheDto> (
                () => DeletePayorCoverageCommand, ExecuteDeletePayorCoverageCommand );
            ShowPayorCoverageEditorCommand = commandFactoryHelper.BuildDelegateCommand<PayorCoverageCacheDto> (
                () => ShowPayorCoverageEditorCommand, ExecuteShowPayorCoverageEditorCommand );
            GoToPatientHistoryCommand = commandFactoryHelper.BuildDelegateCommand (
                () => GoToPatientHistoryCommand, ExecuteGoToPatientHistoryCommand );
        }
Example #26
0
        public AddViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;

            SaveCommand = new DelegateCommand(Save, CanSave);
        }
Example #27
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BillingModule"/> class.
        /// </summary>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="container">The container.</param>
        /// <param name="regionManager">The region manager.</param>
        /// <param name="currentUserContextService">The current user context service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        public BillingModule(
            IAccessControlManager accessControlManager,
            IUnityContainer container,
            IRegionManager regionManager,
            ICurrentUserContextService currentUserContextService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IEventAggregator eventAggregator)
        {
            _accessControlManager          = accessControlManager;
            _container                     = container;
            _regionManager                 = regionManager;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _eventAggregator               = eventAggregator;

            //This is temporary until the main navigation dropdown is fixed
            currentUserContextService.RegisterForContext(
                (u, b) =>
            {
                if (u != null)
                {
                    _agencyKey = u.Agency.Key;
                    HandleCheckBillingOffice();
                }
            },
                true);
        }
Example #28
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SaveMailAttachmentPatientDocumentViewModel"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="navigationService">The navigation service.</param>
        /// <param name="popupService">The popup service.</param>
        public SaveMailAttachmentPatientDocumentViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            IEventAggregator eventAggregator,
            INavigationService navigationService,
            IPopupService popupService)
            : base(userDialogService, asyncRequestDispatcherFactory, accessControlManager, commandFactory)
        {
            _userDialogService             = userDialogService;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _eventAggregator   = eventAggregator;
            _navigationService = navigationService;
            _popupService      = popupService;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory);

            CreatePatientImportDocumentCommand = commandFactoryHelper.BuildDelegateCommand(
                () => CreatePatientImportDocumentCommand, ExecuteCreatePatientImportDocumentCommand);

            var ruleExecutor = new NotifyPropertyChangedRuleExecutor <SaveMailAttachmentPatientDocumentViewModel, IDataTransferObject> ();

            ruleExecutor.AddRunAllRulesProperty(vm => vm.EditingDto);
            ruleExecutor.WatchSubject(this);
        }
        public AddIndustryViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;

            SaveCommand = new DelegateCommand(Save, CanSave);
        }
Example #30
0
 public SecurityService(
     IAsyncRequestDispatcherFactory asycnRequestDispatcherFactory,
     ICurrentUser currentUser)
 {
     _asycnRequestDispatcherFactory = asycnRequestDispatcherFactory;
     _currentUser = currentUser;
 }
Example #31
0
        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);
        }
Example #32
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PatientListViewModel"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        public PatientListViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory )
            : base(accessControlManager, commandFactory)
        {
            _userDialogService = userDialogService;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            SearchCommand = commandFactoryHelper.BuildDelegateCommand ( () => SearchCommand, ExecuteSearchCommand );
            ClearCommand = commandFactoryHelper.BuildDelegateCommand ( () => ClearCommand, ExecuteClearCommand );

            PatientListCriteria = new PatientListCriteriaDto ();
            PatientListCriteria.PageSize = DEFAULTPAGESIZE;
            PatientListCriteria.LabResultFilterModifier = FilterModifier.EqualTo;
            PatientListCriteria.AgeFilterModifier = FilterModifier.EqualTo;

            FilterModifierList = new List<string>
                {
                    FilterModifier.EqualTo,
                    FilterModifier.GreaterThan,
                    FilterModifier.GreaterThanOrEqualTo,
                    FilterModifier.LessThen,
                    FilterModifier.LessThenOrEqualTo
                };
        }
Example #33
0
        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 EditJobFunctionViewModel(
            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 ();

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            SaveJobFunctionCommand = commandFactoryHelper.BuildDelegateCommand ( () => SaveJobFunctionCommand, ExecuteSaveJobFunctionCommand );
            GrantSystemRoleCommand = commandFactoryHelper.BuildDelegateCommand ( () => GrantSystemRoleCommand, ExecuteGrantSystemRoleCommand );
            RevokeSystemRoleCommand = commandFactoryHelper.BuildDelegateCommand<SystemRoleDto> (
                () => RevokeSystemRoleCommand, ExecuteRevokeSystemRoleCommand );
            CancelCommand = commandFactoryHelper.BuildDelegateCommand ( () => CancelCommand, ExecuteCancelCommand );

            CreateCommand = NavigationCommandManager.BuildCommand ( () => CreateCommand, NavigateToCreateCommand );
            EditCommand = NavigationCommandManager.BuildCommand ( () => EditCommand, NavigateToEditCommand );
            CloneCommand = NavigationCommandManager.BuildCommand ( () => CloneCommand, NavigateToCloneCommand );
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MainPatientSearchViewModel"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="navigationService">The navigation service.</param>
        /// <param name="commandFactory">The command factory.</param>
        public MainPatientSearchViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            INavigationService navigationService,
            ICommandFactory commandFactory)
            : base(
                userDialogService,
                asyncRequestDispatcherFactory,
                accessControlManager,
                navigationService,
                commandFactory
                )
        {
            _userDialogService = userDialogService;
            _navigationService = navigationService;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory);

            DragStartingCommand  = commandFactoryHelper.BuildDelegateCommand <object> (() => DragStartingCommand, ExecuteDragStartingCommand);
            ViewDashboardCommand = commandFactoryHelper.BuildDelegateCommand <PatientSearchResultDto> (
                () => ViewDashboardCommand, ExecuteViewDashboard);
            ViewProfileCommand          = commandFactoryHelper.BuildDelegateCommand <PatientSearchResultDto> (() => ViewProfileCommand, ExecuteViewProfile);
            ApplyPaymentCommand         = commandFactoryHelper.BuildDelegateCommand <PatientSearchResultDto> (() => ApplyPaymentCommand, ExecuteApplyPayment);
            CreateNewAppointmentCommand = commandFactoryHelper.BuildDelegateCommand <PatientSearchResultDto> (
                () => CreateNewAppointmentCommand, ExecuteCreateNewAppointment);
        }
Example #36
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SendC32ViewModel"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="popupService">The popup service.</param>
        /// <param name="currentUserContextService">The current user context service.</param>
        public SendC32ViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            IEventAggregator eventAggregator,
            IPopupService popupService,
            ICurrentUserContextService currentUserContextService )
            : base(accessControlManager, commandFactory)
        {
            _userDialogService = userDialogService;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _eventAggregator = eventAggregator;
            _popupService = popupService;

            currentUserContextService.RegisterForContext ( ( cuc, b ) => _currentContext = cuc );

            // UI Commands
            SendC32Command = CommandFactoryHelper
                .CreateHelper ( this, commandFactory )
                .BuildDelegateCommand ( () => SendC32Command, ExecuteSendC32 );

            OpenAddressBookCommand = CommandFactoryHelper
                .CreateHelper ( this, commandFactory )
                .BuildDelegateCommand ( () => OpenAddressBookCommand, ExecuteOpenAddressBook );

            // Navigation Commands

            OpenSendC32ViewCommand = NavigationCommandManager.BuildCommand ( () => OpenSendC32ViewCommand, NavigateToOpenSendC32ViewCommand );

            _eventAggregator.GetEvent<DirectAddressRecipientSelectedEvent> ().Subscribe ( HandleDirectAddressRecipientSelectedEventHandler );
        }
        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 );
        }
Example #38
0
        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);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="LocationWorkspaceViewModel"/> class.
        /// </summary>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="navigationService">The navigation service.</param>
        /// <param name="commandFactory">The command factory.</param>
        public LocationWorkspaceViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IUserDialogService userDialogService,
            IEventAggregator eventAggregator,
            IAccessControlManager accessControlManager,
            INavigationService navigationService,
            ICommandFactory commandFactory )
            : base(accessControlManager, commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService = userDialogService;
            _eventAggregator = eventAggregator;
            _navigationService = navigationService;

            _eventAggregator.GetEvent<LocationChangedEvent> ().Subscribe (
                LocationChangedEventHandler,
                ThreadOption.BackgroundThread,
                false,
                FilterLocationChangedEvents );

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            GoToDashboardCommand = commandFactoryHelper.BuildDelegateCommand ( () => GoToDashboardCommand, ExecuteGoToDashboard );
            GoToProfileCommand = commandFactoryHelper.BuildDelegateCommand<object> ( () => GoToProfileCommand, ExecuteGoToProfile );
        }
Example #40
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SocialHistoryViewModel"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="popupService">The popup service.</param>
        /// <param name="navigationService">The navigation service.</param>
        /// <param name="commandFactory">The command factory.</param>
        public SocialHistoryViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            IEventAggregator eventAggregator,
            IPopupService popupService,
            INavigationService navigationService,
            ICommandFactory commandFactory)
            : base(userDialogService, asyncRequestDispatcherFactory, accessControlManager, eventAggregator, commandFactory)
        {
            var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory);

            SmokingWillingToQuitCommand = commandFactoryHelper.BuildDelegateCommand <object> (
                () => SmokingWillingToQuitCommand, ExecuteSmokingWillingToQuitCommand, CanExecuteSmokingWillingToQuitCommand);
            ScheduleFollowupCommand = commandFactoryHelper.BuildDelegateCommand <object> (
                () => ScheduleFollowupCommand, ExecuteScheduleFollowupCommand, CanExecuteScheduleFollowupCommand);

            _userDialogService             = userDialogService;
            _popupService                  = popupService;
            _navigationService             = navigationService;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _eventAggregator               = eventAggregator;

            var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher();

            requestDispatcher.AddLookupValuesRequest("SmokingStatus");
            requestDispatcher.ProcessRequests(GetLookupsCompleted, HandleRequestDispatcherException);
        }
Example #41
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CurrentUserService"/> class.
 /// </summary>
 /// <param name="userDialogService">The user dialog service.</param>
 /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
 public CurrentUserService(
     IUserDialogService userDialogService,
     IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory )
 {
     _userDialogService = userDialogService;
     _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
     _userPermissions = new List<Permission> ();
 }
Example #42
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CurrentUserService"/> class.
 /// </summary>
 /// <param name="userDialogService">The user dialog service.</param>
 /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
 public CurrentUserService(
     IUserDialogService userDialogService,
     IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory)
 {
     _userDialogService             = userDialogService;
     _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
     _userPermissions = new List <Permission> ();
 }
Example #43
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SignOffService"/> class.
 /// </summary>
 /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
 /// <param name="userDialogService">The user dialog service.</param>
 /// <param name="redirectService">The redirect service.</param>
 public SignOffService(
     IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
     IUserDialogService userDialogService,
     IRedirectService redirectService )
 {
     _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
     _userDialogService = userDialogService;
     _redirectService = redirectService;
 }
        public AddViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            ISecurityService securityService)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _securityService = securityService;

            SaveCommand = new DelegateCommand(Save, CanSave);
        }
        public AddClientViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            AllPositions = new ObservableCollection<PositionModel>();
            Positions = new ObservableCollection<PositionModel>();

            SaveCommand = new DelegateCommand(Save, CanSave);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="LookupQuickPickerViewModel"/> class.
 /// </summary>
 /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
 /// <param name="userDialogService">The user dialog service.</param>
 /// <param name="commandFactory">The command factory.</param>
 public LookupQuickPickerViewModel(
     IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
     IUserDialogService userDialogService,
     ICommandFactory commandFactory )
     : base(commandFactory)
 {
     _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
     _userDialogService = userDialogService;
 }
Example #47
0
 public ClientSearchAutocompleteBox()
 {
     Resources.MergedDictionaries.Add(new ResourceDictionary
     {
         Source = new Uri("/ProductivityTracker.Controls;component/Themes/SearchTemplate.xaml", UriKind.Relative)
     });
     _asyncRequestDispatcherFactory = ServiceLocator.Current.GetInstance <IAsyncRequestDispatcherFactory>();
     ItemTemplate = (DataTemplate)Resources["ClientTemplate"];
 }
Example #48
0
        public AddViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            ISecurityService securityService)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _securityService = securityService;

            SaveCommand = new DelegateCommand(Save, CanSave);
        }
Example #49
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SignOffService"/> class.
 /// </summary>
 /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
 /// <param name="userDialogService">The user dialog service.</param>
 /// <param name="redirectService">The redirect service.</param>
 public SignOffService(
     IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
     IUserDialogService userDialogService,
     IRedirectService redirectService)
 {
     _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
     _userDialogService             = userDialogService;
     _redirectService = redirectService;
 }
        public AddClientViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            AllPositions = new ObservableCollection <PositionModel>();
            Positions    = new ObservableCollection <PositionModel>();

            SaveCommand = new DelegateCommand(Save, CanSave);
        }
 public ClientSearchAutocompleteBox()
 {
     Resources.MergedDictionaries.Add(new ResourceDictionary
                                          {
                                              Source = new Uri("/ProductivityTracker.Controls;component/Themes/SearchTemplate.xaml", UriKind.Relative)
                                          });
     _asyncRequestDispatcherFactory = ServiceLocator.Current.GetInstance<IAsyncRequestDispatcherFactory>();
     ItemTemplate = (DataTemplate) Resources["ClientTemplate"];
 }
Example #52
0
        public MainPage()
        {
            InitializeComponent();
            responsesModel = new ResponsesModel();
            DataContext = responsesModel;

            // NOTE: i'm using Agatha's IOC wrapper here directly...
            // you could just as well resolve the IAsyncRequestDispatcherFactory component through _your_ container
            asyncRequestDispatcherFactory = IoC.Container.Resolve<IAsyncRequestDispatcherFactory>();
        }
Example #53
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GrowthRateViewModel"/> class.
 /// </summary>
 /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
 /// <param name="userDialogService">The user dialog service.</param>
 /// <param name="accessControlManager">The access control manager.</param>
 /// <param name="commandFactory">The command factory.</param>
 public GrowthRateViewModel(
     IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
     IUserDialogService userDialogService,
     IAccessControlManager accessControlManager,
     ICommandFactory commandFactory )
     : base(accessControlManager, commandFactory)
 {
     _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
     _userDialogService = userDialogService;
 }
Example #54
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StaffSearchViewModel"/> class.
 /// </summary>
 /// <param name="userDialogService">The user dialog service.</param>
 /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
 /// <param name="accessControlManager">The access control manager.</param>
 /// <param name="commandFactory">The command factory.</param>
 public StaffSearchViewModel(
     IUserDialogService userDialogService,
     IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
     IAccessControlManager accessControlManager,
     ICommandFactory commandFactory )
     : base(accessControlManager, commandFactory, new AdvancedSearchCriteriaBase ())
 {
     _userDialogService = userDialogService;
     _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
 }
Example #55
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PatientAccessService"/> class.
        /// </summary>
        /// <param name="currentUserContextService">The current user context service.</param>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        public PatientAccessService(
            ICurrentUserContextService currentUserContextService,
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory )
        {
            _userDialogService = userDialogService;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;

            currentUserContextService.RegisterForContext ( CurrentUserContextChanged );
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="PayorCacheQuickPickerViewModel"/> class.
        /// </summary>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="commandFactory">The command factory.</param>
        public PayorCacheQuickPickerViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IUserDialogService userDialogService,
            ICommandFactory commandFactory )
            : base(commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService = userDialogService;

            ApplyContextChanges = true;
        }
Example #57
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CdsAlertService"/> class.
 /// </summary>
 /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
 /// <param name="userDialogService">The user dialog service.</param>
 /// <param name="notificationService">The notification service.</param>
 /// <param name="eventAggregator">The event aggregator.</param>
 public CdsAlertService(
     IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
     IUserDialogService userDialogService,
     INotificationService notificationService,
     IEventAggregator eventAggregator )
 {
     _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
     _userDialogService = userDialogService;
     _notificationService = notificationService;
     _eventAggregator = eventAggregator;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ClaimBatchDashboardListViewModel"/> class.
 /// </summary>
 /// <param name="accessControlManager">The access control manager.</param>
 /// <param name="commandFactory">The command factory.</param>
 /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
 /// <param name="userDialogService">The user dialog service.</param>
 public ClaimBatchDashboardListViewModel(
     IAccessControlManager accessControlManager,
     ICommandFactory commandFactory,
     IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
     IUserDialogService userDialogService )
     : base(accessControlManager, commandFactory)
 {
     _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
     _userDialogService = userDialogService;
     PageController = new PageController ( HandlePageChanged ) { PageSize = 50 };
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ReportsWorkspaceViewModel"/> class.
 /// </summary>
 /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
 /// <param name="accessControlManager">The access control manager.</param>
 /// <param name="userDialogService">The user dialog service.</param>
 /// <param name="navigationService">The navigation service.</param>
 /// <param name="commandFactory">The command factory.</param>
 public ReportsWorkspaceViewModel(
     IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
     IAccessControlManager accessControlManager,
     IUserDialogService userDialogService,
     INavigationService navigationService,
     ICommandFactory commandFactory )
     : base(accessControlManager, commandFactory)
 {
     _userDialogService = userDialogService;
     _navigationService = navigationService;
     _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ClaimsDashboardViewModel"/> class.
 /// </summary>
 /// <param name="accessControlManager">The access control manager.</param>
 /// <param name="commandFactory">The command factory.</param>
 /// <param name="navigationService">The navigation service.</param>
 /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
 /// <param name="userDialogService">The user dialog service.</param>
 public ClaimsDashboardViewModel(
     IAccessControlManager accessControlManager,
     ICommandFactory commandFactory,
     INavigationService navigationService,
     IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
     IUserDialogService userDialogService )
     : base(accessControlManager, commandFactory)
 {
     _navigationService = navigationService;
     _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
     _userDialogService = userDialogService;
 }