public override void ValidatePurchaseOrder(PurchaseOrder purchase) { if (purchase.Name == "Pizzas") { purchase.HasbeenValidated = true; } else if (Supervisor != null) { Supervisor.ValidatePurchaseOrder(purchase); } }
public override void ValidatePurchaseOrder(PurchaseOrder purchase) { if (purchase.Price < 2500) { Console.WriteLine("{0} approved purchase request #{1}", this.GetType().Name, purchase.RequestNumber); purchase.HasbeenValidated = true; } else if (Supervisor != null) { Supervisor.ValidatePurchaseOrder(purchase); } }