Exemplo n.º 1
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);
        }
        public MainViewModel(IPopupService popupService, SynchronizationContext synchonizationContext)
        {
            var client = new MobileServiceClient(
                _mobileServiceUrl,
                _mobileServiceKey);

            _liveAuthClient = new LiveAuthClient(_mobileServiceUrl);
            
            // Apply a ServiceFilter to the mobile client to help with our busy indication
            _mobileServiceClient = client.WithFilter(new DotoServiceFilter(
                busy =>
                {
                    IsBusy = busy;
                }));
            _popupService = popupService;
            _synchronizationContext = synchonizationContext;
            _invitesTable = _mobileServiceClient.GetTable<Invite>();
            _itemsTable = _mobileServiceClient.GetTable<Item>();
            _profilesTable = _mobileServiceClient.GetTable<Profile>();
            _listMembersTable = _mobileServiceClient.GetTable<ListMembership>();
            _devicesTable = _mobileServiceClient.GetTable<Device>();
            _settingsTable = _mobileServiceClient.GetTable<Setting>();

            SetupCommands();

            LoadSettings();
        }
Exemplo n.º 3
0
        public ErrorViewModel(IPopupService modalPopupService, Exception ex)
        {
            _modalPopupService = modalPopupService;

            Summary = ex.Message;
            Details = ex.ToString();
        }
Exemplo n.º 4
0
        public ErrorViewModel(IPopupService modalPopupService, string error)
        {
            _modalPopupService = modalPopupService;

            Summary = error;
            Details = null;
        }
Exemplo n.º 5
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);
        }
Exemplo n.º 6
0
        public CommonViewComponent(
            ICommonWebService commonWebService,
            ILocalizationService localizationService,
            IWorkContext workContext,
            IStoreContext storeContext,
            ICustomerActivityService customerActivityService,
            ICustomerActionEventService customerActionEventService,
            IPopupService popupService,
            IInteractiveFormService interactiveFormService,

            StoreInformationSettings storeInformationSettings,
            CommonSettings commonSettings,
            ForumSettings forumSettings,
            LocalizationSettings localizationSettings,
            CaptchaSettings captchaSettings,
            VendorSettings vendorSettings
            )
        {
            this._commonWebService           = commonWebService;
            this._localizationService        = localizationService;
            this._workContext                = workContext;
            this._storeContext               = storeContext;
            this._customerActivityService    = customerActivityService;
            this._customerActionEventService = customerActionEventService;
            this._popupService               = popupService;
            this._interactiveFormService     = interactiveFormService;

            this._storeInformationSettings = storeInformationSettings;
            this._commonSettings           = commonSettings;
            this._forumSettings            = forumSettings;
            this._localizationSettings     = localizationSettings;
            this._captchaSettings          = captchaSettings;
            this._vendorSettings           = vendorSettings;
        }
Exemplo n.º 7
0
 public AvatarController(IPopupService popupService, IUploadAvatarService uploadAvatarService, IUploadRepository uploadRepository,
                         IEntityRepository entityRepository) : base(popupService)
 {
     this.uploadAvatarService = uploadAvatarService;
     this.uploadRepository    = uploadRepository;
     this.entityRepository    = entityRepository;
 }
Exemplo n.º 8
0
 public EndpointDetailViewModel(
     IKubernetesService kubernetesService,
     IPopupService popupService,
     INavigationService navigationService)
     : base(kubernetesService, popupService, navigationService)
 {
 }
Exemplo n.º 9
0
 public CompanyService(ICitizenService citizenService, IConfigurationRepository configurationRepository,
                       IEquipmentRepository equipmentRepository, IProductService productService, IProductRepository productRepository,
                       ICitizenRepository citizenRepository, ITransactionsService transactionService,
                       IJobOfferService jobOfferService, ICompanyEmployeeRepository companyEmployeeRepository,
                       ICompanyRepository companyRepository, IEntityService entityService, ICompanyManagerRepository companyManagerRepository,
                       IRegionRepository regionRepository, IWarningService warningService, IJobOfferRepository jobOfferRepository,
                       IEquipmentService equipmentService, IContractService contractService, IWalletService walletService, IPopupService popupService,
                       IRegionService regionService, ICompanyFinanceSummaryService companyFinanceSummaryService)
 {
     this.companyRepository         = companyRepository;
     this.entityService             = entityService;
     this.companyManagerRepository  = companyManagerRepository;
     this.jobOfferService           = jobOfferService;
     this.companyEmployeeRepository = companyEmployeeRepository;
     this.citizenRepository         = citizenRepository;
     this.transactionService        = transactionService;
     this.equipmentRepository       = equipmentRepository;
     this.productService            = productService;
     this.productRepository         = productRepository;
     this.citizenService            = Attach(citizenService);
     this.configurationRepository   = configurationRepository;
     this.regionRepository          = regionRepository;
     this.warningService            = Attach(warningService);
     this.jobOfferRepository        = jobOfferRepository;
     this.equipmentService          = Attach(equipmentService);
     this.contractService           = Attach(contractService);
     this.walletService             = Attach(walletService);
     this.popupService  = Attach(popupService);
     this.regionService = Attach(regionService);
     this.companyFinanceSummaryService = Attach(companyFinanceSummaryService);
 }
