private void addOrderToolStripMenuItem_Click(object sender, EventArgs e) { subMenu = MenuItems.AddOrder; OrdersForm ord = new OrdersForm(this, "ADDNEW"); ord.ShowDialog(); }
private void btnOK_Click(object sender, EventArgs e) { loadNewCheckListBox(); //Put value to Orders form (parent form) OrdersForm ordFrm = (OrdersForm)this.Owner; ordFrm.SendBuyProductsToParent(newBuyPros); this.Close(); }
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(); } }