Пример #1
0
        public void RefreshUIFromDatabase(object oRefreshFrom)
        {
            if (tlvCatalogues.ModelFilter is CatalogueCollectionFilter f)
            {
                f.ChildProvider = Activator.CoreChildProvider;
            }

            //if there are new catalogues we don't already have in our tree
            if (_allCatalogues != null)
            {
                var newCatalogues = CommonTreeFunctionality.CoreChildProvider.AllCatalogues.Except(_allCatalogues);
                if (newCatalogues.Any())
                {
                    oRefreshFrom = CatalogueFolder.Root;//refresh from the root instead
                    tlvCatalogues.RefreshObject(oRefreshFrom);
                }
            }

            _allCatalogues = CommonTreeFunctionality.CoreChildProvider.AllCatalogues;

            if (isFirstTime)
            {
                CommonFunctionality.Add(new ExecuteCommandCreateNewCatalogueByImportingFile(Activator), GlobalStrings.FromFile, null, "New...");
                CommonFunctionality.Add(new ExecuteCommandCreateNewCatalogueByImportingExistingDataTable(Activator), GlobalStrings.FromDatabase, null, "New...");
            }

            if (isFirstTime || Equals(oRefreshFrom, CatalogueFolder.Root))
            {
                tlvCatalogues.RefreshObject(CatalogueFolder.Root);
                tlvCatalogues.Expand(CatalogueFolder.Root);
                isFirstTime = false;
            }
        }
 /// <summary>
 /// Adds the all <see cref="IAtomicCommand"/> specified by <see cref="IActivateItems.PluginUserInterfaces"/> for the current control.  Commands
 /// will appear in the menu bar at the top of the control
 /// </summary>
 protected void AddPluginCommands()
 {
     foreach (IAtomicCommand cmd in GetPluginCommands())
     {
         CommonFunctionality.Add(cmd);
     }
 }
Пример #3
0
        public override void SetDatabaseObject(IActivateItems activator, Catalogue databaseObject)
        {
            base.SetDatabaseObject(activator, databaseObject);
            timePeriodicityChart1.SetItemActivator(activator);

            //clear old DQE graphs
            ClearDQEGraphs();

            DQERepository dqeRepository = null;

            try
            {
                //try to get the dqe server
                dqeRepository = new DQERepository(databaseObject.CatalogueRepository);
            }
            catch (Exception)
            {
                //there is no dqe server, ah well nevermind
            }

            //dqe server did exist!
            if (dqeRepository != null)
            {
                //get evaluations for the catalogue
                Evaluation[] evaluations = dqeRepository.GetAllEvaluationsFor(databaseObject).ToArray();

                //there have been some evaluations
                evaluationTrackBar1.Evaluations = evaluations;
            }

            CommonFunctionality.Add(new ExecuteCommandConfigureCatalogueValidationRules(activator).SetTarget(databaseObject));
            CommonFunctionality.Add(new ExecuteCommandRunDQEOnCatalogue(activator, databaseObject), "Run Data Quality Engine...");
        }
Пример #4
0
        private void SetupRibbon()
        {
            if (_ribbonInitialized)
            {
                return;
            }

            _ribbonInitialized = true;

            foreach (var o in GetRibbonObjects())
            {
                if (o is string)
                {
                    CommonFunctionality.Add((string)o);
                }
                else if (o is DatabaseEntity)
                {
                    CommonFunctionality.AddToMenu(new ExecuteCommandShow(Activator, (DatabaseEntity)o, 0, true));
                }
                else
                {
                    throw new NotSupportedException(
                              "GetRibbonObjects can only return strings or DatabaseEntity objects, object '" + o +
                              "' is not valid because it is a '" + o.GetType().Name + "'");
                }
            }
        }
Пример #5
0
        public void SetCollection(IActivateItems activator, IPersistableObjectCollection collection)
        {
            SetItemActivator(activator);

            Collection = (SessionCollection)collection;

            if (!CommonTreeFunctionality.IsSetup)
            {
                CommonTreeFunctionality.SetUp(RDMPCollection.None, olvTree, activator, olvName, olvName, new RDMPCollectionCommonFunctionalitySettings()
                {
                    // add custom options here
                });
            }

            RefreshSessionObjects();

            CommonFunctionality.ClearToolStrip();
            CommonFunctionality.Add(new ToolStripButton("Add...", null, AddObjectToSession));
            CommonFunctionality.Add(new ToolStripButton("Remove...", null, RemoveObjectsFromSession));

            if (_firstTime)
            {
                CommonTreeFunctionality.SetupColumnTracking(olvName, new Guid("a6abe085-f5cc-4ce0-85ef-0d42e7dbfced"));
                _firstTime = false;
            }
        }