Exemplo n.º 10
0
 public NodesViewModel(
     INavigationService navigationService,
     IKubernetesService kubernetesService,
     IPopupService popupService)
     : base(navigationService, kubernetesService, popupService)
 {
 }
Exemplo n.º 11
0
 public DebugController(IPopupService popupService, ICountryRepository countryRepository, ICongressVotingService congressVotingService,
                        ICongressVotingRepository congressVotingRepository, IBattleService battleService, IBattleRepository battleRepository,
                        ICompanyService companyService, IWalletService walletService, IMarketService marketService, IEquipmentService equipmentService,
                        ITransactionScopeProvider transactionScopeProvider, ICompanyRepository companyRepository, IEquipmentRepository equipmentRepository,
                        IHotelRepository hotelRepository, IMahService mahService, IHouseService houseService, IHouseRepository houseRepository,
                        HouseDayChangeProcessor houseDayChangeProcessor) : base(popupService)
 {
     this.countryRepository        = countryRepository;
     this.congressVotingService    = congressVotingService;
     this.congressVotingRepository = congressVotingRepository;
     this.battleService            = battleService;
     this.battleRepository         = battleRepository;
     this.companyService           = companyService;
     this.walletService            = walletService;
     this.marketService            = marketService;
     this.equipmentService         = equipmentService;
     this.transactionScopeProvider = transactionScopeProvider;
     this.companyRepository        = companyRepository;
     this.equipmentRepository      = equipmentRepository;
     this.hotelRepository          = hotelRepository;
     this.mahService              = mahService;
     this.houseService            = houseService;
     this.houseRepository         = houseRepository;
     this.houseDayChangeProcessor = houseDayChangeProcessor;
 }
Exemplo n.º 12
0
 public StorageClassDetailViewModel(
     IKubernetesService kubernetesService,
     IPopupService popupService,
     INavigationService navigationService)
     : base(kubernetesService, popupService, navigationService)
 {
 }
Exemplo n.º 13
0
 public MessageController(IMessageRepository messageRepository, IEntityRepository entityRepository,
                          IPopupService popupService) : base(popupService)
 {
     this.messageRepository = messageRepository;
     this.entityRepository  = entityRepository;
     this.messageService    = new MessageService(messageRepository, entityRepository);
 }
Exemplo n.º 14
0
 public CommonController(
     ICommonViewModelService commonViewModelService,
     ILocalizationService localizationService,
     IWorkContext workContext,
     IStoreContext storeContext,
     ICustomerActivityService customerActivityService,
     ICustomerActionEventService customerActionEventService,
     IPopupService popupService,
     IContactAttributeService contactAttributeService,
     CommonSettings commonSettings,
     CaptchaSettings captchaSettings,
     VendorSettings vendorSettings
     )
 {
     _commonViewModelService     = commonViewModelService;
     _localizationService        = localizationService;
     _workContext                = workContext;
     _storeContext               = storeContext;
     _customerActivityService    = customerActivityService;
     _customerActionEventService = customerActionEventService;
     _popupService               = popupService;
     _contactAttributeService    = contactAttributeService;
     _commonSettings             = commonSettings;
     _captchaSettings            = captchaSettings;
     _vendorSettings             = vendorSettings;
 }
Exemplo n.º 15
0
        public HomeViewModel(IDeviceService deviceService, IShareService shareService, ISettings settings,
                             ILocationService locationService, IMvxMessenger messenger, ISendPositionService sendPositionService, IPopupService popupService, ITimerService timer)
        {
            _deviceService       = deviceService;
            _shareService        = shareService;
            _settings            = settings;
            _locationService     = locationService;
            _messenger           = messenger;
            _sendPositionService = sendPositionService;
            _popupService        = popupService;
            _timer = timer;

            Title         = "TrackMe";
            PossibleTimes = new PossibleTimeProvider().GetPossibleTimes().ToObservable();
            SelectedTime  = new PossibleTime(240);

            _deviceService.LocationStatusChanged += (sender, args) =>
            {
                GpsStatus = args.Status;

                if (!_locationService.IsWatching && args.Status == LocationStatus.Started)
                {
                    _locationService.StartWatching();
                }
            };
            GpsStatus                  = _deviceService.LocationStatus;
            _locationMessageToken      = _messenger.Subscribe <LocationMessage>(GotLocation);
            _requestStartTrackingToken = _messenger.Subscribe <RequestStartTrackingMessage>(OnRequestStartTracking);
            _messenger.Subscribe <CloseAppMessage>(message =>
            {
                _messenger.Publish(new StopTrackingMessage(this, true, Token, PrivateToken, _timeEnd));
            });

            TrackConnectionStatus();
        }
