コード例 #1
0
        public MechanicalNavigationViewModel(SearchFilterControl searchFilterControl)
        {
            CompositionInitializer.SatisfyImports(this);

            mSearchFilterControl = searchFilterControl;

            mGridRefreshTimer.Interval = TimeSpan.FromMilliseconds(500);
            mGridRefreshTimer.Tick += (sender, eventArgs) => { mGridRefreshTimer.Stop(); ProcessSearchFilter(); };

            ImportNewMechanicalsCommand = new DelegateCommand<object>(ImportNewMechanicalsHandler, CanImport);
            ImportNewMechanicalComponentsCommand = new DelegateCommand<object>(ImportNewMechanicalComponentsHandler, CanImport);

            ImportNewRelatedDocumentsCommand = new DelegateCommand<object>(ImportNewRelatedDocumentsHandler, CanImport);
            ImportExistingMechanicalsCommand = new DelegateCommand<object>(ImportExistingMechanicalsHandler, CanImport);
            ImportExistingMechanicalComponentsCommand = new DelegateCommand<object>(ImportExistingMechanicalComponentsHanlder, CanImport);

            CreateAttachmentsCommand = new DelegateCommand<object>(CreateAttachmentsHandler, CanImport);
            PreferredEquipmentCommand = new DelegateCommand<object>(PreferredEquipmentHandler, x => (CMS.EffectivePrivileges.AdminTab.CanView || CMS.EffectivePrivileges.MechanicalTab.CanView));

            ClearFilterCommand = new DelegateCommand<object>(x => { ClearControls(); ProcessSearchFilter(); searchFilterControl.SetFilterIsOn(false); }, x => true);
            SearchCommand = new DelegateCommand<object>(x => ProcessSearchFilter(), x => true);
            KeywordKeyCommand = new DelegateCommand<object>(x => ProcessSearchFilter(), x => true);
            MaintSysIdKeyCommand = new DelegateCommand<object>(x => ProcessSearchFilter(), x => true);

            LoadData();
        }
コード例 #2
0
        public DocumentNavigationViewModel(SearchFilterControl searchFilterControl)
        {
            mSearchFilterControl = searchFilterControl;

            mGridRefreshTimer.Interval = TimeSpan.FromMilliseconds(500);
            mGridRefreshTimer.Tick += (sender, eventArgs) => { mGridRefreshTimer.Stop(); ProcessSearchFilter(); };

            ImportNewDocumentsLink = new DelegateCommand<object>(ImportNewDocumentsHandler, CanUserImport);
            ImportNewDocumentVersionsLink = new DelegateCommand<object>(ImportNewDocumentVersionsHandler, CanUserImport);
            ImportDocumentEquipmentsLink = new DelegateCommand<object>(ImportDocumentEquipmentsHandler, CanUserImport);
            ImportDocumentLocationsLink = new DelegateCommand<object>(ImportNewDocumentLocationsHandler, CanUserImport);

            UpdateDocumentsLink = new DelegateCommand<object>(UpdateDocumentsHandler, CanUserImport);
            UpdateDocumentVersionsLink = new DelegateCommand<object>(UpdateDocumentVersionsHandler, CanUserImport);
            CreateAttachmentsLink = new DelegateCommand<object>(CreateAttachmentsHandler, CanUserImport);
            ImportNewRelatedDocumentsCommand = new DelegateCommand<object>(ImportNewRelatedDocumentsHandler, CanUserImport);

            ClearFilterCommand = new DelegateCommand<object>(x => { ClearControls(); ProcessSearchFilter(); searchFilterControl.SetFilterIsOn(false); }, x => true);
            SearchCommand = new DelegateCommand<object>(x => ProcessSearchFilter(), x => true);
            KeywordKeyCommand = new DelegateCommand<object>(x => ProcessSearchFilter(), x => true);

            DescriptionChecked = true;
            StartLoad();
        }