Пример #6
0
        public void SetCollection(IActivateItems activator, IPersistableObjectCollection collection)
        {
            _bLoading = true;
            SetItemActivator(activator);

            _collection = (GoodBadCataloguePieChartObjectCollection)collection;

            if (firstTime)
            {
                SetupFlags();
            }

            btnAllCatalogues.Checked   = !_collection.IsSingleCatalogueMode;
            btnSingleCatalogue.Checked = _collection.IsSingleCatalogueMode;
            btnShowLabels.Checked      = _collection.ShowLabels;

            CommonFunctionality.Add(btnAllCatalogues);
            CommonFunctionality.Add(toolStripLabel1);
            CommonFunctionality.Add(btnAllCatalogues);
            CommonFunctionality.Add(btnSingleCatalogue);
            CommonFunctionality.Add(btnShowLabels);
            CommonFunctionality.Add(btnRefresh);

            foreach (var mi in _flagOptions)
            {
                CommonFunctionality.AddToMenu(mi);
            }

            GenerateChart();
            _bLoading = false;
        }
Пример #7
0
        public override void SetDatabaseObject(IActivateItems activator, LoadMetadata databaseObject)
        {
            base.SetDatabaseObject(activator, databaseObject);

            if (!_collectionCommonFunctionality.IsSetup)
            {
                _collectionCommonFunctionality.SetUp(RDMPCollection.None, tlvLoadedTables, activator, null, null, new RDMPCollectionCommonFunctionalitySettings()
                {
                    AddFavouriteColumn    = false,
                    AddIDColumn           = false,
                    AllowPinning          = false,
                    SuppressChildrenAdder = true,
                    SuppressActivate      = true,
                    AddCheckColumn        = false
                });
            }

            if (_dragDropProvider == null)
            {
                _dragDropProvider = new DragDropProvider(new RDMPCommandFactory(), new RDMPCommandExecutionFactory(Activator), tlvLoadedTables);
            }

            _loadMetadata = databaseObject;
            RefreshUIFromDatabase();

            CommonFunctionality.Add(_btnFetchData);
        }
Пример #8
0
        public void SetCollection(IActivateItems activator, IPersistableObjectCollection collection)
        {
            _activator  = activator;
            _collection = (DatasetRacewayObjectCollection)collection;

            SetItemActivator(activator);

            btnAddCatalogue.Image = _activator.CoreIconProvider.GetImage(RDMPConcept.Catalogue, OverlayKind.Import);
            btnAddExtractableDatasetPackage.Image = _activator.CoreIconProvider.GetImage(RDMPConcept.ExtractableDataSetPackage, OverlayKind.Import);

            ddShowPeriod.ComboBox.SelectedItem = _collection.ShowPeriod;
            cbIgnoreRowCounts.Checked          = _collection.IgnoreRows;
            UpdateIgnoreRowCountCheckBoxIconAndText();

            if (isFirstTime)
            {
                isFirstTime = false;
                racewayRenderArea.RequestDeletion += (c) =>
                {
                    _collection.RemoveCatalogue(c);
                    SaveCollectionChanges();
                };
                racewayRenderArea.NotifyEditModeChange(_isEditmodeOn);
            }

            CommonFunctionality.Add(btnAddCatalogue);
            CommonFunctionality.Add(btnAddExtractableDatasetPackage);
            CommonFunctionality.Add(btnRemoveAll);
            CommonFunctionality.Add(toolStripLabel1);
            CommonFunctionality.Add(ddShowPeriod);
            CommonFunctionality.Add(cbIgnoreRowCounts);

            GenerateChart();
        }
