private void AddToolStripMenuItem_Click(object sender, EventArgs e) { if (treeView1.SelectedNode.Parent == null) { AddCategoryForm addForm = new AddCategoryForm(); addForm.Owner = this; addForm.Show(); } else if (treeView1.SelectedNode.Parent.Parent != null || treeView1.SelectedNode.Parent == categoryRootNode) { AddProductForm addForm = new AddProductForm(); addForm.Owner = this; addForm.Show(); } }
public void AddShow() { addProductForm.Show(); addProductEvents(); }