Exemplo n.º 16
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 );
        }
Exemplo n.º 17
0
 public FriendController(IPopupService popupService, IFriendService friendService, ICitizenRepository citizenRepository,
                         IFriendRepository friendRepository) : base(popupService)
 {
     this.friendService     = friendService;
     this.citizenRepository = citizenRepository;
     this.friendRepository  = friendRepository;
 }
Exemplo n.º 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);
        }
Exemplo n.º 19
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 );
        }
Exemplo n.º 20
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 ReplicationControllersViewModel(
     INavigationService navigationService,
     IKubernetesService kubernetesService,
     IPopupService popupService)
     : base(navigationService, kubernetesService, popupService)
 {
 }
Exemplo n.º 22
0
        public EditPlayersViewModel(IPopupService popupService)
        {
            _popupService = popupService;

            // load players if any
            Players = new MvxObservableCollection <Player>(Settings.PlayersSetting);
        }
Exemplo n.º 23
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="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 );
        }
Exemplo n.º 25
0
        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 ();
        }
Exemplo n.º 26
0
 public PersistentVolumesViewModel(
     INavigationService navigationService,
     IKubernetesService kubernetesService,
     IPopupService popupService)
     : base(navigationService, kubernetesService, popupService)
 {
 }
Exemplo n.º 27
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);
        }
Exemplo n.º 28
0
 public NavigationController(ICountryRepository countryRepository, ICompanyService companyService, IConfigurationRepository configurationRepository,
                             IPopupService popupService) : base(popupService)
 {
     this.countryRepository       = countryRepository;
     this.companyService          = companyService;
     this.configurationRepository = configurationRepository;
 }
Exemplo n.º 29
0
        public MainViewModel(IPopupService popupService, SynchronizationContext synchonizationContext)
        {
            var client = new MobileServiceClient(
                _mobileServiceUrl,
                _mobileServiceKey);

            _liveAuthClient = new LiveAuthClient(_mobileServiceUrl);

            // Apply a ServiceFilter to the mobile client to help with our busy indication
            _mobileServiceClient = client.WithFilter(new DotoServiceFilter(
                                                         busy =>
            {
                IsBusy = busy;
            }));
            _popupService           = popupService;
            _synchronizationContext = synchonizationContext;
            _invitesTable           = _mobileServiceClient.GetTable <Invite>();
            _itemsTable             = _mobileServiceClient.GetTable <Item>();
            _profilesTable          = _mobileServiceClient.GetTable <Profile>();
            _listMembersTable       = _mobileServiceClient.GetTable <ListMembership>();
            _devicesTable           = _mobileServiceClient.GetTable <Device>();
            _settingsTable          = _mobileServiceClient.GetTable <Setting>();

            SetupCommands();

            LoadSettings();
        }
Exemplo n.º 30
0
 public NamespaceDetailViewModel(
     IKubernetesService kubernetesService,
     IPopupService popupService,
     INavigationService navigationService)
     : base(kubernetesService, popupService, navigationService)
 {
 }
Exemplo n.º 31
0
 public MapController(IPopupService popupService, IRegionRepository regionRepository, IPolygonRepository polygonRepository,
                      IResourceRepository resourceRepository) : base(popupService)
 {
     this.regionRepository   = regionRepository;
     this.polygonRepository  = polygonRepository;
     this.resourceRepository = resourceRepository;
 }
Exemplo n.º 32
0
        /// <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);
        }
Exemplo n.º 33
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);
        }
Exemplo n.º 34
0
 public SignUpViewModel(INavigationService navigationService, IOwnerDataAccessService ownerService,
                        INotificationService ns, IPopupService popup) : base(navigationService)
 {
     _ownerService        = ownerService;
     _notificationService = ns;
     _popupservice        = popup;
 }
Exemplo n.º 35
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);
        }
Exemplo n.º 36
0
 public ConfigMapDetailViewModel(
     IKubernetesService kubernetesService,
     IPopupService popupService,
     INavigationService navigationService)
     : base(kubernetesService, popupService, navigationService)
 {
 }
Exemplo n.º 37
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);
        }
Exemplo n.º 38
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomePageViewModel"/> class.
 /// </summary>
 /// <param name="accessControlManager">The access control manager.</param>
 /// <param name="navigationService">The navigation service.</param>
 /// <param name="commandFactory">The command factory.</param>
 /// <param name="popupService">The popup service.</param>
 public HomePageViewModel(
     IAccessControlManager accessControlManager,
     INavigationService navigationService,
     ICommandFactory commandFactory,
     IPopupService popupService)
     : base(accessControlManager, commandFactory)
 {
     _navigationService = navigationService;
     _popupService = popupService;
 }
