private void RedirectTo(Item chosenItem) { switch (chosenItem.Name) { case "Burgers": Item[] burgers = new BurgerService().Items; ShowMenu(burgers, true); TakeChoiceFromPassedMenu(burgers); break; case "Refreshments": Item[] refreshments = new RefreshmentsService().Items; ShowMenu(refreshments, true); TakeChoiceFromPassedMenu(refreshments); break; case "Nothing thanks": if (order.OrderItems.Count == 0) { Messages.PressAnyKeyToContinue("Get out if you're not a customer, please."); } else { Messages.PressAnyKeyToContinue("Good Bye then"); } break; default: order.AddItem(chosenItem); OrderMessages.Summary(order); if (OrderMessages.IsThatAll()) { OrderMessages.Summary(order); OrderMessages.ThankYouForOrder(); BeginingOfService(); } else { BeginingOfService(); } break; } }
private void CheckPlease() { Messages.Display($"Your order is {order.TotalPrice()}", true); OrderMessages.Summary(order); Messages.PressAnyKeyToContinue(); }