private void addProductToolStripMenuItem_Click(object sender, EventArgs e) { subMenu = MenuItems.AddProduct; ProductsForm frm = new ProductsForm(this, "ADDNEW"); frm.ShowDialog(); }
private void dgv_CellClick(object sender, DataGridViewCellEventArgs e) { if (subMenu == MenuItems.Products || subMenu == MenuItems.AddProduct) { ItemSelected = dgvProducts.CurrentCell.RowIndex; ProductsForm frm = new ProductsForm(this, null); frm.ShowDialog(); } else if (subMenu == MenuItems.Orders || subMenu == MenuItems.AddOrder) { ItemSelected = dgvProducts.CurrentCell.RowIndex; OrdersForm ord = new OrdersForm(this, null); ord.ShowDialog(); } }