Пример #9
0
        protected void BuildMenu(IActivateItems activator)
        {
            if (!menuInitialized)
            {
                menuInitialized = true;

                if (DatabaseObject != null)
                {
                    CommonFunctionality.AddToMenu(new ExecuteCommandActivate(activator, DatabaseObject));
                }

                CommonFunctionality.AddToMenu(new ToolStripSeparator());

                CommonFunctionality.AddToMenu(miSaveImages);
                CommonFunctionality.AddToMenu(miCopyToClipboard);
                CommonFunctionality.AddToMenu(btnCache);

                CommonFunctionality.Add(btnResendQuery);

                foreach (var c in _timeoutControls.GetControls())
                {
                    CommonFunctionality.Add(c);
                }
            }
        }
        public override void SetDatabaseObject(IActivateItems activator, CohortIdentificationConfiguration databaseObject)
        {
            base.SetDatabaseObject(activator, databaseObject);
            _configuration = databaseObject;

            RebuildClearCacheCommand();

            gbCicInfo.Text     = $"Name: {_configuration.Name}";
            tbDescription.Text = $"Description: {_configuration.Description}";
            ticket.TicketText  = _configuration.Ticket;

            if (_commonFunctionality == null)
            {
                activator.RefreshBus.Subscribe(this);
                _commonFunctionality = new RDMPCollectionCommonFunctionality();

                _commonFunctionality.SetUp(RDMPCollection.Cohort, tlvCic, activator, olvNameCol, olvNameCol, new RDMPCollectionCommonFunctionalitySettings
                {
                    SuppressActivate   = true,
                    AddFavouriteColumn = false,
                    AddCheckColumn     = false,
                    AllowPinning       = false,
                    AllowSorting       = true, //important, we need sorting on so that we can override sort order with our OrderableComparer
                });
                _commonFunctionality.MenuBuilt += MenuBuilt;
                tlvCic.AddObject(_configuration);
                tlvCic.ExpandAll();
            }

            CommonFunctionality.AddToMenu(cbIncludeCumulative);
            CommonFunctionality.AddToMenu(new ToolStripSeparator());
            CommonFunctionality.AddToMenu(new ExecuteCommandSetQueryCachingDatabase(Activator, _configuration));
            CommonFunctionality.AddToMenu(new ExecuteCommandClearQueryCache(Activator, _configuration));
            CommonFunctionality.AddToMenu(new ExecuteCommandCreateNewQueryCacheDatabase(activator, _configuration));
            CommonFunctionality.AddToMenu(
                new ExecuteCommandSet(activator, _configuration, _configuration.GetType().GetProperty("Description"))
            {
                OverrideIcon =
                    Activator.CoreIconProvider.GetImage(RDMPConcept.CohortIdentificationConfiguration, OverlayKind.Edit)
            });
            CommonFunctionality.AddToMenu(new ToolStripSeparator());
            CommonFunctionality.AddToMenu(new ExecuteCommandShowXmlDoc(activator, "CohortIdentificationConfiguration.QueryCachingServer_ID", "Query Caching"), "Help (What is Query Caching)");
            CommonFunctionality.Add(new ExecuteCommandCreateNewCohortByExecutingACohortIdentificationConfiguration(activator, null).SetTarget(_configuration),
                                    "Commit Cohort",
                                    activator.CoreIconProvider.GetImage(RDMPConcept.ExtractableCohort, OverlayKind.Add));

            foreach (var c in _timeoutControls.GetControls())
            {
                CommonFunctionality.Add(c);
            }

            _queryCachingServer = _configuration.QueryCachingServer;
            Compiler.CohortIdentificationConfiguration = _configuration;
            Compiler.CoreChildProvider = activator.CoreChildProvider;
            RecreateAllTasks();
        }
Пример #11
0
        public override void SetDatabaseObject(IActivateItems activator, SelectedDataSets databaseObject)
        {
            base.SetDatabaseObject(activator, databaseObject);
            _extractionConfiguration = databaseObject.ExtractionConfiguration;
            _extractableDataSet      = databaseObject.ExtractableDataSet;
            RegenerateCodeInQueryEditor();


            CommonFunctionality.Add(btnRun);
        }
