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

                AddProductToInvoiceForm form = new AddProductToInvoiceForm(currentItem);
                form.FormClosed += EditFormClosed;
                form.ShowDialog();
            }
        }