Beispiel #1
0
        private void button_Inventory_Click(object sender, EventArgs e)
        {
            Inventory_Manager partsList = new Inventory_Manager();

            // add items
            //partsList.addItem(item1);
            //partsList.addItem(item2);
            //partsList.addItem(item3);

            // display updated list
            //Console.WriteLine("!Updated Inventory List!");
            //partsList.displayInventory();

            // remove items
            //partsList.removeItem(item2);
            //partsList.removeItem(item3);

            // display updated list
            Console.WriteLine(" ");
            Console.WriteLine("!Updated Inventory List!");
            partsList.displayInventory();

            // restock items
            // partsList.restockItem(item, 20);

            // display updated list
            Console.WriteLine(" ");
            Console.WriteLine("!Updated Inventory List!");
            partsList.displayInventory();
        }
Beispiel #2
0
        private void button_Inventory_Click(object sender, EventArgs e)
        {
            // inventory objects
            Inventory item1 = new Inventory("Pilot", "20");
            Inventory item2 = new Inventory("Spline", "20");
            Inventory item3 = new Inventory("Oil Pan", "20");

            Inventory_Manager partsList = new Inventory_Manager();

            // add items
            partsList.addItem(item1);
            partsList.addItem(item2);
            partsList.addItem(item3);

            // display updated list
            Console.WriteLine("!Updated Inventory List!");
            partsList.displayInventory();

            // remove items
            partsList.removeItem(item2);
            partsList.removeItem(item3);

            // display updated list
            Console.WriteLine(" ");
            Console.WriteLine("!Updated Inventory List!");
            partsList.displayInventory();

            // restock items
            partsList.restockItem(item2, 20);

            // display updated list
            Console.WriteLine(" ");
            Console.WriteLine("!Updated Inventory List!");
            partsList.displayInventory();
        }