ProductCategory.cs 746 B

123456789101112131415161718192021222324252627282930
  1. using System.Collections.Generic;
  2. namespace BizCom.Enum
  3. {
  4. public class ProductCategory
  5. {
  6. public const int xianHuo = 1,//现货类
  7. dingZhi = 2,//定制类
  8. dianZiWenJian = 3;//电子文件
  9. static Dictionary<int, string> map = null;
  10. static ProductCategory()
  11. {
  12. if (map == null)
  13. {
  14. map = new Dictionary<int, string>();
  15. map.Add(ProductCategory.xianHuo, "现货类");
  16. map.Add(ProductCategory.dingZhi, "定制类");
  17. map.Add(ProductCategory.dianZiWenJian, "电子文件");
  18. }
  19. }
  20. public static string getText(int value)
  21. {
  22. return map[value];
  23. }
  24. }
  25. }