Exemplo n.º 39
0
        public FrontDeskDashboardViewModel(
            IAccessControlManager accessControlManager,
            INavigationService navigationService,
            ICommandFactory commandFactory,
            IPopupService popupService)
            : base(accessControlManager, commandFactory)
        {
            _navigationService = navigationService;
            _popupService = popupService;

            CreateAppointmentCommand = NavigationCommandManager.BuildCommand ( () => CreateAppointmentCommand, NavigateToCreateAppointmentCommand );
            MakePaymentCommand = NavigationCommandManager.BuildCommand ( () => MakePaymentCommand, NavigateToMakePaymentCommand );
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateBillingOfficeButtonViewModel"/> 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="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        public CreateBillingOfficeButtonViewModel(
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            IPopupService popupService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory )
            : base(accessControlManager, commandFactory)
        {
            _popupService = popupService;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            CreateBillingOfficeCommand = commandFactoryHelper.BuildDelegateCommand (
                () => CreateBillingOfficeCommand, ExecuteCreateBillingOfficeCommand, () => !_hasBillingOffice );
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="HealthProvidersDirectoryViewModel"/> 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 HealthProvidersDirectoryViewModel(
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            IPopupService popupService,
            IEventAggregator eventAggregator,
            IAsyncRequestDispatcherFactory dispatcherFactory )
            : base(accessControlManager, commandFactory)
        {
            _popupService = popupService;
            _eventAggregator = eventAggregator;

            // [Agatha] Dispatcher factory
            _dispatcherFactory = dispatcherFactory;

            // Using the Command Factory Helper, build all the commands used by this ViewModel.
            // This is required because the generated command(s) are [Castle] Dynamic Proxies, which run special logic (i.e.: Run Rule Engine Rules)
            // before the Execute Action is called. See Pillar.FluentRuleEngine.CheckRulesInterceptor for an example.
            CommandFactoryHelper<HealthProvidersDirectoryViewModel> commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            // UI Commands
            DoneCommand = commandFactoryHelper.BuildDelegateCommand ( () => DoneCommand, ExecuteDoneCommand );

            // Navigation Command

            // Event Aggregator Events Subscription

            Providers = new ObservableCollection<HealthProviderEntryDto>
                {
                    new HealthProviderEntryDto
                        {
                            FirstName = "John",
                            LastName = "Snow",
                            Mail = "*****@*****.**",
                            OrganizationName = "IniTech",
                            Specialization = "Cardiologist",
                            TelephoneNumber = "(123)456-7890"
                        }
                };

            Directories = new ObservableCollection<Tuple<string, string>>
                {
                    new Tuple<string, string> ( "EHRDoctors", "nhin.medibridge.net" )
                };

            SelectedDirectory = Directories.First ();
        }
Exemplo n.º 42
0
        public PayorTypeListViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            IUserDialogService userDialogService,
            IPopupService popupService,
            ICommandFactory commandFactory )
            : base(accessControlManager, commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService = userDialogService;
            _popupService = popupService;

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

            ShowPayorTypeAddCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowPayorTypeAddCommand, ExecuteShowPayorTypeAddCommand );
            ShowPayorTypeEditCommand = commandFactoryHelper.BuildDelegateCommand<PayorTypeDto> (
                () => ShowPayorTypeEditCommand, ExecuteShowPayorTypeEditCommand );
        }
Exemplo n.º 43
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SelfPaymentViewModel"/> 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>
        public SelfPaymentViewModel(
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IUserDialogService userDialogService,
            IPopupService popupService)
            : base(accessControlManager, commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService = userDialogService;
            _popupService = popupService;

            PageSize = 50;

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

            AddSelfPaymentCommand = commandFactoryHelper.BuildDelegateCommand ( () => AddSelfPaymentCommand, ExecuteAddSelfPaymentCommand );
            DeleteSelfPaymentCommand = commandFactoryHelper.BuildDelegateCommand<SelfPaymentDto> ( () => DeleteSelfPaymentCommand, ExecuteDeleteSelfPaymentCommand );
        }
Exemplo n.º 44
0
        /// <summary>
        /// Initializes a new instance of the <see cref="EditPayorCoverageViewModel"/> 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>
        public EditPayorCoverageViewModel(
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IUserDialogService userDialogService,
            IPopupService popupService )
            : base(accessControlManager, commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService = userDialogService;
            _popupService = popupService;

            CreateCommand = NavigationCommandManager.BuildCommand ( () => CreateCommand, OnNavigateToCreateCommand );
            EditCommand = NavigationCommandManager.BuildCommand ( () => EditCommand, OnNavigateToEditCommand );

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

            SaveCommand = commandFactoryHelper.BuildDelegateCommand(() => SaveCommand, ExecuteSaveCommand);

            _ruleExecutor = new NotifyPropertyChangedRuleExecutor<EditPayorCoverageViewModel, IDataTransferObject>();
        }