Пример #12
0
        public void SetCollection(IActivateItems activator, IPersistableObjectCollection collection)
        {
            _collection = (IViewSQLAndResultsCollection)collection;

            CommonFunctionality.ClearToolStrip();

            btnExecuteSql.Image = activator.CoreIconProvider.GetImage(RDMPConcept.SQL, OverlayKind.Execute);

            var overlayer = new IconOverlayProvider();

            btnResetSql.Image = overlayer.GetOverlay(FamFamFamIcons.text_align_left, OverlayKind.Problem);

            if (_autoComplete == null)
            {
                _autoComplete = new AutoCompleteProviderFactory(activator).Create(_collection.GetQuerySyntaxHelper());

                _collection.AdjustAutocomplete(_autoComplete);

                _autoComplete.RegisterForEvents(_scintilla);
            }

            SetItemActivator(activator);

            CommonFunctionality.Add(btnExecuteSql);
            CommonFunctionality.Add(btnResetSql);

            foreach (var c in _timeoutControls.GetControls())
            {
                CommonFunctionality.Add(c);
            }

            foreach (DatabaseEntity d in _collection.GetToolStripObjects())
            {
                CommonFunctionality.AddToMenu(new ExecuteCommandShow(activator, d, 0, true));
            }

            CommonFunctionality.Add(new ToolStripSeparator());
            CommonFunctionality.Add(_serverHeader);

            try
            {
                var dap = _collection.GetDataAccessPoint();
                _serverHeader.Text  = $"Server: {dap.Server} Database: {dap.Database}";
                _serverHeader.Image = _databaseTypeIconProvider.GetImage(dap.DatabaseType);
            }
            catch (Exception)
            {
                _serverHeader.Text = "Server:Unknown";
            }


            RefreshUIFromDatabase();
        }
Пример #13
0
        public override void SetDatabaseObject(IActivateItems activator, Catalogue databaseObject)
        {
            base.SetDatabaseObject(activator, databaseObject);
            _catalogue = databaseObject;
            checkAndExecuteUI1.SetItemActivator(activator);

            CommonFunctionality.Add(new ExecuteCommandConfigureCatalogueValidationRules(Activator).SetTarget(_catalogue), "Validation Rules...");
            CommonFunctionality.Add(new ExecuteCommandViewDQEResultsForCatalogue(Activator)
            {
                OverrideCommandName = "View Results..."
            }.SetTarget(databaseObject));
        }
Пример #14
0
        public override void SetDatabaseObject(IActivateItems activator, ProcessTask databaseObject)
        {
            _processTask = databaseObject;
            base.SetDatabaseObject(activator, databaseObject);

            if (_argumentCollection == null)
            {
                var repo = databaseObject.CatalogueRepository;

                _argumentCollection = new ArgumentCollectionUI();

                var className = databaseObject.GetClassNameWhoArgumentsAreFor();

                if (string.IsNullOrWhiteSpace(className))
                {
                    activator.KillForm(ParentForm, new Exception("No class has been specified on ProcessTask '" + databaseObject + "'"));
                    return;
                }

                try
                {
                    _underlyingType = repo.MEF.GetType(className);

                    if (_underlyingType == null)
                    {
                        activator.KillForm(ParentForm, new Exception("Could not find Type '" + className + "' for ProcessTask '" + databaseObject + "'"));
                    }
                }
                catch (Exception e)
                {
                    activator.KillForm(ParentForm, new Exception("MEF crashed while trying to look up Type '" + className + "' for ProcessTask '" + databaseObject + "'", e));
                    return;
                }

                _argumentCollection.Setup(databaseObject, _underlyingType, Activator.RepositoryLocator.CatalogueRepository);

                _argumentCollection.Dock = DockStyle.Fill;
                pArguments.Controls.Add(_argumentCollection);
            }

            CommonFunctionality.Add(_ragSmiley);

            CheckComponent();

            loadStageIconUI1.Setup(Activator.CoreIconProvider, _processTask.LoadStage);

            CommonFunctionality.Add(new ToolStripButton("Check", FamFamFamIcons.arrow_refresh, (s, e) => CheckComponent()));
        }
