Пример #1
0
        private void 重命名ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TreeNode node = treeview1.SelectedNode;

            MainSubView.UpdataView view = new MainSubView.UpdataView(node.Name);
            string       originName     = node.Name;
            DialogResult result         = view.ShowDialog();

            if (result == DialogResult.OK)
            {
                string   where_cmd  = "viewname='" + originName + "'";
                string[] updata_cmd = new string[1];
                updata_cmd[0] = "viewname='" + MainSubView.UpdataView.View_Name + "'";
                bool success = Main_DataBase_Builder.Updata("AllView", where_cmd, updata_cmd);
                if (success == true)
                {
                    Main_DataBase_Builder.Updata_Table_Name(originName, MainSubView.UpdataView.View_Name);
                }
                TreeNode viewnode = FindTreeNodeWithName("画面", treeview1);
                if (viewnode != null)
                {
                    Reflush_TreeView_ViewNode(viewnode);               // 刷新画面的父结点的信息
                }
                /// 其他的修改
            }
        }