Exemplo n.º 45
0
        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 );
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="PatientHistoryDocumentViewModel"/> class.
        /// </summary>
        /// <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>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        public PatientHistoryDocumentViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IUserDialogService userDialogService,
            IPopupService popupService,
            INavigationService navigationService,
            IEventAggregator eventAggregator,
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory )
            : base(accessControlManager, commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService = userDialogService;
            _popupService = popupService;
            _navigationService = navigationService;
            _eventAggregator = eventAggregator;

            _eventAggregator.GetEvent<PatientDocumentUploadedEvent> ().Subscribe (
                PatientDocumentUploadedEventHandler,
                ThreadOption.BackgroundThread,
                false,
                PatientDocumentUploadedEvents );
            IsOtherTypeReadOnly = true;

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

            OpenDocumentCommand = commandFactoryHelper.BuildDelegateCommand<PatientDocumentDto> (
                () => OpenDocumentCommand, ExecuteOpenDocumentCommand );
            OpenEncryptedDocumentCommand = commandFactoryHelper.BuildDelegateCommand<PatientDocumentDto> (
                () => OpenEncryptedDocumentCommand, ExecuteOpenEncryptedDocumentCommand );

            SaveNewDocumentCommand = commandFactoryHelper.BuildDelegateCommand<PatientDocumentDto>(
                () => SaveNewDocumentCommand, ExecuteSaveNewDocument);
            CancelNewDocumentCommand = commandFactoryHelper.BuildDelegateCommand<PatientDocumentDto>(
                () => CancelNewDocumentCommand, ExecuteCancelNewDocument);

            UpdateDocumentCommand = commandFactoryHelper.BuildDelegateCommand<PatientDocumentDto> (
                () => UpdateDocumentCommand, ExecuteUpdateDocument );
            DeleteDocumentCommand = commandFactoryHelper.BuildDelegateCommand<PatientDocumentDto> (
                () => DeleteDocumentCommand, ExecuteDeleteDocumentCommand, CanExecuteDeleteDocumentCommand );

            DocumentTypeChangedCommand = commandFactoryHelper.BuildDelegateCommand<LookupValueDto> (
                () => DocumentTypeChangedCommand, ExecuteDocumentTypeChangedCommand );
            ClinicalStartDateChangedCommand = commandFactoryHelper.BuildDelegateCommand<object> (
                () => ClinicalStartDateChangedCommand, ExecuteClinicalStartDateChangedCommand );

            ImportC32DocumentCommand = commandFactoryHelper.BuildDelegateCommand<PatientDocumentDto>(
               () => ImportC32DocumentCommand, ExecuteImportC32DocumentCommand, CanExecuteImportC32DocumnetCommand);
        }
Exemplo n.º 47
0
        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 );
        }
Exemplo n.º 48
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 );
        }
Exemplo n.º 49
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateBillingOfficeViewModel"/> class.
        /// </summary>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        /// <param name="currentUserContextService">The current user context service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="navigationService">The navigation service.</param>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="popupService">The popup service.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        public CreateBillingOfficeViewModel(
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            ICurrentUserContextService currentUserContextService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            INavigationService navigationService,
            IUserDialogService userDialogService,
            IPopupService popupService,
            IEventAggregator eventAggregator )
            : base(accessControlManager, commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _navigationService = navigationService;
            _userDialogService = userDialogService;
            _popupService = popupService;
            _eventAggregator = eventAggregator;
            currentUserContextService.RegisterForContext ( ( u, b ) => { _currentStaff = u.Staff; } );

            var commandFactoryHelper = CreateCommandFactoryHelper ( commandFactory );
            CreateCommand = commandFactoryHelper.BuildDelegateCommand ( () => CreateCommand, ExecuteCreateCommand );
        }
