Example #1
0
        static void MenuOptions_GetEquipmentList()
        {
            Console.WriteLine("\nEquipment:");
            List <EquipmentDTO> lstEq = JMS_Commands.GetEquipment();

            if (lstEq != null)
            {
                lstEq.ForEach(j => PrintEquipment(j));
            }
            else
            {
                Console.WriteLine("No Results.");
            }
        }
Example #2
0
        static void MenuOptions_GetEquipment()
        {
            Console.Write("Please enter ID of Equipment:");
            string       idEq  = Console.ReadLine();
            EquipmentDTO dtoEq = JMS_Commands.GetEquipment(idEq);

            if (dtoEq != null)
            {
                PrintEquipment(dtoEq);
            }
            else
            {
                Console.WriteLine("No Results.");
            }
        }
Example #3
0
        static void MenuOptions_UpdateEquipment()
        {
            Console.Write("Please enter the id of the equipment item you would like to update:");
            EquipmentDTO equipment = JMS_Commands.GetEquipment(Console.ReadLine());

            Console.Write("Equipment to update:");
            PrintEquipment(equipment);

            Console.Write("Please enter updated name of Equipment to add:");
            equipment.Name = Console.ReadLine();

            Console.Write("Please enter updated manufacturer of equipment:");
            equipment.Manufacturer = Console.ReadLine();

            Console.Write("Please enter updated model of equipment:");
            equipment.Model = Console.ReadLine();

            JMS_Commands.UpdateEquipment(equipment);

            equipment = null;
            GC.Collect();
        }