Example #1
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 #2
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);
        }
Example #3
0
        public EditMedicationViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IUserDialogService userDialogService,
            IEventAggregator eventAggregator,
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory)
            : base(accessControlManager, commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService             = userDialogService;
            _eventAggregator = eventAggregator;

            Wrapper = new EditableDtoWrapper();

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

            SaveCommand = commandFactoryHelper.BuildDelegateCommand(() => SaveCommand, ExecuteSaveCommand);
        }
Example #4
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);
        }
Example #5
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);
        }
Example #6
0
        public AppointmentDetailsViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IEventAggregator eventAggregator,
            IAccessControlManager accessControlManager,
            INavigationService navigationService,
            ICommandFactory commandFactory,
            IPopupService popupService)
            : base(userDialogService, asyncRequestDispatcherFactory, accessControlManager, commandFactory)
        {
            _userDialogService             = userDialogService;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _eventAggregator   = eventAggregator;
            _navigationService = navigationService;
            _popupService      = popupService;

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

            ViewProfileCommand   = commandFactoryHelper.BuildDelegateCommand(() => ViewProfileCommand, ExecuteViewProfileCommand);
            StatusChangedCommand = commandFactoryHelper.BuildDelegateCommand <LookupValueDto> (
                () => StatusChangedCommand, ExecuteStatusChangedCommand);

            _eventAggregator.GetEvent <VisitChangedEvent> ().Subscribe(
                VisitChangedEventHandler,
                ThreadOption.PublisherThread,
                true,
                FilterVisitChangedEvents);

            _eventAggregator.GetEvent <PatientChangedEvent> ().Subscribe(
                PatientChangedEventHandler,
                ThreadOption.PublisherThread,
                false,
                FilterPatientChangedEvents);

            CreateAppointmentCommand = NavigationCommandManager.BuildCommand(() => CreateAppointmentCommand, NavigateToCreateAppointmentCommand);
            EditCommand = NavigationCommandManager.BuildCommand(() => EditCommand, NavigateToEditCommand);

            EditingWrapper = new EditableDtoWrapper();
        }