Program.cs 863 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace ChainOfResponsibility
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. PurchaseBill bill = new PurchaseBill()
  13. {
  14. BilNo = "CGDD001",
  15. MaterialName = "惠普电脑",
  16. Qty = 50,
  17. Price = 5000,
  18. BillMaker = new Purchaser("采购员--小责")
  19. //BillMaker = new Manager("经理--任经理")
  20. //BillMaker = new CEO("CEO--链总")
  21. };
  22. Console.WriteLine(string.Format("创建采购申请单:{0};申请购买{1}台{2}", bill.BilNo, bill.Qty, bill.MaterialName));
  23. bill.BillMaker.HandleBill(bill);
  24. Console.ReadLine();
  25. }
  26. }
  27. }