RelationClass.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using MySystem.MainModels;
  5. namespace MySystem
  6. {
  7. public class RelationClass
  8. {
  9. public static string GetUserLevelSetInfo(int key)
  10. {
  11. UserLevelSet item = UserLevelSetDbconn.Instance.GetList().FirstOrDefault(m => m.Id == key);
  12. if (item != null)
  13. {
  14. return item.Name;
  15. }
  16. return "K1";
  17. }
  18. public static string GetUsersInfo(int key)
  19. {
  20. Users item = UsersDbconn.Instance.Get(key) ?? new Users();
  21. return item.RealName;
  22. }
  23. public static string GetConsumersInfo(int key)
  24. {
  25. Consumers item = ConsumersDbconn.Instance.Get(key) ?? new Consumers();
  26. return item.NickName;
  27. }
  28. #region 获取产品名称
  29. public static string GetKqProductBrandInfo(int key)
  30. {
  31. WebCMSEntities db = new WebCMSEntities();
  32. KqProducts pro = db.KqProducts.FirstOrDefault(m => m.Id == key);
  33. db.Dispose();
  34. if (pro != null)
  35. {
  36. return pro.Name;
  37. }
  38. return "";
  39. }
  40. #endregion
  41. #region 收支明细变动类型
  42. public static string GetChangeTypeInfo(int key)
  43. {
  44. if (key == 1) return "达标奖励";
  45. return "";
  46. }
  47. #endregion
  48. #region 机具类型
  49. public static string GetPosSnTypeInfo(int key)
  50. {
  51. if (key == 0) return "兑换码";
  52. if (key == 1) return "循环码";
  53. return "";
  54. }
  55. #endregion
  56. #region 订单状态
  57. public static string GetOrderStatusInfo(int key)
  58. {
  59. if (key == 0) return "待付款";
  60. if (key == 1) return "待发货";
  61. if (key == 2) return "已完成";
  62. if (key == 3) return "已发货";
  63. return "";
  64. }
  65. #endregion
  66. #region 机具兑换申请状态
  67. public static string GetMachineApplyStatusInfo(int key)
  68. {
  69. if (key == 0) return "待审核";
  70. if (key == 1) return "申请成功";
  71. if (key == 2) return "申请失败";
  72. return "";
  73. }
  74. #endregion
  75. #region 组队申请状态
  76. public static string GetTeamOfferApplyStatusInfo(int key)
  77. {
  78. if (key == 0) return "待审核";
  79. if (key == 1) return "审核通过";
  80. if (key == 2) return "审核失败";
  81. if (key == 3) return "组队成功";
  82. if (key == 4) return "组队失败";
  83. return "";
  84. }
  85. #endregion
  86. #region 商户激活类型
  87. public static string GetMerchantActTypeInfo(int key)
  88. {
  89. if (key == 0) return "正常激活";
  90. if (key == 1) return "首次已激活MPOS";
  91. if (key == 2) return "首次已激活KPOS";
  92. if (key == 3) return "循环机划拨激活";
  93. return "";
  94. }
  95. #endregion
  96. }
  97. }