Пример #15
0
        public ConfigureAndExecutePipelineUI(PipelineUseCase useCase, IActivateItems activator)
        {
            _useCase = useCase;

            InitializeComponent();

            //designer mode
            if (useCase == null && activator == null)
            {
                return;
            }

            SetItemActivator(activator);
            progressUI1.ApplyTheme(activator.Theme);

            pipelineDiagram1 = new PipelineDiagramUI();

            pipelineDiagram1.Dock = DockStyle.Fill;
            panel_pipelineDiagram1.Controls.Add(pipelineDiagram1);

            fork = new ForkDataLoadEventListener(progressUI1);

            var context = useCase.GetContext();

            if (context.GetFlowType() != typeof(DataTable))
            {
                throw new NotSupportedException("Only DataTable flow contexts can be used with this class");
            }

            foreach (var o in useCase.GetInitializationObjects())
            {
                var de = o as DatabaseEntity;
                if (o is DatabaseEntity)
                {
                    CommonFunctionality.Add(new ExecuteCommandShow(activator, de, 0, true));
                }
                else
                {
                    CommonFunctionality.Add(o.ToString());
                }

                _initializationObjects.Add(o);
            }

            SetPipelineOptions(activator.RepositoryLocator.CatalogueRepository);

            lblTask.Text = "Task:" + useCase.GetType().Name;
        }
        public override void SetDatabaseObject(IActivateItems activator, CohortIdentificationConfiguration databaseObject)
        {
            base.SetDatabaseObject(activator, databaseObject);

            if (btnUseCache == null)
            {
                btnUseCache = new ToolStripButton("Use Cache (if available)");
                btnUseCache.CheckOnClick    = true;
                btnUseCache.Checked         = databaseObject.QueryCachingServer_ID.HasValue;
                btnUseCache.CheckedChanged += (s, e) => GenerateQuery();
            }

            btnUseCache.Enabled = databaseObject.QueryCachingServer_ID.HasValue;
            CommonFunctionality.Add(btnUseCache);
            GenerateQuery();
        }
Пример #17
0
        public override void SetDatabaseObject(IActivateItems activator, CohortIdentificationConfiguration databaseObject)
        {
            _cic = databaseObject;

            base.SetDatabaseObject(activator, databaseObject);

            foreach (var c in _timeoutControls.GetControls())
            {
                CommonFunctionality.Add(c);
            }

            _queryCachingServer = _cic.QueryCachingServer;
            Compiler.CohortIdentificationConfiguration = _cic;
            CoreIconProvider = activator.CoreIconProvider;
            RecreateAllTasks();
        }
Пример #18
0
        public override void SetDatabaseObject(IActivateItems activator, ExtractionInformation databaseObject)
        {
            base.SetDatabaseObject(activator, databaseObject);

            Setup(databaseObject);

            ObjectSaverButton1.BeforeSave += objectSaverButton1OnBeforeSave;

            CommonFunctionality.Add(ragSmiley1);
            CommonFunctionality.AddToMenu(new ExecuteCommandActivate(activator, databaseObject.CatalogueItem), "Go To Description (CatalogueItem)");
            CommonFunctionality.AddToMenu(new ExecuteCommandShow(activator, databaseObject.ColumnInfo, 0, true));

            CommonFunctionality.AddHelp(cbHashOnDataRelease, "IColumn.HashOnDataRelease", "Hash on Data Release");
            CommonFunctionality.AddHelp(cbIsExtractionIdentifier, "IColumn.IsExtractionIdentifier", "Is Extraction Identifier");
            CommonFunctionality.AddHelp(cbIsPrimaryKey, "IColumn.IsPrimaryKey", "Is Primary Key");
        }
Пример #19
0
        public override void SetDatabaseObject(IActivateItems activator, LoadMetadata databaseObject)
        {
            base.SetDatabaseObject(activator, databaseObject);
            ragSmiley1.Reset();

            LoadMetadata = databaseObject;

            CommonFunctionality.Add(new ToolStripLabel("Filter:"));
            CommonFunctionality.Add(_tbFilterBox);
            CommonFunctionality.Add(_btnApplyFilter);

            CommonFunctionality.Add(new ToolStripSeparator());
            CommonFunctionality.Add(new ToolStripLabel("Fetch:"));
            CommonFunctionality.Add(_tbToFetch);
            CommonFunctionality.Add(_btnFetch);
        }
