예제 #1
0
 void ButtonNewClick(object sender, EventArgs e)
 {
     using (CustomerDiscountedItemForm f = new CustomerDiscountedItemForm()) {
         if (WorkbenchSingleton.AddDialog(f) == DialogResult.OK)
         {
             customer.AddDiscountedItem(f.CustomerDiscountedItem);
         }
     }
 }
예제 #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();
             }
         }
     }
 }