Example #1
0
        private void addTablesNode(DatabaseNode parentNode, ServerConnectionSettings settings)
        {
            var tablesNode = new TablesNode(settings.ServerVersion);

            tablesNode.Nodes.Override.Sort = SortType.Ascending;
            parentNode.Nodes.Add(tablesNode);
        }
Example #2
0
        public void RefreshTablesNode()
        {
            TablesNode.Nodes.Clear();

            foreach (var schemaName in this.ProjectNode.Project.TableMappings.Select(o => o.SchemaName).Distinct().OrderBy(o => o))
            {
                SchemaTreeNode schemaNode = new SchemaTreeNode(this, schemaName);
                bool           anyVisible = false;

                foreach (TableMapping tableMapping in this.ProjectNode.Project.TableMappings
                         .Where(o => string.Equals(o.ConnectionName, this.ConnectionInfo.Name))
                         .Where(o => string.Equals(o.SchemaName, schemaName))
                         .OrderBy(o => o.ClassName))
                {
                    if (!tableMapping.Exclude || this.ProjectNode.Project.UserSettings.ShowExcludedItems)
                    {
                        schemaNode.Nodes.Add(new TableOrViewTreeNode(this, tableMapping));
                        anyVisible = true;
                    }
                }

                if (anyVisible)
                {
                    TablesNode.Nodes.Add(schemaNode);
                }
            }

            TablesNode.Expand();
        }