コード例 #1
0
        public virtual void SetDatabaseObject(IActivateItems activator, T databaseObject)
        {
            SetItemActivator(activator);
            Activator.RefreshBus.EstablishSelfDestructProtocol(this, activator, databaseObject);
            DatabaseObject = databaseObject;

            CommonFunctionality.ClearToolStrip();

            if (_colorIndicator == null && AssociatedCollection != RDMPCollection.None)
            {
                var colorProvider = new BackColorProvider();
                _colorIndicator           = new Control();
                _colorIndicator.Dock      = DockStyle.Top;
                _colorIndicator.Location  = new Point(0, 0);
                _colorIndicator.Size      = new Size(150, BackColorProvider.IndiciatorBarSuggestedHeight);
                _colorIndicator.TabIndex  = 0;
                _colorIndicator.BackColor = colorProvider.GetColor(AssociatedCollection);
                this.Controls.Add(this._colorIndicator);
            }

            if (_binder == null)
            {
                _binder = new BinderWithErrorProviderFactory(activator);
            }

            SetBindings(_binder, databaseObject);

            if (this is ISaveableUI)
            {
                ObjectSaverButton1.SetupFor(this, databaseObject, activator);
            }
        }
コード例 #2
0
ファイル: CacheProgressUI.cs プロジェクト: 24418863/rdm
        protected override void SetBindings(BinderWithErrorProviderFactory rules, CacheProgress databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbID, "Text", "ID", c => c.ID);
            Bind(tbName, "Text", "Name", c => c.Name);
        }
コード例 #3
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, Project databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbID, "Text", "ID", p => p.ID);
            Bind(tbName, "Text", "Name", p => p.Name);
        }
コード例 #4
0
ファイル: AggregateEditorUI.cs プロジェクト: rkm/RDMP
        protected override void SetBindings(BinderWithErrorProviderFactory rules, AggregateConfiguration databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbDescription, "Text", "Description", a => a.Description);
            Bind(cbExtractable, "Checked", "IsExtractable", a => a.IsExtractable);
        }
コード例 #5
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, ConcreteFilter databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbFilterName, "Text", "Name", f => f.Name);
            Bind(tbFilterDescription, "Text", "Description", f => f.Description);
            Bind(cbIsMandatory, "Checked", "IsMandatory", f => f.IsMandatory);
        }
コード例 #6
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, ExtractionConfiguration databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbUsername, "Text", "Username", c => c.Username);
            Bind(tbID, "Text", "ID", c => c.ID);
            Bind(tbDescription, "Text", "Description", c => c.Description);
        }
コード例 #7
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, PermissionWindow databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbName, "Text", "Name", w => w.Name);
            Bind(tbDescription, "Text", "Description", w => w.Description);
            Bind(tbID, "Text", "ID", w => w.ID);
        }
コード例 #8
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, LoadMetadata databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbID, "Text", "ID", l => l.ID);
            Bind(tbName, "Text", "Name", l => l.Name);
            Bind(tbDescription, "Text", "Description", l => l.Description);
        }
コード例 #9
0
ファイル: LoadProgressUI.cs プロジェクト: 24418863/rdm
        protected override void SetBindings(BinderWithErrorProviderFactory rules, LoadProgress databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbID, "Text", "ID", l => l.ID);
            Bind(tbName, "Text", "Name", l => l.Name);
            Bind(nDefaultNumberOfDaysToLoadEachTime, "Value", "DefaultNumberOfDaysToLoadEachTime", l => l.DefaultNumberOfDaysToLoadEachTime);
        }
コード例 #10
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, DataAccessCredentials databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbName, "Text", "Name", c => c.Name);
            Bind(tbUsername, "Text", "Username", c => c.Username);
            Bind(tbPassword, "Text", "Password", c => c.Password);
        }
コード例 #11
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, GovernancePeriod databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbID, "Text", "ID", g => g.ID);
            Bind(tbName, "Text", "Name", g => g.Name);
            Bind(tbDescription, "Text", "Description", g => g.Description);
        }
