Пример #1
0
        private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            SaveFlag = "Update";

            DBEntity辅助输入 d = e.Node.Tag as DBEntity辅助输入;

            edtTitile.Text  = d.标题;
            edtCode.Text    = d.编码;
            edtContext.Text = d.内容;
        }
Пример #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (SaveFlag == "Add")
            {
                if (AddTreeItemEvent != null)
                {
                    AddTreeItemEvent(treeView1.SelectedNode.Tag, e);
                }
            }
            if (SaveFlag == "Update")
            {
                DBEntity辅助输入 d = treeView1.SelectedNode.Tag as DBEntity辅助输入;
                d.标题 = edtTitile.Text;
                d.编码 = edtCode.Text;
                d.内容 = edtContext.Text;

                treeView1.SelectedNode.Text = d.标题;

                if (UpdateTreeItemEvent != null)
                {
                    UpdateTreeItemEvent(treeView1.SelectedNode.Tag, e);
                }
            }
        }