Example #1
0
 private void CEO_onPurchaseRequested(Employee e, PurchaseRequest p)
 {
     if (p.Amount < MAX_PURCHASE_APPROVAL)
     {
         ApprovePurchase(p);
     }
     else
     {
         if (Supervisor != null)
         {
             Supervisor.PurchaseRequested(this, p);
         }
     }
 }
Example #2
0
 public override void ApprovePurchase(PurchaseRequest purchaseRequest)
 {
     Console.WriteLine("Item : {0},  Amount: {1},  Approver: {2}", purchaseRequest.Item, purchaseRequest.Amount, "CEO");
 }
Example #3
0
 public abstract void ApprovePurchase(PurchaseRequest purchaseRequest);
Example #4
0
 public void RequestPurchase(PurchaseRequest p)
 {
     PurchaseRequested(this, p);
 }
 public override void ApprovePurchase(PurchaseRequest purchaseRequest)
 {
     Console.WriteLine("Purchase Id : {0} Amount: {1} Approver: {2}", purchaseRequest.Item, purchaseRequest.Amount, "Vice President");
 }