public override void Audit(ApplyContext context) { if (context.hour < 8) { context.AuditOk(); } else { this.NextAudit(context); } }
public override void Audit(ApplyContext context) { if (context.hour < 24) { Console.WriteLine("Mange 审核通过"); context.AuditOk(); } else { this.NextAudit(context); } }
public virtual void NextAudit(ApplyContext context) { if (_employee != null) { _employee.Audit(context); } else { context.adutit_msg = "审核拒绝"; context.audit = false; Console.WriteLine("审核拒绝"); } }
static void Main(string[] args) { ApplyContext context = new ApplyContext { hour = 35, name = "张三" }; StaffPeson peson = new StaffPeson(); Mange mange = new Mange(); Ceo ceo = new Ceo(); peson.SetLeader(mange); mange.SetLeader(ceo); peson.Audit(context); Console.ReadKey(); }
public abstract void Audit(ApplyContext context);