private void addItemToOrder(food_type item) { if (order == null) { order = new Order(); } order.AddItem(new OrderItem(item)); }
public OrderItem(food_type item) { item_type = item; switch (item) { case food_type.BigTasty: itemName = "Биг тейсти"; break; case food_type.CocaCola: itemName = "Кока-кола"; break; case food_type.Free: itemName = "Картошка 'фри'"; break; case food_type.IceCream: itemName = "Мороженое"; break; } }