Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 private void saveButton_Click(object sender, EventArgs e)
 {
     try
     {
         DataSourceStructure dbstruct = (DataSourceStructure)dbComboBox.SelectedValue;
         inspector.PersistMap(dbstruct);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.StackTrace);
     }
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 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);
     }
 }
Exemplo n.º 5
0
 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);
        }
Exemplo n.º 8
0
 public abstract void LoadDataSource(DataSourceStructure dbstruct);
Exemplo n.º 9
0
 public abstract void PersistMap(DataSourceStructure dbstruct);