Exemplo n.º 1
0
 public override void ProcessRequest(LeaveRequest request)
 {
     if (request.Days <= 5)
     {
         Console.WriteLine(Name + "同意" + request.Name + "请假" + request.Days + "天");
     }
     else
     {
         NextApprover?.ProcessRequest(request);
     }
 }
Exemplo n.º 2
0
 public override void ProcessRequest(PurchaseRequest request)
 {
     if (request.Price < 10000)
     {
         Console.WriteLine($"the {this}-{Name} is Purchasing");
     }
     else
     {
         NextApprover?.ProcessRequest(request);
     }
 }
Exemplo n.º 3
0
 public override void ProcessRequest(PurchaseRequest request)
 {
     if (request.Amount > 10000 && request.Amount <= 50000)
     {
         Console.WriteLine("{0}财务经理批准了对原材料{1}的采购计划", Name, request.ProductName);
     }
     else if (NextApprover != null)
     {
         NextApprover.ProcessRequest(request);
     }
 }
Exemplo n.º 4
0
 public override void ProcessRequest(PurchaseRequest request)
 {
     if (request.Amount < 10000)
     {
         Console.WriteLine("{0}-{1} approved the request of purshing {2}", this.GetType().Name, Name, request.ProductName);
     }
     else if (NextApprover != null)
     {
         NextApprover.ProcessRequest(request);
     }
 }
Exemplo n.º 5
0
 public override void ProcessRequest(PurchaseOrder purchase)
 {
     if (purchase.Price < 1000)
     {
         Console.WriteLine("{0} approved purchase request #{1}",
                           this.GetType().Name, purchase.RequestNumber);
     }
     else if (NextApprover != null)
     {
         NextApprover.ProcessRequest(purchase);
     }
 }
Exemplo n.º 6
0
 public override void ProcessRequest(PurchaseRequest request)
 {
     //小于一万项目组长可以直接审批
     if (request.Amount < 10000.00)
     {
         Console.WriteLine($"{this}-{Name} approved the request of purshing{request.ProductName}");
     }
     //不小于一万且项目组长有上级,则请求由上级批准
     else if (NextApprover != null)
     {
         NextApprover.ProcessRequest(request);
     }
 }
Exemplo n.º 7
0
 public override bool ProcessRequest(AuditContext request)
 {
     if (request.LeaveTime < 14)
     {
         System.Console.WriteLine("{0}-{1} approved the request of Leave {2}", this, Name, request.Name);
     }
     else if (NextApprover != null)
     {
         System.Console.WriteLine("Manager Said:Sorry,I will commit it to Manager,I only handle limit 14");
         return(NextApprover.ProcessRequest(request));
     }
     return(true);
 }
Exemplo n.º 8
0
 public override void ProcessRequest(PurchaseRequest request)
 {
     //审批条件
     if (request.Amount <= 10000)
     {
         Console.WriteLine("{0}部门经理批准了对原材料{1}的采购计划", Name, request.ProductName);
     }
     //审批条件不满足的话,下个审批人不为空就到下个审批人审核
     else if (NextApprover != null)
     {
         NextApprover.ProcessRequest(request);
     }
 }