public static void ShowProducts(Store store, Product product) { IEnumerable <Product> products = product.GetAllProducts(store); for (int i = 0; i < products.Count(); i++) { Product p1 = products.ElementAt(i); p1.PrintProduct(store); } Console.WriteLine(); }
public static void GetProductsLessThanSPrice(Store store, Product product) { Console.WriteLine("Enter a price number:"); int price = Convert.ToInt32(Console.ReadLine()); IEnumerable <Product> products1 = product.GetProductsLessThanSPrice(store, price); for (int i = 0; i < products1.Count(); i++) { Product p1 = products1.ElementAt(i); p1.PrintProduct(store); } }