public override void LoadDataSource(DataSourceStructure dbstruct) { dbstruct.DataSource.LoadMetadata(); dbstruct.DataSource.LoadSubNodes(); dbstruct.Nodes = dbstruct.DataSource.Nodes; dbstruct.DataSource.LoadRelationships(); dbstruct.Relationships = dbstruct.DataSource.Relationships; }
private void saveButton_Click(object sender, EventArgs e) { try { DataSourceStructure dbstruct = (DataSourceStructure)dbComboBox.SelectedValue; inspector.PersistMap(dbstruct); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); } }
public override void PersistMap(DataSourceStructure dbstruct) { //translate the structure into the SystemMap Services. StoreServerNode(); SqlServerDatabaseNode databaseNode = (SqlServerDatabaseNode)dbstruct.DataSource; StoreDbNode(databaseNode); dbstruct.Nodes.Add(serverStructure.ServerNode); dbstruct.Nodes.Add(dbstruct.DataSource); StoreNodes(dbstruct.Nodes, databaseNode); StoreDependencies(dbstruct.Relationships); }
private void exploreButton_Click(object sender, EventArgs e) { try { DataSourceStructure dbstruct = (DataSourceStructure)dbComboBox.SelectedValue; inspector.LoadDataSource(dbstruct); nodeListPanel.ShowNodes(dbstruct.Nodes); connListPanel.ShowRelationships(dbstruct.Relationships); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); } }
public override void ReloadData() { if (serverStructure == null) { InitStructure(); } //here's where we get to work serverStructure.Databases = new List <DataSourceStructure>(); serverStructure.ServerNode.LoadSubNodes(); foreach (DataSourceNodeBase dbnode in serverStructure.ServerNode.Nodes) { DataSourceStructure dbstruct = new DataSourceStructure { DataSource = dbnode }; serverStructure.Databases.Add(dbstruct); } }
protected override void InitializeDaysVirtualDataSource(VirtualDataSource virtualDataSource) { DataSourceStructure structure = virtualDataSource.DefStructure; var dataValueTypeManager = (DataValueTypeManager)UserConnection.AppManagerProvider.GetManager("DataValueTypeManager"); var dateStringColumn = new DataSourceStructureColumn { Name = DateStringVirtualColumnName, DataValueType = dataValueTypeManager.GetInstanceByName("MediumText"), IsVisible = true, Caption = DataVirtualColumnCaption, IsHideable = false, IsSortable = false, MenuDisabled = true }; structure.AddColumn(dateStringColumn); base.InitializeDaysVirtualDataSource(virtualDataSource); }
/// <summary> /// ################ ########### ######### ### ######### /// </summary> protected virtual void InitializeDaysVirtualDataSource(VirtualDataSource virtualDataSource) { var dataValueTypeManager = (DataValueTypeManager)UserConnection.AppManagerProvider.GetManager("DataValueTypeManager"); DaysTreeGrid.DataSourceId = virtualDataSource.ID; DataSourceStructure edsStructure = DaysEntityDataSource.CurrentStructure; DataSourceStructure vdsStructure = virtualDataSource.DefStructure; vdsStructure.PrimaryColumnName = GridRecordIdColumnName; vdsStructure.PrimaryDisplayColumnName = edsStructure.PrimaryDisplayColumnName; foreach (DataSourceStructureColumn edsColumn in edsStructure.Columns) { vdsStructure.AddColumn((DataSourceStructureColumn)edsColumn.Clone()); } var treeGridRecordIdColumn = new DataSourceStructureColumn { Name = GridRecordIdColumnName, DataValueType = dataValueTypeManager.GetInstanceByName("Guid"), IsVisible = false, }; vdsStructure.AddColumn(treeGridRecordIdColumn); }
public abstract void LoadDataSource(DataSourceStructure dbstruct);
public abstract void PersistMap(DataSourceStructure dbstruct);