Inheritance: DocumentNode
Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
		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;
    }
Exemplo n.º 5
0
 public static void CreateNew(DataViewHierarchyAccessor HierarchyAccessor, TableNode parent)
 {
   TriggerNode node = new TriggerNode(HierarchyAccessor, 0);
   node.ParentTable = parent;
   node.Edit();
 }
Exemplo n.º 6
0
 public static void CreateNew(DataViewHierarchyAccessor HierarchyAccessor)
 {
   TableNode node = new TableNode(HierarchyAccessor, 0);
   node.Edit();
 }
Exemplo n.º 7
0
 public TableEditorPane(TableNode table)
   : base(null)
 {
   tableEditor = new TableEditor(this, table);
 }
Exemplo n.º 8
0
 public TableEditorPane(TableNode table) : base(null)
 {
     tableEditor = new TableEditor(this, table);
 }
Exemplo n.º 9
0
        public static void CreateNew(DataViewHierarchyAccessor HierarchyAccessor)
        {
            TableNode node = new TableNode(HierarchyAccessor, 0);

            node.Edit();
        }