Пример #20
0
        public override void SetItemActivator(IActivateItems activator)
        {
            base.SetItemActivator(activator);

            //important to register the setup before the lifetime subscription so it gets priority on events
            CommonTreeFunctionality.SetUp(
                RDMPCollection.Cohort,
                tlvCohortIdentificationConfigurations,
                Activator,
                olvName, //column with the icon
                olvName  //column that can be renamed

                );
            CommonTreeFunctionality.AxeChildren = new Type[] { typeof(CohortIdentificationConfiguration) };

            var dataExportChildProvider = activator.CoreChildProvider as DataExportChildProvider;

            if (dataExportChildProvider == null)
            {
                CommonTreeFunctionality.MaintainRootObjects = new Type[] { typeof(CohortIdentificationConfiguration) };
                tlvCohortIdentificationConfigurations.AddObjects(Activator.CoreChildProvider.AllCohortIdentificationConfigurations);
            }
            else
            {
                CommonTreeFunctionality.MaintainRootObjects = new Type[] { typeof(AllProjectCohortIdentificationConfigurationsNode), typeof(AllFreeCohortIdentificationConfigurationsNode) };
                tlvCohortIdentificationConfigurations.AddObject(dataExportChildProvider.AllProjectCohortIdentificationConfigurationsNode);
                tlvCohortIdentificationConfigurations.AddObject(dataExportChildProvider.AllFreeCohortIdentificationConfigurationsNode);
            }

            tlvCohortIdentificationConfigurations.AddObject(Activator.CoreChildProvider.OrphanAggregateConfigurationsNode);

            CommonTreeFunctionality.WhitespaceRightClickMenuCommandsGetter = (a) => new IAtomicCommand[] {
                new ExecuteCommandCreateNewCohortIdentificationConfiguration(a),
                new ExecuteCommandMergeCohortIdentificationConfigurations(a, null)
            };

            Activator.RefreshBus.EstablishLifetimeSubscription(this);

            var factory = new AtomicCommandUIFactory(activator);


            CommonFunctionality.Add(factory.CreateMenuItem(new ExecuteCommandCreateNewCohortIdentificationConfiguration(Activator)), "New...");
            CommonFunctionality.Add(factory.CreateMenuItem(new ExecuteCommandMergeCohortIdentificationConfigurations(Activator, null)
            {
                OverrideCommandName = "By Merging Existing..."
            }), "New...");
        }
Пример #21
0
        public override void SetDatabaseObject(IActivateItems activator, ExtractionInformation databaseObject)
        {
            _isLoading            = true;
            ExtractionInformation = databaseObject;
            base.SetDatabaseObject(activator, databaseObject);

            Setup(databaseObject);

            ObjectSaverButton1.BeforeSave += objectSaverButton1OnBeforeSave;

            CommonFunctionality.Add(ragSmiley1);

            CommonFunctionality.AddHelp(cbHashOnDataRelease, "IColumn.HashOnDataRelease", "Hash on Data Release");
            CommonFunctionality.AddHelp(cbIsExtractionIdentifier, "IColumn.IsExtractionIdentifier", "Is Extraction Identifier");
            CommonFunctionality.AddHelp(cbIsPrimaryKey, "IColumn.IsPrimaryKey", "Is Primary Key");
            _isLoading = false;
        }
Пример #22
0
        public override void SetDatabaseObject(IActivateItems activator, Catalogue databaseObject)
        {
            base.SetDatabaseObject(activator, databaseObject);
            _catalogue = databaseObject;
            RefreshUIFromDatabase();

            rbCore.Image            = CatalogueIcons.ExtractionInformation;
            rbSupplemental.Image    = CatalogueIcons.ExtractionInformation_Supplemental;
            rbSpecialApproval.Image = CatalogueIcons.ExtractionInformation_SpecialApproval;
            rbInternal.Image        = activator.CoreIconProvider.GetImage(CatalogueIcons.ExtractionInformation_SpecialApproval, OverlayKind.Internal);

            CommonFunctionality.Add(rbCore);
            CommonFunctionality.Add(rbSupplemental);
            CommonFunctionality.Add(rbSpecialApproval);
            CommonFunctionality.Add(rbInternal);

            CommonFunctionality.AddToMenu(new ExecuteCommandReOrderColumns(Activator, _catalogue));
        }
