Exemplo n.º 1
0
 private void View_ClearCart(object arg1, EventArgs arg2)
 {
     for (int i = 0; i < products.ReturnProductos().Count; i++)
     {
         for (int j = 0; j < cart.ReturnCart().Count; j++)
         {
             if (cart.ReturnProductFromCart(j).Name == products.ReturnProduct(i).Name)
             {
                 ++products.ReturnProduct(i).Quantity;
             }
         }
     }
     cart.Cost = 0;
     cart.ClearCart();
 }