Example #1
0
        private void btn_zhan_add_Click(object sender, EventArgs e)
        {
            String suo  = cob_suo.Text.Trim();
            String zhan = txt_zhan_name.Text.Trim();

            if (suo == "" || zhan == "")
            {
                MessageBox.Show("请输入内容");
            }
            NodeStruct node_suo = NodeStructPro.getNodeStruct(suo, "suo", NodeStructPro.getQuId());

            if (NodeStructPro.isExist(zhan, "zhan", node_suo.Id) == 1)
            {
                MessageBox.Show("信息已存在");
            }
            else
            {
                NodeStruct node = new NodeStruct();
                node.Id         = Utils.GetId();
                node.Name       = zhan;
                node.Type       = "zhan";
                node.Parent_id  = node_suo.Id;
                node.Admin_user = "";
                NodeStructPro.Add(node);
                MessageBox.Show("添加成功");
            }
        }
Example #2
0
        private void btn_suo_add_Click(object sender, EventArgs e)
        {
            String suo = txt_suo.Text.Trim();

            if (suo == "")
            {
                MessageBox.Show("请输入内容");
            }
            else
            {
                if (NodeStructPro.isExist(suo, "suo", NodeStructPro.getQuId()) == 1)
                {
                    MessageBox.Show("该信息已存在");
                }
                else
                {
                    NodeStruct node = new NodeStruct();
                    node.Id         = Utils.GetId();
                    node.Name       = suo;
                    node.Type       = "suo";
                    node.Parent_id  = NodeStructPro.getQuId();
                    node.Admin_user = "";
                    NodeStructPro.Add(node);
                    MessageBox.Show("添加成功");
                }
            }
        }