Exemplo n.º 1
0
        private void toolStripButtonAddNew_Click(object sender, EventArgs e)
        {
            frmAddProductName addProduct = new frmAddProductName();

            if (addProduct.ShowDialog() == DialogResult.OK)
            {
                InitTv();
            }
        }
Exemplo n.º 2
0
        private void toolStripButtonEdit_Click(object sender, EventArgs e)
        {
            TreeNode node = tvList.SelectedNode;
            DataRow  row  = null;

            if (node != null && node.Tag is DataRow)
            {
                row = node.Tag as DataRow;
            }
            else
            {
                MessageBox.Show("只能修改产品或者服务名称节点,其他节点不能修改");
                return;
            }
            frmAddProductName addProduct = new frmAddProductName(row);

            if (addProduct.ShowDialog() == DialogResult.OK)
            {
                InitTv();
            }
        }