Esempio n. 1
0
        public bool orderItem(string bookID, string userID)
        {
            Connect();
            Trace.WriteLine($"Connecting to Bank and Bookstore.");
            bookstore.ListAvailableItems();
            double amount = bookstore.GetItemPrice(bookID);

            Trace.WriteLine($"Book costs {amount}");
            bank.ListClients();
            bank.EnlistMoneyTranfer(userID, amount);
            Trace.WriteLine($"Money transefer completed.");
            bookstore.EnlistPurchase(bookID, 1);
            Trace.WriteLine($"Book is purchased.");


            return(true);
        }