private static void InventoryValue() { ProductInventory myInventory; while (true) { try { myInventory = new ProductInventory(); myInventory.LoadInventory(); Console.WriteLine($"\nThe total value of goods on hand is: {myInventory.ValueOfGoodsOnHand().ToString("C2")}"); break; } catch (Exception ex) { Console.WriteLine("\n****** ERROR: " + ex.Message); } } }
}//END OF PRODUCT INPUT private static void InventoryCount() { ProductInventory myInventory; while (true) { try { myInventory = new ProductInventory(); myInventory.LoadInventory(); Console.WriteLine($"\n****** There are {myInventory.GetNumberOfProducts()} types of products in inventory. ******"); break; } catch (Exception ex) { Console.WriteLine("\n****** ERROR: " + ex.Message); } } }//END OF INVENTORY COUNT
}//END OF INVENTORY COUNT private static void InventorySearch() { ProductInventory myInventory; while (true) { try { myInventory = new ProductInventory(); myInventory.LoadInventory(); Console.WriteLine($"\n****** The search results are below: \n{myInventory.GetSearchProducts()}"); break; } catch (Exception ex) { Console.WriteLine("\n****** ERROR: " + ex.Message); } } }