Exemplo n.º 50
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 );
        }
        public ClinicianScheduleTileViewModel (
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IUserDialogService userDialogService,
            IEventAggregator eventAggregator,
            IAccessControlManager accessControlManager,
            INotificationService notificationService,
            INavigationService navigationService,
            ICommandFactory commandFactory,
            IPopupService popupService)
            : base ( accessControlManager, commandFactory )
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _notificationService = notificationService;
            _navigationService = navigationService;
            _popupService = popupService;
            _userDialogService = userDialogService;
            _eventAggregator = eventAggregator;

            _eventAggregator.GetEvent<AppointmentCreatedEvent> ().Subscribe (
                AppointmentCreatedEventHandler,
                ThreadOption.BackgroundThread,
                false,
                FilterAppointmentCreatedEvents );

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

            _eventAggregator.GetEvent<AppointmentUpdatedEvent> ().Subscribe (
                AppointmentUpdatedEventHandler,
                ThreadOption.BackgroundThread,
                false,
                FilterAppointmentUpdatedEvents );

            _eventAggregator.GetEvent<PatientChangedEvent> ().Subscribe (
                FilterPatientChangedEventHandler,
                ThreadOption.BackgroundThread,
                false,
                FilterPatientChangedEvents );

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

            StatusUpdatedCommand = commandFactoryHelper.BuildDelegateCommand<ClinicianAppointmentDto> (
                () => StatusUpdatedCommand, ExecuteStatusUpdatedCommand );
            AppointmentUpdatedCommand = commandFactoryHelper.BuildDelegateCommand<ClinicianAppointmentDto> (
                () => AppointmentUpdatedCommand,
                ExecuteAppointmentUpdatedCommand,
                CanExecuteAppointmentUpdatedCommand );
            ShowAppointmentDetailsCommand =
                commandFactoryHelper.BuildDelegateCommand<ClinicianAppointmentDto> (
                    () => ShowAppointmentDetailsCommand, ExecuteDoubleClickAppointmentCommand, CanExecuteDoubleClickAppointmentCommand );
            RangeUpdatedCommand = commandFactoryHelper.BuildDelegateCommand<DateRange> (
                () => RangeUpdatedCommand,
                ExecuteRangeUpdatedCommand,
                CanExecuteRangeUpdatedCommand );
            AppointmentAddedCommand = commandFactoryHelper.BuildDelegateCommand<ClinicianAppointmentDto> (
                () => AppointmentAddedCommand, ExecuteAppointmentAddedCommand, CanExecuteAppointmentAddedCommand );
            AppointmentDeletedCommand = commandFactoryHelper.BuildDelegateCommand<ClinicianAppointmentDto> (
                () => AppointmentDeletedCommand, ExecuteAppointmentDeletedCommand, CanExecuteAppointmentDeletedCommand );
            ShowAlertDetailsCommand = commandFactoryHelper.BuildDelegateCommand<PatientAlertDto> (
                () => ShowAlertDetailsCommand, ExecuteShowAlertDetailsCommand );
            GoToPatientDashboardCommand = commandFactoryHelper.BuildDelegateCommand<ClinicianAppointmentDto> (
                () => GoToPatientDashboardCommand, ExecuteGoToPatientDashboardCommand );
            GoToPatientProfileCommand = commandFactoryHelper.BuildDelegateCommand<ClinicianAppointmentDto> (
                () => GoToPatientProfileCommand, ExecuteGoToPatientProfileCommand);
            GoToPaymentCommand = commandFactoryHelper.BuildDelegateCommand<ClinicianAppointmentDto> (
                () => GoToPaymentCommand, ExecuteGoToPaymentCommand );

            ClinicianSchedule = new ClinicianScheduleDto ();

            _eventAggregator.GetEvent<FrontDeskDashboardDateChangedEvent> ().Subscribe (
                OnFrontDeskDashboardDateChanged, ThreadOption.PublisherThread, false, FilterFrontDeskDashboardDateChanged );
        }
Exemplo n.º 52
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VisitViewModel"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="cdsAlertService">The CDS alert service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="patientAccessService">The patient access service.</param>
        /// <param name="activityTypeToViewMapperService">The activity type to view mapper service.</param>
        /// <param name="navigationService">The navigation service.</param>
        /// <param name="commandFactory">The command factory.</param>
        /// <param name="popupService">The popup service.</param>
        public VisitViewModel(
            IUserDialogService userDialogService,
            IEventAggregator eventAggregator,
            ICdsAlertService cdsAlertService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            IPatientAccessService patientAccessService,
            IActivityTypeToViewMapperService activityTypeToViewMapperService,
            INavigationService navigationService,
            ICommandFactory commandFactory,
            IPopupService popupService )
            : base(accessControlManager, commandFactory)
        {
            _userDialogService = userDialogService;
            _eventAggregator = eventAggregator;
            _cdsAlertService = cdsAlertService;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _patientAccessService = patientAccessService;
            _activityTypeToViewMapperService = activityTypeToViewMapperService;
            _navigationService = navigationService;
            _popupService = popupService;

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

            SelectAddActivityCommand = commandFactoryHelper.BuildDelegateCommand<object> ( () => SelectAddActivityCommand, ExecuteSelectAddActivity );
            SaveVisitCommand = commandFactoryHelper.BuildDelegateCommand<object> ( () => SaveVisitCommand, ExecuteSaveVisit );
            DetachProblemCommand = commandFactoryHelper.BuildDelegateCommand<ProblemDto> ( () => DetachProblemCommand, ExecuteDetachProblem );
            StatusUpdatedCommand = commandFactoryHelper.BuildDelegateCommand<LookupValueDto> (
                () => StatusUpdatedCommand, ExecuteStatusUpdatedCommand, CanExecuteStatusUpdatedCommand );
            DropQueryCommand = commandFactoryHelper.BuildDelegateCommand<DragDropQueryEventArgs> ( () => DropQueryCommand, ExecuteDropQueryCommand );
            ShowGrowthChartCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowGrowthChartCommand, ExecuteShowGrowthChartCommand );
            CloseViewCommand = commandFactoryHelper.BuildDelegateCommand ( () => CloseViewCommand, ExecuteCloseViewCommand );

            ProblemList = new ObservableCollection<ProblemDto> ();

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

            _eventAggregator.GetEvent<ClinicalCaseChangedEvent> ().Subscribe (
                ClinicalCaseChangedEventHandler,
                ThreadOption.BackgroundThread,
                false,
                FilterClinicalCaseChangedEvents );

            _eventAggregator.GetEvent<ActivityChangedEvent> ().Subscribe (
                ActivityChangedEventHandler,
                ThreadOption.BackgroundThread,
                false,
                FilterActivityChangedEvents );
        }