コード例 #12
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, ConnectionStringKeyword databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbID, "Text", "ID", k => k.ID);
            Bind(tbName, "Text", "Name", k => k.Name);
            Bind(tbValue, "Text", "Value", k => k.Value);
            Bind(ddDatabaseType, "Text", "DatabaseType", k => k.DatabaseType);
        }
コード例 #13
0
ファイル: StandardRegexUI.cs プロジェクト: HicServices/RDMP
        protected override void SetBindings(BinderWithErrorProviderFactory rules, StandardRegex databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbID, "Text", "ID", r => r.ID);
            Bind(tbConceptName, "Text", "ConceptName", r => r.ConceptName);
            Bind(tbRegex, "Text", "Regex", r => r.Regex);
            Bind(tbDescription, "Text", "Description", r => r.Description);
        }
コード例 #14
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, PreLoadDiscardedColumn databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbID, "Text", "ID", p => p.ID);
            Bind(tbRuntimeColumnName, "Text", "RuntimeColumnName", p => p.RuntimeColumnName);
            Bind(tbSqlDataType, "Text", "SqlDataType", p => p.SqlDataType);
            Bind(ddDestination, "SelectedItem", "Destination", p => p.Destination);
        }
コード例 #15
0
ファイル: SupportingDocumentUI.cs プロジェクト: rkm/RDMP
        protected override void SetBindings(BinderWithErrorProviderFactory rules, SupportingDocument databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbID, "Text", "ID", s => s.ID);
            Bind(tbDescription, "Text", "Description", s => s.Description);
            Bind(tbName, "Text", "Name", s => s.Name);
            Bind(cbExtractable, "Checked", "Extractable", s => s.Extractable);
            Bind(cbIsGlobal, "Checked", "IsGlobal", s => s.IsGlobal);
        }
コード例 #16
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, RemoteRDMP databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbID, "Text", "ID", r => r.ID);
            Bind(tbName, "Text", "Name", r => r.Name);
            Bind(tbBaseUrl, "Text", "URL", r => r.URL);
            Bind(tbUsername, "Text", "Username", r => r.Username);
            Bind(tbPassword, "Text", "Password", r => r.Password);
        }
コード例 #17
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, ANOTable databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbID, "Text", "ID", a => a.ID);
            Bind(nIntegers, "Value", "NumberOfIntegersToUseInAnonymousRepresentation", a => a.NumberOfIntegersToUseInAnonymousRepresentation);
            Bind(nCharacters, "Value", "NumberOfCharactersToUseInAnonymousRepresentation", a => a.NumberOfCharactersToUseInAnonymousRepresentation);
            Bind(tbName, "Text", "TableName", a => a.TableName);
            Bind(tbSuffix, "Text", "Suffix", a => a.Suffix);
        }
コード例 #18
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, ExternalDatabaseServer databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbID, "Text", "ID", s => s.ID);
            Bind(tbName, "Text", "Name", s => s.Name);
            Bind(tbServerName, "Text", "Server", s => s.Server);
            Bind(tbMappedDataPath, "Text", "MappedDataPath", s => s.MappedDataPath);
            Bind(tbDatabaseName, "Text", "Database", s => s.Database);
            Bind(tbUsername, "Text", "Username", s => s.Username);
            Bind(ddSetKnownType, "Text", "CreatedByAssembly", s => s.CreatedByAssembly);
        }
コード例 #19
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, ExtractionInformation databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbId, "Text", "ID", ei => ei.ID);
            Bind(tbDefaultOrder, "Text", "Order", ei => ei.Order);
            Bind(tbAlias, "Text", "Alias", ei => ei.Alias);

            Bind(cbHashOnDataRelease, "Checked", "HashOnDataRelease", ei => ei.HashOnDataRelease);
            Bind(cbIsExtractionIdentifier, "Checked", "IsExtractionIdentifier", ei => ei.IsExtractionIdentifier);
            Bind(cbIsPrimaryKey, "Checked", "IsPrimaryKey", ei => ei.IsPrimaryKey);

            Bind(ddExtractionCategory, "SelectedItem", "ExtractionCategory", ei => ei.ExtractionCategory);
        }
