示例#1
0
 private void deleteItem_Click(object sender, EventArgs e)
 {
     if (menuView.SelectedItems.Count > 0)
     {
         ListViewItem delItem = menuView.Items[menuView.SelectedItems[0].Index];
         RestaurantMenu.removeItemByItemID(delItem.SubItems[0].Text);
         delItem.Remove();
         itemIDText.Text       = "";
         itemNameText.Text     = "";
         itemPriceText.Text    = "";
         itemCategoryText.Text = "";
     }
 }