Exemple #1
0
        private void ExecuteShowAll()
        {
            if (_showOption != MedicationListViewModel.ShowOption.ShowAll)
            {
                _showOption = MedicationListViewModel.ShowOption.ShowAll;

                PagedCollectionViewWrapper.SetFilter(_filter);
            }
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ClinicianMedicationOrdersTileViewModel"/> class.
        /// </summary>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        public ClinicianMedicationOrdersTileViewModel(IAccessControlManager accessControlManager, ICommandFactory commandFactory)
            : base(accessControlManager, commandFactory)
        {
            _pagedCollectionViewWrapper = new PagedCollectionViewWrapper <MedicationDto> ();

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

            _showAllCommand        = commandFactoryHelper.BuildDelegateCommand(() => ShowAllCommand, ExecuteShowAll);
            _showActiveOnlyCommand = commandFactoryHelper.BuildDelegateCommand(() => ShowActiveOnlyCommand, ExecuteShowActiveOnly);

            _showOption = MedicationListViewModel.ShowOption.ShowAll;
            _filter     = FilterByActiveStatus;

            InitializeGroupingDescriptions();

            //TODO: this needs to be removed and real data needs to be loaded.
            InitTempData();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ClinicianMedicationOrdersTileViewModel"/> class.
        /// </summary>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        public ClinicianMedicationOrdersTileViewModel( IAccessControlManager accessControlManager, ICommandFactory commandFactory )
            : base(accessControlManager, commandFactory)
        {
            _pagedCollectionViewWrapper = new PagedCollectionViewWrapper<MedicationDto> ();

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

            _showAllCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowAllCommand, ExecuteShowAll );
            _showActiveOnlyCommand = commandFactoryHelper.BuildDelegateCommand ( () => ShowActiveOnlyCommand, ExecuteShowActiveOnly );

            _showOption = MedicationListViewModel.ShowOption.ShowAll;
            _filter = FilterByActiveStatus;

            InitializeGroupingDescriptions ();

            //TODO: this needs to be removed and real data needs to be loaded.
            InitTempData ();
        }
        private void ExecuteShowAll()
        {
            if ( _showOption != MedicationListViewModel.ShowOption.ShowAll )
            {
                _showOption = MedicationListViewModel.ShowOption.ShowAll;

                PagedCollectionViewWrapper.SetFilter ( _filter );
            }
        }