Exemplo n.º 53
0
        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 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 );
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="EditTaskAndTaskGroupViewModel"/> 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="popupService">The popup service.</param>
        /// <param name="commandFactory">The command factory.</param>
        public EditTaskAndTaskGroupViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            IPopupService popupService,
            ICommandFactory commandFactory )
            : base(accessControlManager, commandFactory)
        {
            _userDialogService = userDialogService;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _popupService = popupService;

            _permissionCollectionView = new PagedCollectionView ( new List<SystemPermissionDto> () );
            _taskCollectionView = new PagedCollectionView ( new List<SystemRoleDto> () );
            _taskGroupCollectionView = new PagedCollectionView ( new List<SystemRoleDto> () );

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

            CloseCommand = commandFactoryHelper.BuildDelegateCommand ( () => CloseCommand, ExecuteCloseCommand );

            RoleWorkingModeChangedCommand = commandFactoryHelper.BuildDelegateCommand<object> (
                () => RoleWorkingModeChangedCommand, ExecuteRoleWorkingModeChangedCommand );
            PermissionToBeRemovedCheckedCommand = commandFactoryHelper.BuildDelegateCommand<object> (
                () => PermissionToBeRemovedCheckedCommand, ExecutePermissionToBeRemovedCheckedCommand );
            PermissionToBeAddedCheckedCommand = commandFactoryHelper.BuildDelegateCommand<object> (
                () => PermissionToBeAddedCheckedCommand, ExecutePermissionToBeAddedCheckedCommand );
            TaskToBeRemovedCheckedCommand = commandFactoryHelper.BuildDelegateCommand<object> (
                () => TaskToBeRemovedCheckedCommand, ExecuteTaskToBeRemovedCheckedCommand );
            TaskToBeAddedCheckedCommand = commandFactoryHelper.BuildDelegateCommand<object> (
                () => TaskToBeAddedCheckedCommand, ExecuteTaskToBeAddedCheckedCommand );

            AddToTaskCommand = commandFactoryHelper.BuildDelegateCommand (
                () => AddToTaskCommand, ExecuteAddToTaskCommand, CanExecuteAddToTaskCommand );
            CreateNewTaskCommand = commandFactoryHelper.BuildDelegateCommand (
                () => CreateNewTaskCommand, ExecuteCreateNewTaskCommand, CanExecuteCreateNewTaskCommand );
            RenameTaskCommand = commandFactoryHelper.BuildDelegateCommand (
                () => RenameTaskCommand, ExecuteRenameTaskCommand, CanExecuteRenameTaskCommand );
            SaveTaskNameCommand = commandFactoryHelper.BuildDelegateCommand<object> ( () => SaveTaskNameCommand, ExecuteSaveTaskNameCommand );
            CancelSaveTaskNameCommand = commandFactoryHelper.BuildDelegateCommand<object> (
                () => CancelSaveTaskNameCommand, ExecuteCancelSaveTaskNameCommand );
            RemoveFromTaskCommand = commandFactoryHelper.BuildDelegateCommand (
                () => RemoveFromTaskCommand, ExecuteRemoveFromTaskCommand, CanExecuteRemoveFromTaskCommand );

            AddToTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand (
                () => AddToTaskGroupCommand, ExecuteAddToTaskGroupCommand, CanExecuteAddToTaskGroupCommand );
            CreateNewTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand (
                () => CreateNewTaskGroupCommand, ExecuteCreateNewTaskGroupCommand, CanExecuteCreateNewTaskGroupCommand );
            RenameTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand (
                () => RenameTaskGroupCommand, ExecuteRenameTaskGroupCommand, CanExecuteRenameTaskGroupCommand );
            SaveTaskGroupNameCommand = commandFactoryHelper.BuildDelegateCommand<object> (
                () => SaveTaskGroupNameCommand, ExecuteSaveTaskGroupNameCommand );
            CancelSaveTaskGroupNameCommand = commandFactoryHelper.BuildDelegateCommand<object> (
                () => CancelSaveTaskGroupNameCommand, ExecuteCancelSaveTaskGroupNameCommand );
            RemoveFromTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand (
                () => RemoveFromTaskGroupCommand, ExecuteRemoveFromTaskGroupCommand, CanExecuteRemoveFromTaskGroupCommand );

            CreateTaskCommand = NavigationCommandManager.BuildCommand ( () => CreateTaskCommand, NavigateToCreateTaskCommand );
            CreateTaskGroupCommand = NavigationCommandManager.BuildCommand ( () => CreateTaskGroupCommand, NavigateToCreateTaskGroupCommand );
            EditCommand = NavigationCommandManager.BuildCommand ( () => EditCommand, NavigateToEditCommand );
            CloneCommand = NavigationCommandManager.BuildCommand ( () => CloneCommand, NavigateToCloneCommand );
        }
