private void btnPMAddProduct_Click(object sender, EventArgs e) { ProductInformation formPI = new ProductInformation(pm, true, null); formPI.FormClosed += new FormClosedEventHandler(ProductInformationClosed); formPI.ShowDialog(); }
private void btnPMEditSelectedLV_Click(object sender, EventArgs e) { if (lvPMProducts.SelectedItems.Count > 0) { Product selectedProduct = (Product)lvPMProducts.SelectedItems[0].Tag; ProductInformation formPI = new ProductInformation(pm, false, selectedProduct); formPI.FormClosed += new FormClosedEventHandler(ProductInformationClosed); formPI.ShowDialog(); } else { MessageBox.Show("Please select a product first"); } }