예제 #1
0
 public bool DeleteProduct(int ID)
 {
     foreach (Product Cand in ListOfProducts)
     {
         if (Cand.GetID() == ID)
         {
             ListOfProducts.Remove(Cand);
             return(true);
         }
     }
     return(false);
 }
예제 #2
0
 public bool DeleteItem(int ID)
 {
     foreach (Item Cand in ListOfItems)
     {
         if (Cand.GetID() == ID)
         {
             ListOfItems.Remove(Cand);
             return(true);
         }
     }
     return(false);
 }