Пример #1
0
 public void VicePresidentRequest(Approver approver,
                                  PurchaseEventArgs e)
 {
     if (e.Amount < 25000.0)
     {
         Console.WriteLine("{0} approved request# {1}",
                           GetType().Name, e.Number);
     }
     else if (successor != null)
     {
         successor.OnPurchase(e);
     }
 }
Пример #2
0
 public void PresidentRequest(
     Approver approver,
     PurchaseEventArgs e)
 {
     if (e.Amount < 100000.0)
     {
         Console.WriteLine(
             "{0} approved request# {1}",
             GetType().Name,
             e.Number
             );
     }
     else
     {
         Console.WriteLine(
             "Request# {0} requires an executive meeting!",
             e.Number);
     }
 }