public override void SetDatabaseObject(IActivateItems activator, ANOTable databaseObject) { _anoTable = databaseObject; base.SetDatabaseObject(activator, databaseObject); llServer.Text = _anoTable.Server.Name; CommonFunctionality.AddChecks(databaseObject); CommonFunctionality.StartChecking(); SetEnabledness(); CommonFunctionality.AddHelp(tbSuffix, "ANOTable.Suffix"); CommonFunctionality.AddHelp(llServer, "ANOTable.Server_ID"); CommonFunctionality.AddHelpString(tbInputDataType, "DataType", "Datatype for private identifiers being mapped e.g. varchar(100)"); CommonFunctionality.AddHelp(nIntegers, "ANOTable.NumberOfIntegersToUseInAnonymousRepresentation"); CommonFunctionality.AddHelp(nCharacters, "ANOTable.NumberOfCharactersToUseInAnonymousRepresentation"); if (!_anoTable.Server.WasCreatedBy(new ANOStorePatcher())) { _serverErrorProvider.SetError(llServer, "Server is not an ANO server"); } else { _serverErrorProvider.Clear(); } }
public override void SetDatabaseObject(IActivateItems activator, GovernancePeriod databaseObject) { base.SetDatabaseObject(activator, databaseObject); _governancePeriod = databaseObject; //clear related catalogues olvCatalogues.ClearObjects(); ticketingControl1.TicketText = _governancePeriod.Ticket; lblExpired.Visible = _governancePeriod.IsExpired(); dtpStartDate.Value = _governancePeriod.StartDate; if (_governancePeriod.EndDate == null) { rbNeverExpires.Checked = true; } else { rbExpiresOn.Checked = true; dtpEndDate.Value = (DateTime)_governancePeriod.EndDate; } //add related catalogues olvCatalogues.AddObjects(_governancePeriod.GovernedCatalogues.ToArray()); CommonFunctionality.AddHelp(olvCatalogues, "GovernancePeriod.GovernedCatalogues"); CommonFunctionality.AddChecks(_governancePeriod); CommonFunctionality.StartChecking(); }
public override void SetDatabaseObject(IActivateItems activator, PreLoadDiscardedColumn databaseObject) { base.SetDatabaseObject(activator, databaseObject); CommonFunctionality.AddChecks(databaseObject); CommonFunctionality.StartChecking(); CommonFunctionality.AddToMenu(new SetDumpServerMenuItem(Activator, databaseObject.TableInfo)); }
public override void SetDatabaseObject(IActivateItems activator, StandardRegex databaseObject) { base.SetDatabaseObject(activator, databaseObject); _standardRegex = databaseObject; CommonFunctionality.AddChecks(_standardRegex); CommonFunctionality.StartChecking(); }
public override void SetDatabaseObject(IActivateItems activator, ProcessTask databaseObject) { base.SetDatabaseObject(activator, databaseObject); _processTask = databaseObject; SetupForFile(); CommonFunctionality.AddChecks(GetRuntimeTask); CommonFunctionality.StartChecking(); }
public override void SetDatabaseObject(IActivateItems activator, ConnectionStringKeyword databaseObject) { base.SetDatabaseObject(activator, databaseObject); _keyword = databaseObject; ddDatabaseType.SelectedItem = _keyword.DatabaseType; tbName.Text = _keyword.Name; tbValue.Text = _keyword.Value; tbID.Text = _keyword.ID.ToString(); pbDatabaseProvider.Image = Activator.CoreIconProvider.GetImage(_keyword.DatabaseType); tbCommandToDelete.Text = "DELETE FROM ConnectionStringKeyword"; CommonFunctionality.AddChecks(databaseObject); CommonFunctionality.StartChecking(); }
public override void SetDatabaseObject(IActivateItems activator, ConcreteFilter databaseObject) { _loading = true; base.SetDatabaseObject(activator, databaseObject); Catalogue = databaseObject.GetCatalogue(); _extractionFilter = databaseObject; ParameterCollectionUIOptionsFactory factory = null; ParameterCollectionUIOptions options = null; try { factory = new ParameterCollectionUIOptionsFactory(); options = factory.Create(databaseObject, activator.CoreChildProvider); } catch (Exception e) { Activator.KillForm(ParentForm, e); return; } //collapse panel 1 unless there are parameters splitContainer1.Panel1Collapsed = !options.ParameterManager.ParametersFoundSoFarInQueryGeneration.Values.Any(v => v.Any()); parameterCollectionUI1.SetUp(options, Activator); CommonFunctionality.AddToMenu(new ExecuteCommandViewFilterMatchData(Activator, databaseObject, ViewType.TOP_100)); CommonFunctionality.AddToMenu(new ExecuteCommandViewFilterMatchData(Activator, databaseObject, ViewType.Aggregate)); CommonFunctionality.AddToMenu(new ExecuteCommandViewFilterMatchGraph(Activator, databaseObject)); CommonFunctionality.AddToMenu(new ExecuteCommandBrowseLookup(Activator, databaseObject)); CommonFunctionality.AddToMenu(new ExecuteCommandPublishFilter(Activator, databaseObject, databaseObject.GetCatalogue())); FigureOutGlobalsAndAutoComplete(); QueryEditor.Text = _extractionFilter.WhereSQL; CommonFunctionality.AddChecks(databaseObject); CommonFunctionality.StartChecking(); QueryEditor.ReadOnly = ReadOnly; tbFilterName.ReadOnly = ReadOnly; tbFilterDescription.ReadOnly = ReadOnly; cbIsMandatory.Enabled = !ReadOnly; _loading = false; }
public override void SetDatabaseObject(IActivateItems activator, AggregateConfiguration databaseObject) { _aggregate = databaseObject; base.SetDatabaseObject(activator, databaseObject); try { _querySyntaxHelper = databaseObject.GetQuerySyntaxHelper(); } catch (AmbiguousDatabaseTypeException e) { activator.KillForm(ParentForm, e); return; } isRefreshing = true; //find out what is legal for the aggregate _options = new AggregateBuilderOptionsFactory().Create(_aggregate); //set enablednesss based on legality cbExtractable.Enabled = _options.ShouldBeEnabled(AggregateEditorSection.Extractable, _aggregate); cbExtractable.Checked = _aggregate.IsExtractable; ddPivotDimension.Enabled = _options.ShouldBeEnabled(AggregateEditorSection.PIVOT, _aggregate); gbAxis.Enabled = _options.ShouldBeEnabled(AggregateEditorSection.AXIS, _aggregate); //add included/excluded dimensions selectColumnUI1.SetUp(Activator, _options, _aggregate); tbID.Text = _aggregate.ID.ToString(); SetNameText(); DetermineFromTables(); PopulateHavingText(); var axisIfAny = _aggregate.GetAxisIfAny(); var _axisDimensionIfAny = axisIfAny != null ? axisIfAny.AggregateDimension : null; var _pivotIfAny = _aggregate.PivotDimension; PopulatePivotDropdown(_axisDimensionIfAny, _pivotIfAny); PopulateAxis(_axisDimensionIfAny, _pivotIfAny); PopulateTopX(); if (databaseObject.IsCohortIdentificationAggregate) { var cic = databaseObject.GetCohortIdentificationConfigurationIfAny(); if (cic != null) { CommonFunctionality.AddToMenu(new ExecuteCommandActivate(activator, cic), "Open Cohort Query..."); } } else { CommonFunctionality.AddToMenu(new ExecuteCommandShow(activator, databaseObject.Catalogue, 0, true)); } CommonFunctionality.Add(new ExecuteCommandExecuteAggregateGraph(activator, databaseObject)); CommonFunctionality.Add(new ExecuteCommandViewSample(activator, databaseObject)); CommonFunctionality.AddToMenu(new ExecuteCommandViewSqlParameters(activator, databaseObject)); CommonFunctionality.AddChecks(databaseObject); CommonFunctionality.StartChecking(); //enforcing the naming convention on cic aggregates can result in ObjectSaverButton incorrectly getting enabled GetObjectSaverButton()?.Enable(false); isRefreshing = false; }