コード例 #20
0
ファイル: ExternalCohortTableUI.cs プロジェクト: 24418863/rdm
        protected override void SetBindings(BinderWithErrorProviderFactory rules, ExternalCohortTable databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbID, "Text", "ID", e => e.ID);

            Bind(tbID, "Text", "ID", e => e.ID);
            Bind(tbName, "Text", "Name", e => e.Name);
            Bind(tbTableName, "Text", "TableName", e => e.TableName);
            Bind(tbPrivateIdentifierField, "Text", "PrivateIdentifierField", e => e.PrivateIdentifierField);
            Bind(tbReleaseIdentifierField, "Text", "ReleaseIdentifierField", e => e.ReleaseIdentifierField);
            Bind(tbDefinitionTableForeignKeyField, "Text", "DefinitionTableForeignKeyField", e => e.DefinitionTableForeignKeyField);

            Bind(tbDefinitionTableName, "Text", "DefinitionTableName", e => e.DefinitionTableName);
        }
コード例 #21
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, CatalogueItem databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(ci_tbID, "Text", "ID", ci => ci.ID);
            Bind(ci_tbName, "Text", "Name", ci => ci.Name);
            Bind(ci_tbStatisticalConsiderations, "Text", "Statistical_cons", ci => ci.Statistical_cons);
            Bind(ci_tbResearchRelevance, "Text", "Research_relevance", ci => ci.Research_relevance);
            Bind(_scintillaDescription, "Text", "Description", ci => ci.Description);
            Bind(ci_tbTopics, "Text", "Topic", ci => ci.Topic);
            Bind(ci_ddPeriodicity, "SelectedItem", "Periodicity", ci => ci.Periodicity);
            Bind(ci_tbAggregationMethod, "Text", "Agg_method", ci => ci.Agg_method);
            Bind(ci_tbLimitations, "Text", "Limitations", ci => ci.Limitations);
            Bind(ci_tbComments, "Text", "Comments", ci => ci.Comments);
        }
コード例 #22
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, Catalogue databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbAcronym, "Text", "Acronym", c => c.Acronym);
            Bind(tbName, "Text", "Name", c => c.Name);
            Bind(c_tbID, "Text", "ID", c => c.ID);
            Bind(_scintillaDescription, "Text", "Description", c => c.Description);

            Bind(c_ddType, "SelectedItem", "Type", c => c.Type);
            Bind(c_ddGranularity, "SelectedItem", "Granularity", c => c.Granularity);
            Bind(c_ddPeriodicity, "SelectedItem", "Periodicity", c => c.Periodicity);

            Bind(cbColdStorage, "Checked", "IsColdStorageDataset", c => c.IsColdStorageDataset);
            Bind(cbDeprecated, "Checked", "IsDeprecated", c => c.IsDeprecated);
            Bind(cbInternal, "Checked", "IsInternalDataset", c => c.IsInternalDataset);

            Bind(c_tbGeographicalCoverage, "Text", "Geographical_coverage", c => c.Geographical_coverage);
            Bind(c_tbBackgroundSummary, "Text", "Background_summary", c => c.Background_summary);
            Bind(c_tbTopics, "Text", "Search_keywords", c => c.Search_keywords);
            Bind(c_tbUpdateFrequency, "Text", "Update_freq", c => c.Update_freq);
            Bind(c_tbUpdateSchedule, "Text", "Update_sched", c => c.Update_sched);
            Bind(c_tbTimeCoverage, "Text", "Time_coverage", c => c.Time_coverage);
            Bind(tbAdministrativeContactName, "Text", "Contact_details", c => c.Contact_details);
            Bind(c_tbResourceOwner, "Text", "Resource_owner", c => c.Resource_owner);
            Bind(c_tbAttributionCitation, "Text", "Attribution_citation", c => c.Attribution_citation);
            Bind(c_tbAccessOptions, "Text", "Access_options", c => c.Access_options);
            Bind(c_tbSubjectNumbers, "Text", "SubjectNumbers", c => c.SubjectNumbers);

            Bind(tbDataStandards, "Text", "Data_standards", c => c.Data_standards);
            Bind(tbAdministrativeContactName, "Text", "Administrative_contact_name", c => c.Administrative_contact_name);
            Bind(tbAdministrativeContactEmail, "Text", "Administrative_contact_email", c => c.Administrative_contact_email);
            Bind(tbAdministrativeContactTelephone, "Text", "Administrative_contact_telephone", c => c.Administrative_contact_telephone);
            Bind(tbAdministrativeContactAddress, "Text", "Administrative_contact_address", c => c.Administrative_contact_address);
            Bind(tbCountryOfOrigin, "Text", "Country_of_origin", c => c.Country_of_origin);
            Bind(tbEthicsApprover, "Text", "Ethics_approver", c => c.Ethics_approver);
            Bind(tbSourceOfDataCollection, "Text", "Source_of_data_collection", c => c.Source_of_data_collection);
            Bind(c_tbAttributionCitation, "Text", "Attribution_citation", c => c.Attribution_citation);
            Bind(c_tbAccessOptions, "Text", "Access_options", c => c.Access_options);
        }
