Example #1
0
        private static void DisplayCustomerOrderHistory()
        {
            // List all registered customers
            CustomerLogic customerLogic            = new CustomerLogic();
            var           listAllCustomersResponse = customerLogic.GetCustomerList();

            Console.WriteLine(listAllCustomersResponse.Text + "\n");

            // TODO: validate if user exists
            // Prompt user to select customer
            Console.WriteLine("From the list above please enter the name of the customer whose order history you wish to view");
            string usernameInput = Console.ReadLine();

            // Show results

            OrderLogic orderLogic = new OrderLogic();

            Console.WriteLine(orderLogic.FindOrdersByCustomerNamePacket(usernameInput).Text);
        }