예제 #1
0
        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);
                }
            }
        }
예제 #2
0
        }//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
예제 #3
0
        }//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);
                }
            }
        }