//static void Main(string[] args) //{ // Handler h1 = new ConcreteHandler1(); // Handler h2 = new ConcreteHandler2(); // Handler h3 = new ConcreteHandler3(); // h1.SetSuccessor(h2); // h2.SetSuccessor(h3); // int[] requests = { 2, 5, 14, 22, 18, 3, 27, 20 }; // foreach (int request in requests) // { // h1.HandleRequest(request); // } // Console.Read(); //} static void Main(string[] args) { CommonManager jinli = new CommonManager("经理"); MajorManager zongjian = new MajorManager("总监"); GeneralManager zongjinli = new GeneralManager("总监理"); jinli.SetSuperoir(zongjian); zongjian.SetSuperoir(zongjinli); Request request = new Request(); request.RequestType = "请假"; request.RequestContent = "小菜请假"; request.Number = 1; jinli.RequestApplications(request); Request request2 = new Request(); request2.RequestType = "请假"; request2.RequestContent = "小菜请假"; request2.Number = 4; jinli.RequestApplications(request2); Request request3 = new Request(); request3.RequestType = "加薪"; request3.RequestContent = "小菜请求加薪"; request3.Number = 400; jinli.RequestApplications(request3); Console.Read(); }
static void Main(string[] args) { CommonManager jinli = new CommonManager("金利"); Majordomo zongjian = new Majordomo("宗剑"); GeneralManager zhongjingli = new GeneralManager("钟精励"); jinli.SetSuperior(zongjian); zongjian.SetSuperior(zhongjingli); Request request = new Request(); request.RequestType = "请假"; request.RequestContent = "小菜请假"; request.Number = 1; jinli.RequestApplications(request); Request request2 = new Request(); request2.RequestType = "请假"; request2.RequestContent = "小菜请假"; request2.Number = 4; jinli.RequestApplications(request2); Request request3 = new Request(); request3.RequestType = "加薪"; request3.RequestContent = "小菜请求加薪"; request3.Number = 500; jinli.RequestApplications(request3); Request request4 = new Request(); request4.RequestType = "加薪"; request4.RequestContent = "小菜请求加薪"; request4.Number = 1000; jinli.RequestApplications(request4); Console.Read(); }
static void Main(string[] args) { CommonManager jinli = new CommonManager("金利"); Majordomo zongjian = new Majordomo("宗剑"); GeneralManager zhongjingli = new GeneralManager("钟精励"); jinli.SetSuperior(zongjian); zongjian.SetSuperior(zhongjingli); Request request = new Request(); request.RequestType = "请假"; request.RequestContent = "小菜请假"; request.Number = 1; jinli.RequestApplications(request); Request request2 = new Request(); request2.RequestType = "请假"; request2.RequestContent = "小菜请假"; request2.Number = 4; jinli.RequestApplications(request2); Request request3 = new Request(); request3.RequestType = "加薪"; request3.RequestContent = "小菜请求加薪"; request3.Number = 500; jinli.RequestApplications(request3); Request request4 = new Request(); request4.RequestType = "加薪"; request4.RequestContent = "小菜请求加薪"; request4.Number = 1000; jinli.RequestApplications(request4); Console.Read(); }