Пример #23
0
        public override void SetDatabaseObject(IActivateItems activator, ExternalDatabaseServer databaseObject)
        {
            base.SetDatabaseObject(activator, databaseObject);

            if (_navigationTrack == null)
            {
                //what happens when user clicks back/forward
                _navigationTrack = new NavigationTrack <LogViewerFilter>(f => true, f =>
                {
                    if (f.LoggingTable != LoggingTables.None)
                    {
                        var cmd = new ExecuteCommandViewLoggedData(activator, f);
                        cmd.Execute();
                    }
                });

                //set the initial filter
                _navigationTrack.Append(Filter);
                _back = new ToolStripButton("Back", FamFamFamIcons.Back, (s, e) => _navigationTrack.Back(true))
                {
                    DisplayStyle = ToolStripItemDisplayStyle.Image
                };
            }

            CommonFunctionality.Add(_back);

            CommonFunctionality.Add(label1);
            CommonFunctionality.Add(tbContentFilter);

            CommonFunctionality.Add(label2);
            CommonFunctionality.Add(tbTop);

            CommonFunctionality.Add(cbPreferNewer);


            if (!databaseObject.DiscoverExistence(DataAccessContext.Logging, out string reason))
            {
                activator.KillForm(ParentForm, "Database " + databaseObject + " did not exist:" + reason);
                return;
            }

            LogManager = new LogManager(databaseObject);
            FetchDataTable();
        }
Пример #24
0
        public override void SetDatabaseObject(IActivateItems activator, CohortIdentificationConfiguration databaseObject)
        {
            base.SetDatabaseObject(activator, databaseObject);
            _configuration = databaseObject;

            lblFrozen.Visible = _configuration.Frozen;

            tbID.Text          = _configuration.ID.ToString();
            tbName.Text        = _configuration.Name;
            tbDescription.Text = _configuration.Description;
            ticket.TicketText  = _configuration.Ticket;
            tlvCic.Enabled     = !databaseObject.Frozen;

            if (_commonFunctionality == null)
            {
                _commonFunctionality = new RDMPCollectionCommonFunctionality();

                _commonFunctionality.SetUp(RDMPCollection.Cohort, tlvCic, activator, olvNameCol, olvNameCol, new RDMPCollectionCommonFunctionalitySettings
                {
                    AddFavouriteColumn = false,
                    AddCheckColumn     = false,
                    AllowPinning       = false,
                    AllowSorting       = true, //important, we need sorting on so that we can override sort order with our OrderableComparer
                });

                tlvCic.AddObject(_configuration);
                tlvCic.ExpandAll();
            }

            CommonFunctionality.AddToMenu(cbIncludeCumulative);
            CommonFunctionality.AddToMenu(new ToolStripSeparator());
            CommonFunctionality.AddToMenu(_miClearCache);
            CommonFunctionality.AddToMenu(new ExecuteCommandSetQueryCachingDatabase(Activator, _configuration));
            CommonFunctionality.AddToMenu(new ExecuteCommandCreateNewQueryCacheDatabase(activator, _configuration));

            CommonFunctionality.AddToMenu(new ToolStripSeparator());
            CommonFunctionality.AddToMenu(new ExecuteCommandShowXmlDoc(activator, "CohortIdentificationConfiguration.QueryCachingServer_ID", "Query Caching"), "Help (What is Query Caching)");

            CommonFunctionality.Add(new ExecuteCommandCreateNewCohortByExecutingACohortIdentificationConfiguration(activator, null).SetTarget(_configuration),
                                    "Commit Cohort",
                                    activator.CoreIconProvider.GetImage(RDMPConcept.ExtractableCohort, OverlayKind.Add));

            CohortCompilerUI1.SetDatabaseObject(activator, databaseObject);
        }
Пример #25
0
        public void SetCollection(IActivateItems activator, IPersistableObjectCollection collection)
        {
            SetItemActivator(activator);

            Collection = (LoadEventsTreeViewObjectCollection)collection;

            CommonFunctionality.ClearToolStrip();

            CommonFunctionality.Add(new ToolStripLabel("Filter:"));
            CommonFunctionality.Add(_tbFilterBox);
            CommonFunctionality.Add(_btnApplyFilter);

            CommonFunctionality.Add(new ToolStripSeparator());
            CommonFunctionality.Add(new ToolStripLabel("Fetch:"));
            CommonFunctionality.Add(_tbToFetch);
            CommonFunctionality.Add(_btnFetch);

            PopulateLoadHistory();
        }
Пример #26
0
        public override void SetDatabaseObject(IActivateItems activator, SelectedDataSets databaseObject)
        {
            base.SetDatabaseObject(activator, databaseObject);

            activator.RefreshBus.EstablishLifetimeSubscription(this);

            SelectedDataSet = databaseObject;
            _dataSet        = SelectedDataSet.ExtractableDataSet;
            _config         = (ExtractionConfiguration)SelectedDataSet.ExtractionConfiguration;

            SetupUserInterface();

            SortSelectedByOrder();

            CommonFunctionality.AddToMenu(new ExecuteCommandShow(activator, databaseObject.ExtractableDataSet.Catalogue, 0, true), "Show Catalogue");
            CommonFunctionality.Add(new ExecuteCommandExecuteExtractionConfiguration(activator, databaseObject));

            CommonFunctionality.AddChecks(new SelectedDataSetsChecker(SelectedDataSet));
        }
