private void AddNewToolStripMenuItem_Click(object sender, EventArgs e) { panelMainContainer.Controls.Clear(); CreateProductForm productForm = new CreateProductForm(); productForm.TopLevel = false; panelMainContainer.Controls.Add(productForm); productForm.Show(); }
private void AddBtn_Click(object sender, EventArgs e) { CreateProductForm createProductForm = new CreateProductForm(); if (createProductForm.ShowDialog() == DialogResult.OK) { ProductList.Items.Add(createProductForm.Product); } }