public TableEditor(TableEditorPane pane, TableNode node) { this.pane = pane; tableNode = node; InitializeComponent(); dataTypes = Metadata.GetDataTypes(true); TypeColumn.Items.AddRange((object[])dataTypes); tableNode.DataLoaded += new EventHandler(OnDataLoaded); columnGrid.RowTemplate.HeaderCell = new MyDataGridViewRowHeaderCell(); SetupCommands(); }
private BaseNode MakeNewNode(int id) { string nodeId = DataViewHierarchyAccessor.GetNodeId(id); nodeId = nodeId.ToLowerInvariant(); BaseNode newNode = null; switch (nodeId) { case "table": newNode = new TableNode(DataViewHierarchyAccessor, id); break; case "storedprocedure": newNode = new StoredProcedureNode(DataViewHierarchyAccessor, id, false); break; case "storedfunction": newNode = new StoredProcedureNode(DataViewHierarchyAccessor, id, true); break; case "view": newNode = new ViewNode(DataViewHierarchyAccessor, id); break; case "udf": newNode = new UDFNode(DataViewHierarchyAccessor, id); break; case "trigger": newNode = new TriggerNode(DataViewHierarchyAccessor, id); break; default: throw new NotSupportedException("Node type not supported"); } Debug.Assert(newNode != null); return(newNode); }
private BaseNode MakeNewNode(int id) { string nodeId = DataViewHierarchyAccessor.GetNodeId(id); nodeId = nodeId.ToLowerInvariant(); BaseNode newNode = null; switch (nodeId) { case "table": newNode = new TableNode(DataViewHierarchyAccessor, id); break; case "storedprocedure": newNode = new StoredProcedureNode(DataViewHierarchyAccessor, id, false); break; case "storedfunction": newNode = new StoredProcedureNode(DataViewHierarchyAccessor, id, true); break; case "view": newNode = new ViewNode(DataViewHierarchyAccessor, id); break; case "udf": newNode = new UDFNode(DataViewHierarchyAccessor, id); break; case "trigger": newNode = new TriggerNode(DataViewHierarchyAccessor, id); break; default: throw new NotSupportedException("Node type not supported"); } Debug.Assert(newNode != null); return newNode; }
public static void CreateNew(DataViewHierarchyAccessor HierarchyAccessor, TableNode parent) { TriggerNode node = new TriggerNode(HierarchyAccessor, 0); node.ParentTable = parent; node.Edit(); }
public static void CreateNew(DataViewHierarchyAccessor HierarchyAccessor) { TableNode node = new TableNode(HierarchyAccessor, 0); node.Edit(); }
public TableEditorPane(TableNode table) : base(null) { tableEditor = new TableEditor(this, table); }