Esempio n. 1
0
        private static void AddingTools()
        {
            Console.Clear();

            Tool NewTool = new Tool();

            Console.WriteLine("Please enter the tool");
            NewTool.Name = Console.ReadLine();

            Console.WriteLine("Quantity of tools");
            NewTool.Quantity = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("AvailableQuantity of tools");
            NewTool.AvailableQuantity = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Number of borrowings");
            NewTool.NoBorrowings = Convert.ToInt32(Console.ReadLine());

            int num = 0;

            Int32.TryParse(Console.ReadLine(), out num);


            //NewTool.AddTool();
            ToolCollection newToolCollection = new ToolCollection();

            newToolCollection.add(NewTool);

            MemberMenu();
        }
Esempio n. 2
0
 /// <summary>
 /// Add a tool to the member's borrowing tool collection
 /// </summary>
 /// <param name="aTool"> a Tool object</param>
 public void addTool(Tool aTool)
 {
     numOfBorrowingTools++;
     toolNames = resizeArray(toolNames);
     borrowedTools.add(aTool);
 }
 // method to add a tool to the library system
 public void add(Tool aTool)
 {
     Selected_Collection.add(aTool);
 }