public override void SetDatabaseObject(IActivateItems activator, ExternalCohortTable databaseObject) { base.SetDatabaseObject(activator, databaseObject); _externalCohortTable = databaseObject; serverDatabaseTableSelector1.DatabaseType = _externalCohortTable.DatabaseType; string password = null; try { password = _externalCohortTable.GetDecryptedPassword(); } catch (Exception) { password = null; } serverDatabaseTableSelector1.SetExplicitDatabase(_externalCohortTable.Server, _externalCohortTable.Database, _externalCohortTable.Username, password); CommonFunctionality.AddHelp(tbTableName, "IExternalCohortTable.TableName"); CommonFunctionality.AddHelp(tbPrivateIdentifierField, "IExternalCohortTable.PrivateIdentifierField"); CommonFunctionality.AddHelp(tbReleaseIdentifierField, "IExternalCohortTable.ReleaseIdentifierField"); CommonFunctionality.AddHelp(tbDefinitionTableForeignKeyField, "IExternalCohortTable.DefinitionTableForeignKeyField"); CommonFunctionality.AddHelp(tbDefinitionTableName, "IExternalCohortTable.DefinitionTableName"); CommonFunctionality.AddChecks(_externalCohortTable); }
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, SupportingSQLTable databaseObject) { base.SetDatabaseObject(activator, databaseObject); _supportingSQLTable = databaseObject; _bLoading = true; QueryPreview.Text = _supportingSQLTable.SQL; //if it has an external server configured if (_supportingSQLTable.ExternalDatabaseServer_ID != null) { ddExternalServers.Text = _supportingSQLTable.ExternalDatabaseServer.ToString(); } else { ddExternalServers.Text = NoExternalServer; } tcTicket.TicketText = _supportingSQLTable.Ticket; _bLoading = false; CommonFunctionality.AddHelp(cbExtractable, "SupportingSQLTable.Extractable"); CommonFunctionality.AddHelp(cbGlobal, "SupportingSqlTable.IsGlobal"); RefreshUIFromDatabase(); }
public override void SetDatabaseObject(IActivateItems activator, CacheProgress databaseObject) { base.SetDatabaseObject(activator, databaseObject); CommonFunctionality.AddHelp(tbCacheProgress, "ICacheProgress.CacheFillProgress"); CommonFunctionality.AddHelp(ddCacheLagDurationType, "ICacheProgress.CacheLagPeriod"); CommonFunctionality.AddHelp(ddCacheLagDelayDurationType, "ICacheProgress.CacheLagPeriodLoadDelay"); CommonFunctionality.AddHelp(tbChunkPeriod, "ICacheProgress.ChunkPeriod"); CommonFunctionality.AddHelp(pPipeline, "ICacheProgress.Pipeline_ID"); _cacheProgress = databaseObject; CommonFunctionality.AddToMenu(new ExecuteCommandExecuteCacheProgress(activator, databaseObject), "Go To Execute"); ragSmiley1.Reset(); try { PopulateCacheProgressPanel(_cacheProgress); } catch (Exception e) { ragSmiley1.Fatal(e); } }
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, PermissionWindow databaseObject) { base.SetDatabaseObject(activator, databaseObject); _permissionWindow = databaseObject; var periods = _permissionWindow.PermissionWindowPeriods; var periodsByDay = new Dictionary <int, List <PermissionWindowPeriod> >(); foreach (var period in periods) { if (!periodsByDay.ContainsKey(period.DayOfWeek)) { periodsByDay.Add(period.DayOfWeek, new List <PermissionWindowPeriod>()); } periodsByDay[period.DayOfWeek].Add(period); } var textBoxes = new[] { tbSunday, tbMonday, tbTuesday, tbWednesday, tbThursday, tbFriday, tbSaturday }; for (var i = 0; i < 7; ++i) { PopulatePeriodTextBoxForDay(textBoxes[i], i, periodsByDay); } CommonFunctionality.AddHelp(tbMonday, "IPermissionWindow.PermissionWindowPeriods"); }
public override void SetDatabaseObject(IActivateItems activator, SupportingDocument databaseObject) { base.SetDatabaseObject(activator, databaseObject); _supportingDocument = databaseObject; //populate various textboxes ticketingControl1.TicketText = _supportingDocument.Ticket; tbUrl.Text = _supportingDocument.URL != null ? _supportingDocument.URL.AbsoluteUri : ""; CommonFunctionality.AddHelp(cbExtractable, "SupportingDocument.Extractable"); CommonFunctionality.AddHelp(cbIsGlobal, "SupportingSqlTable.IsGlobal"); }
public override void SetDatabaseObject(IActivateItems activator, LoadProgress databaseObject) { base.SetDatabaseObject(activator, databaseObject); _loadProgress = databaseObject; loadProgressDiagram1.SetItemActivator(activator); ReloadUIFromDatabase(); CommonFunctionality.AddHelp(nDefaultNumberOfDaysToLoadEachTime, "ILoadProgress.DefaultNumberOfDaysToLoadEachTime"); CommonFunctionality.AddToMenu(new ExecuteCommandActivate(activator, databaseObject.LoadMetadata), "Execute Load"); }
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"); }
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; }
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; }
public override void SetDatabaseObject(IActivateItems activator, Catalogue databaseObject) { if (_scintillaDescription == null) { var f = new ScintillaTextEditorFactory(); _scintillaDescription = f.Create(null, null, null, true, false, activator.CurrentDirectory); _scintillaDescription.Font = System.Drawing.SystemFonts.DefaultFont; panel1.Controls.Add(_scintillaDescription); } base.SetDatabaseObject(activator, databaseObject); _catalogue = databaseObject; CommonFunctionality.AddHelp(tbFolder, "CatalogueFolder"); CommonFunctionality.AddHelp(cbDeprecated, "IMightBeDeprecated.IsDeprecated"); CommonFunctionality.AddHelp(cbColdStorage, "ICatalogue.IsColdStorageDataset"); CommonFunctionality.AddHelp(cbInternal, "ICatalogue.IsInternalDataset"); RefreshUIFromDatabase(); }
private void Initialize(IActivateItems activator, string initialDescription, Project projectSpecificIfAny) { CommonFunctionality.SetItemActivator(activator); var cols = _tableInfo.ColumnInfos; var forwardEngineer = new ForwardEngineerCatalogue(_tableInfo, cols, false); ExtractionInformation[] eis; forwardEngineer.ExecuteForwardEngineering(out _catalogue, out _catalogueItems, out eis); tbDescription.Text = initialDescription + " (" + Environment.UserName + " - " + DateTime.Now + ")"; tbTableName.Text = _tableInfo.Name; _catalogue.SaveToDatabase(); objectSaverButton1.SetupFor(this, _catalogue, activator); if (_binder == null) { _binder = new BinderWithErrorProviderFactory(activator); _binder.Bind(tbCatalogueName, "Text", _catalogue, "Name", false, DataSourceUpdateMode.OnPropertyChanged, c => c.Name); _binder.Bind(tbAcronym, "Text", _catalogue, "Acronym", false, DataSourceUpdateMode.OnPropertyChanged, c => c.Acronym); _binder.Bind(tbDescription, "Text", _catalogue, "Description", false, DataSourceUpdateMode.OnPropertyChanged, c => c.Description); } //Every CatalogueItem is either mapped to a ColumnInfo (not extractable) or a ExtractionInformation (extractable). To start out with they are not extractable foreach (CatalogueItem ci in _catalogueItems) { olvColumnExtractability.AddObject(new ColPair(ci, cols.Single(col => ci.ColumnInfo_ID == col.ID))); } _extractionCategories = new object[] { NotExtractable, ExtractionCategory.Core, ExtractionCategory.Supplemental, ExtractionCategory.SpecialApprovalRequired, ExtractionCategory.Internal, ExtractionCategory.Deprecated }; ddCategoriseMany.Items.AddRange(_extractionCategories); olvExtractionCategory.AspectGetter += ExtractionCategoryAspectGetter; olvColumnExtractability.AlwaysGroupByColumn = olvExtractionCategory; olvColumnExtractability.CellEditStarting += TlvColumnExtractabilityOnCellEditStarting; olvColumnExtractability.CellEditFinishing += TlvColumnExtractabilityOnCellEditFinishing; olvColumnExtractability.CellEditActivation = ObjectListView.CellEditActivateMode.SingleClick; olvIsExtractionIdentifier.AspectPutter += IsExtractionIdentifier_AspectPutter; olvIsExtractionIdentifier.AspectGetter += IsExtractionIdentifier_AspectGetter; olvColumnInfoName.ImageGetter = ImageGetter; olvColumnExtractability.RebuildColumns(); if (Activator.RepositoryLocator.DataExportRepository == null) { gbProjectSpecific.Enabled = false; } else { SelectProject(projectSpecificIfAny); pbProject.Image = activator.CoreIconProvider.GetImage(RDMPConcept.Project); } ddIsExtractionIdentifier.Items.Add("<<None>>"); ddIsExtractionIdentifier.Items.AddRange(olvColumnExtractability.Objects.OfType <ColPair>().ToArray()); CommonFunctionality.AddHelp(btnPickProject, "IExtractableDataSet.Project_ID", "Project Specific Datasets"); CommonFunctionality.AddHelpString(btnAddToExisting, "Add to existing catalogue", "Use this option if you want to create a Catalogue which extracts from multiple tables (via a JOIN). Once used you will still need to configure a JoinInfo between column(s) in all the tables the Catalogue draws data from."); }