CommonEnumHelper.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using Ant.Service.Common.Enums;
  2. using Central.Control.Domain;
  3. using MES.Production.Service.ServiceImp;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Web;
  8. namespace ChangFa.Machinery.WebPage
  9. {
  10. public enum CommonCodeType
  11. {
  12. 运动分类,
  13. 裁判级别,
  14. 性别,
  15. 年级,
  16. 户籍性质,
  17. 学校大类,
  18. 学校小类,
  19. 运动类型,
  20. 组队参赛,
  21. 比赛编码,
  22. 赛事状态
  23. }
  24. public enum UserRoleType
  25. {
  26. /// <summary>
  27. /// 学校
  28. /// </summary>
  29. School = 0,
  30. /// <summary>
  31. /// 管理者
  32. /// </summary>
  33. Manage = 2
  34. }
  35. public class CommonEnumHelper
  36. {
  37. public static List<SYS_CODE> LoadDic(CommonCodeType CommonCodeType)
  38. {
  39. var codeTYpe = ClsDic.DicCodeType.Where(p => p.Key == CommonCodeType.ToString()).FirstOrDefault().Value;
  40. return new CodeManage().GetDicType().Where(p => p.CODETYPE == codeTYpe).ToList();
  41. }
  42. }
  43. }