private void productAddButton_Click(object sender, EventArgs e) { this.Hide(); AddModifyProductScreen addModifyProductScreen = new AddModifyProductScreen(); ProdIndx = null; PartIndx = null; addModifyProductScreen.Show(); }
private void productModifyButton_Click(object sender, EventArgs e) { if (ProdIndx != null) { this.Hide(); AddModifyProductScreen addModifyProductScreen = new AddModifyProductScreen(Inventory.Products[(int)ProdIndx]); ProdIndx = null; PartIndx = null; addModifyProductScreen.Show(); } else { MessageBox.Show("Please select Product to Modify."); } }