public void SetOrder(CommandDemo command) { if (command.ToString() == "Demo.BakeChickenCommand") { Console.WriteLine("服务员:没有鸡翅!"); } else { orders.Add(command); Console.WriteLine("增加订单:" + command.ToString() + " 时间:" + DateTime.Now.ToString()); } }
public void CancelOrder(CommandDemo command) { orders.Remove(command); Console.WriteLine("取消订单:" + command.ToString() + " 时间:" + DateTime.Now.ToString()); }