华恒Mes鼎捷代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.1 KiB

5 months ago
  1. using System;
  2. using ICSSoft.Frame.DataConnect;
  3. using ICSSoft.Frame.Data.Entity;
  4. namespace ICSSoft.Frame.DataConnect.Action
  5. {
  6. /// <summary>
  7. /// Class1 ��ժҪ˵����
  8. /// </summary>
  9. public class ActionFactory
  10. {
  11. private FramDataContext _domainDataProvider = null;
  12. public ActionFactory(FramDataContext domainDataProvider)
  13. {
  14. this._domainDataProvider = domainDataProvider;
  15. }
  16. public FramDataContext DataProvider
  17. {
  18. get
  19. {
  20. return _domainDataProvider;
  21. }
  22. }
  23. public IAction CreateAction(string actionType)
  24. {
  25. switch (actionType)
  26. {
  27. case ActionType.DataCollectAction_GoMO:
  28. return new ActionGoToMO(this.DataProvider);
  29. case ActionType.DataCollectAction_GOOD:
  30. return new ActionGood(this.DataProvider);
  31. case ActionType.DataCollectAction_NG:
  32. return new ActionTS(this.DataProvider);
  33. }
  34. throw new Exception("$CS_Error_CreateAction_Failed");
  35. }
  36. }
  37. }