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(); }