コード例 #23
0
        public virtual void SetDatabaseObject(IActivateItems activator, T databaseObject)
        {
            SetItemActivator(activator);
            Activator.RefreshBus.EstablishSelfDestructProtocol(this, activator, databaseObject);
            DatabaseObject = databaseObject;

            CommonFunctionality.ClearToolStrip();

            if (_colorIndicator == null && AssociatedCollection != RDMPCollection.None)
            {
                var colorProvider = new BackColorProvider();
                _colorIndicator           = new Control();
                _colorIndicator.Dock      = DockStyle.Top;
                _colorIndicator.Location  = new Point(0, 0);
                _colorIndicator.Size      = new Size(150, BackColorProvider.IndiciatorBarSuggestedHeight);
                _colorIndicator.TabIndex  = 0;
                _colorIndicator.BackColor = colorProvider.GetColor(AssociatedCollection);
                this.Controls.Add(this._colorIndicator);
            }

            if (_readonlyIndicator == null)
            {
                _readonlyIndicator           = new Label();
                _readonlyIndicator.Dock      = DockStyle.Top;
                _readonlyIndicator.Location  = new Point(0, 0);
                _readonlyIndicator.Size      = new Size(150, 20);
                _readonlyIndicator.TabIndex  = 0;
                _readonlyIndicator.TextAlign = ContentAlignment.MiddleLeft;
                _readonlyIndicator.BackColor = System.Drawing.SystemColors.HotTrack;
                _readonlyIndicator.Font      = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                _readonlyIndicator.ForeColor = System.Drawing.Color.Moccasin;
            }

            if (databaseObject is IMightBeReadOnly ro)
            {
                if (ro.ShouldBeReadOnly(out string reason))
                {
                    _readonlyIndicator.Text = reason;
                    this.Controls.Add(this._readonlyIndicator);
                    ReadOnly = true;
                }
                else
                {
                    //removing it allows us to handle refreshes (where something becomes unfrozen for example)
                    this.Controls.Remove(this._readonlyIndicator);
                    ReadOnly = false;
                }
            }


            if (_binder == null)
            {
                _binder = new BinderWithErrorProviderFactory(activator);
            }

            SetBindings(_binder, databaseObject);

            if (this is ISaveableUI)
            {
                ObjectSaverButton1.SetupFor(this, databaseObject, activator);
            }
        }
コード例 #24
0
 protected virtual void SetBindings(BinderWithErrorProviderFactory rules, T databaseObject)
 {
 }
コード例 #25
0
        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.");
        }