Exemplo n.º 1
0
 void ButtonNewClick(object sender, EventArgs e)
 {
     using (CustomerDiscountedItemForm f = new CustomerDiscountedItemForm()) {
         if (WorkbenchSingleton.AddDialog(f) == DialogResult.OK)
         {
             customer.AddDiscountedItem(f.CustomerDiscountedItem);
         }
     }
 }
Exemplo n.º 2
0
 void ButtonEditClick(object sender, EventArgs e)
 {
     if (listView1.SelectedItems.Count > 0)
     {
         CustomerDiscountedItem item = customer.DiscountedItems[listView1.SelectedItems[0].Index];
         using (CustomerDiscountedItemForm f = new CustomerDiscountedItemForm(item)) {
             if (WorkbenchSingleton.AddDialog(f) == DialogResult.OK)
             {
                 DiscountedItemsChanged();
             }
         }
     }
 }