Пример #27
0
        public override void SetDatabaseObject(IActivateItems activator, LoadMetadata databaseObject)
        {
            base.SetDatabaseObject(activator, databaseObject);
            _loadMetadata = databaseObject;

            checkAndExecuteUI1.SetItemActivator(activator);

            SetButtonStates(null, null);

            SetLoadProgressGroupBoxState();


            CommonFunctionality.Add(new ExecuteCommandViewLoadDiagram(activator, _loadMetadata));

            CommonFunctionality.AddToMenu(new ExecuteCommandEditLoadMetadataDescription(activator, _loadMetadata));

            CommonFunctionality.Add(new ExecuteCommandViewLogs(activator, (LoadMetadata)databaseObject));

            CommonFunctionality.Add(dd_DebugOptions);
        }
Пример #28
0
        public override void SetItemActivator(IActivateItems activator)
        {
            base.SetItemActivator(activator);
            Activator.RefreshBus.EstablishLifetimeSubscription(this);

            CommonTreeFunctionality.SetUp(
                RDMPCollection.DataLoad,
                tlvLoadMetadata,
                activator,
                olvName,
                olvName);

            CommonTreeFunctionality.WhitespaceRightClickMenuCommandsGetter = (a) => new IAtomicCommand[] { new ExecuteCommandCreateNewLoadMetadata(a) };

            tlvLoadMetadata.AddObject(Activator.CoreChildProvider.AllPermissionWindowsNode);
            tlvLoadMetadata.AddObject(Activator.CoreChildProvider.AllLoadMetadatasNode);


            CommonFunctionality.Add(new ExecuteCommandCreateNewLoadMetadata(Activator), "New");
        }
Пример #29
0
        public override void SetDatabaseObject(IActivateItems activator, ExtractionInformation databaseObject)
        {
            _isLoading            = true;
            ExtractionInformation = databaseObject;
            base.SetDatabaseObject(activator, databaseObject);

            Setup(databaseObject);

            ObjectSaverButton1.BeforeSave += objectSaverButton1OnBeforeSave;

            CommonFunctionality.Add(ragSmiley1);

            CommonFunctionality.AddHelp(cbHashOnDataRelease, "IColumn.HashOnDataRelease", "Hash on Data Release");
            CommonFunctionality.AddHelp(cbIsExtractionIdentifier, "IColumn.IsExtractionIdentifier", "Is Extraction Identifier");
            CommonFunctionality.AddHelp(cbIsPrimaryKey, "IColumn.IsPrimaryKey", "Is Extraction Primary Key");
            CommonFunctionality.AddHelpString(lblIsTransform, "Transforms Data", "When the extraction SQL is different from the column SQL then it is considered to 'transform' the data.  For example 'UPPER([mydb].[mycol]) as mycol'.  Transforms must always have an alias.");

            lblIsTransform.Text = $"Transforms Data: {(ExtractionInformation.IsProperTransform() ? "Yes" : "No")}";

            _isLoading = false;
        }
Пример #30
0
        public void SetCollection(IActivateItems activator, IPersistableObjectCollection collection)
        {
            SetItemActivator(activator);

            Collection = (LoadEventsTreeViewObjectCollection)collection;

            RDMPCollectionCommonFunctionality.SetupColumnSortTracking(treeView1, new Guid("ccbea22e-a784-4968-a127-7c3a55b6d281"));

            CommonFunctionality.ClearToolStrip();

            CommonFunctionality.Add(new ToolStripLabel("Filter:"));
            CommonFunctionality.Add(_tbFilterBox);
            CommonFunctionality.Add(_btnApplyFilter);

            CommonFunctionality.Add(new ToolStripSeparator());
            CommonFunctionality.Add(new ToolStripLabel("Fetch:"));
            CommonFunctionality.Add(_tbToFetch);
            CommonFunctionality.Add(_btnFetch);

            PopulateLoadHistory();
        }