示例#1
0
        //添加表-Tables
        private void menuAddTable_Click(object sender, EventArgs e)
        {
            TableEdit te = new TableEdit();

            te.ShowDialog();
            if (te.SaveCount > 0)
            {
                TreeNode node = GetTableNode(new TableEntity()
                {
                    ID = Convert.ToInt32(te.RecordID), TableName = te.TableName
                });
                GetSelectedNode().Nodes.Add(node);
                this.treeModel.SelectedNode = node;
            }
        }
示例#2
0
        //编辑表-Table
        private void menuEditTable_Click(object sender, EventArgs e)
        {
            TableEdit te = new TableEdit();

            te.RecordID = GetNodeTag();
            te.EditMode = EditMode.Edit;
            te.ShowDialog();
            if (te.SaveCount > 0)
            {
                UpdateTableNode(new TableEntity()
                {
                    TableName = te.TableName
                });
            }
        }