Exemplo n.º 56
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AddSelfPaymentViewModel"/> class.
        /// </summary>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        /// <param name="currentUserContextService">The current user context service.</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>
        public AddSelfPaymentViewModel(
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            ICurrentUserContextService currentUserContextService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IUserDialogService userDialogService,
            IPopupService popupService )
            : base(accessControlManager, commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService = userDialogService;
            _popupService = popupService;
            currentUserContextService.RegisterForContext((cuc, b) => _currentStaffKey = cuc.Staff.Key);

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

            SaveCommand = commandFactoryHelper.BuildDelegateCommand(
                () => SaveCommand, () => SelfPayment, ExecuteSaveCommand);

            _ruleExecutor = new NotifyPropertyChangedRuleExecutor<AddSelfPaymentViewModel, IDataTransferObject>();
        }
        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 );
        }
Exemplo n.º 58
0
        public VisitListViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IUserDialogService userDialogService,
            IEventAggregator eventAggregator,
            IAccessControlManager accessControlManager,
            INavigationService navigationService,
            ICommandFactory commandFactory,
            IActivityTypeToViewMapperService activityTypeToViewMapper,
            IPopupService popupService )
            : base(accessControlManager, commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService = userDialogService;
            _eventAggregator = eventAggregator;
            _navigationService = navigationService;
            _activityTypeToViewMapper = activityTypeToViewMapper;
            _popupService = popupService;

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

            GoToVisitCommand = commandFactoryHelper.BuildDelegateCommand<object> ( () => GoToVisitCommand, ExecuteGoToVisitCommand );
            GoToActivityCommand = commandFactoryHelper.BuildDelegateCommand<VisitActivityDto> (
                () => GoToActivityCommand, ExecuteGoToActivityCommand );
            RecentVisitCountChangedCommand = commandFactoryHelper.BuildDelegateCommand (
                () => RecentVisitCountChangedCommand, ExecuteRecentVisitCountChangedCommand );
            ScheduledVisitCountChangedCommand = commandFactoryHelper.BuildDelegateCommand (
                () => ScheduledVisitCountChangedCommand, ExecuteScheduledVisitCountChangedCommand );

            _eventAggregator.GetEvent<ClinicalCaseChangedEvent> ().Subscribe (
                ClinicalCaseChangedEventHandler,
                ThreadOption.BackgroundThread,
                false,
                FilterClinicalCaseChangedEvents );

            _eventAggregator.GetEvent<ActivityChangedEvent> ().Subscribe (
                ActivityChangedEventHandler,
                ThreadOption.BackgroundThread,
                false,
                FilterActivityChangedEvents );

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

            RecentVisitCount = ScheduledVisitCount = _lastRecentVisitCount = _lastScheduledVisitCount = 2;
        }
Exemplo n.º 59
0
        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 );
        }
Exemplo n.º 60
0
        public ImportC32ViewModel(
            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 );

            ImportC32Command = commandFactoryHelper.BuildDelegateCommand ( () => ImportC32Command, ExecuteImportC32Command, CanExecuteImportC32Command );
            CancelCommand = commandFactoryHelper.BuildDelegateCommand ( () => CancelCommand, ExecuteCancelCommand );
            SelectionChangedCommand = commandFactoryHelper.BuildDelegateCommand ( () => SelectionChangedCommand, ExecuteSelectionChangedCommand );
        }