Beispiel #1
0
        private void CustomerOptions()
        {
            int choice = 0;

            while (choice <= 5)
            {
                Console.WriteLine("----------------------");
                Console.WriteLine("1.Shop");
                Console.WriteLine("2.View Cart");
                Console.WriteLine("3.Check Order status");
                Console.WriteLine("4.Change account Information");
                Console.WriteLine("5.Return Product");
                Console.WriteLine("6.Logout");
                Console.WriteLine("-----------------------");
                choice = Convert.ToInt32(Console.ReadLine());
                switch (choice)
                {
                case 1:

                    _ProductHandler.DisplayProduct();
                    _CartHandler.AddToCart(_ProductHandler);

                    break;

                case 2:
                    int cartVAlue = _CartHandler.ShowCart();
                    if (cartVAlue == 1)
                    {
                        _CustomerHandler.CustomerCheckout(_SalesPersonHandler, _CourierServiceHandler);
                    }
                    break;

                case 3: int orderValue = _SalesPersonHandler.ShowOrderStatus();
                    if (orderValue == 1)
                    {
                        _CourierServiceHandler.Deliver(_Customer._Address);
                    }
                    break;

                case 4:
                    _CustomerHandler.UpdateCustomerInformation(_Customer);
                    break;

                case 5:
                    _SalesPersonHandler.ReturnItem(_CourierServiceHandler);
                    break;

                default: break;
                }
            }
        }