Beispiel #1
0
 public void Process(Order order)
 {
     Console.WriteLine("订单开始受理!");
     if (order.Minute < 30 && order.IsCancel)
     {
         Console.WriteLine("您有半个小时的时间可以取消订单!");
         order.SetState(new CancelOrder());
         order.Action();
     }
     order.SetState(new AcceptAndDeliver());
     order.TaskFinished = false;
     order.Action();
 }
Beispiel #2
0
 public void Process(Order order)
 {
     Console.WriteLine("我们开始受理,准备备货!");
     if (order.Minute < 30 && order.IsCancel)
     {
         Console.WriteLine("接受半个小时之内,可以取消订单!");
         order.SetState(new CancelOrder());
         order.TaskFinished = true;
         order.Action();
     }
     order.SetState(new AcceptAndDeliver());
     order.TaskFinished = false;
     order.Action();
 }
Beispiel #3
0
 public void Process(Order order)
 {
     if (order.Minute < 30 && order.IsCancel)
     {
         Console.WriteLine("您有半个小时的时间可以取消订单!");
         order.SetState(new CancelOrder());
         order.Action();
     }
     if (order.TaskFinished == false)
     {
         Console.WriteLine("我们货物已经准备好,可以发货了,不可以撤销订单!");
         order.SetState(new ConfirmationReceipt());
         order.Action();
     }
 }
Beispiel #4
0
 public void Process(Order order)
 {
     Console.WriteLine("订单结算");
     order.SetState(new ConfirmationReceipt());
     order.TaskFinished = true;
     order.Action();
 }
Beispiel #5
0
 public void Process(Order order)
 {
     Console.WriteLine("我们货物已经准备好,可以发货了,不可以撤销订单!");
     if (order.Minute < 30 && order.IsCancel)
     {
         Console.WriteLine("接受半个小时之内,可以取消订单!");
         order.SetState(new CancelOrder());
         order.TaskFinished = true;
         order.Action();
     }
     if (order.TaskFinished == false)
     {
         order.SetState(new Success());
         order.Action();
     }
 }
Beispiel #6
0
 public void Process(Order order)
 {
     Console.WriteLine("检查货物,有问题,取消订单!");
     order.SetState(new CancelOrder());
     order.TaskFinished = true;
     order.Action();
 }
Beispiel #7
0
 public void Process(Order order)
 {
     Console.WriteLine("检查货物,没问题可以就可以签收!");
     order.SetState(new Success());
     order.TaskFinished = false;
     order.Action();
 }