private void ShowProductFormClosed(object sender, FormClosedEventArgs e) { if (currentItem.ProductID != 0) { currentItem.Quantity = 0; AddProductToInvoiceForm form = new AddProductToInvoiceForm(currentItem); form.FormClosed += AddProductToInviceFormClosed; form.ShowDialog(); } }
private void EditProduct() { if (listView1.SelectedItems.Count > 0) { currentItem = (InvoiceItem)listView1.SelectedItems[0].Tag; AddProductToInvoiceForm form = new AddProductToInvoiceForm(currentItem); form.FormClosed += EditFormClosed; form.ShowDialog(); } }