Esempio n. 1
0
 public virtual void Pay(string a_cardNumber, string a_cardOwner)
 {
     if (Status != OrderStatus.Unpaid)
      {
     throw new InvalidOrderOperationException(string.Format("The order can not be paid because it is {0}.",
                                                            Status.ToString().ToLower()));
      }
      Status = OrderStatus.Paid;
      Payment = new Payment {CardOwner = a_cardOwner, CreditCardNumber = a_cardNumber};
 }