WorkflowService.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using wispro.sp.entity.workflowDefine;
  6. namespace wispro.sp.web.Services
  7. {
  8. public class WorkflowService
  9. {
  10. private List<BindObjectType> bindObjectTypes = new List<BindObjectType>()
  11. {
  12. new BindObjectType(){ Name ="绩效记录",ObjectTypeFullName = typeof(wispro.sp.entity.PerformanceItem).FullName},
  13. new BindObjectType(){ Name ="人员",ObjectTypeFullName = typeof(wispro.sp.entity.Staff).FullName}
  14. };
  15. public List<BindObjectType> GetBindObjects()
  16. {
  17. return bindObjectTypes;
  18. }
  19. public string GetBindObjectName(string ObjectTypeFullName)
  20. {
  21. var retObj = bindObjectTypes.FirstOrDefault<BindObjectType>(b => b.ObjectTypeFullName == ObjectTypeFullName);
  22. if(retObj != null)
  23. {
  24. return retObj.Name;
  25. }
  26. else
  27. {
  28. return "";
  29. }
  30. }
  31. }
  32. }