EvaluationNormView.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.Linq;
  6. using System.Text;
  7. using EMIS.ViewModel.CacheManage;
  8. namespace EMIS.ViewModel.EvaluationManage.EvaluationTable
  9. {
  10. public class EvaluationNormView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [DisplayName("主键ID")]
  16. public Guid EvaluationNormID { get; set; }
  17. /// <summary>
  18. /// 评分标准
  19. /// </summary>
  20. [Required]
  21. [DisplayName("评分标准")]
  22. public string Name { get; set; }
  23. /// <summary>
  24. /// 评分类型
  25. /// </summary>
  26. [Required]
  27. [DisplayName("评分类型")]
  28. public int? NormTypeID { get; set; }
  29. /// <summary>
  30. /// 评分类型
  31. /// </summary>
  32. [DisplayName("评分类型")]
  33. public string NormTypeName
  34. {
  35. get
  36. {
  37. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_EvaluationNormType.ToString()).Where(x => x.Value == NormTypeID).Select(x => x.Name).FirstOrDefault();
  38. }
  39. }
  40. /// <summary>
  41. /// 满意权重
  42. /// </summary>
  43. [Required]
  44. [DisplayName("满意权重")]
  45. [RegularExpression(@"^\d+(\.\d{1})?$", ErrorMessage = "请输入整数或保留1位小数")]
  46. public decimal? SatisfyWeight { get; set; }
  47. /// <summary>
  48. /// 标准明细
  49. /// </summary>
  50. [DisplayName("标准明细")]
  51. public List<string> NormDetailList { get; set; }
  52. /// <summary>
  53. /// 标准明细(可存在多个标准--用顿号隔开)
  54. /// </summary>
  55. public string NormDetailListName
  56. {
  57. get
  58. {
  59. if (NormDetailList != null && NormDetailList.Count() > 0)
  60. {
  61. return string.Join("、", NormDetailList.Select(x => x));
  62. }
  63. else
  64. {
  65. return "无";
  66. }
  67. }
  68. }
  69. /// <summary>
  70. /// 备注
  71. /// </summary>
  72. [DisplayName("备注")]
  73. public string Remark { get; set; }
  74. /// <summary>
  75. /// 状态
  76. /// </summary>
  77. [DisplayName("状态")]
  78. public int? RecordStatus { get; set; }
  79. /// <summary>
  80. /// 创建人
  81. /// </summary>
  82. [DisplayName("创建人")]
  83. public Guid? CreateUserID { get; set; }
  84. /// <summary>
  85. /// 创建人
  86. /// </summary>
  87. [DisplayName("创建人")]
  88. public string CreateUserName { get; set; }
  89. /// <summary>
  90. /// 创建时间
  91. /// </summary>
  92. [DisplayName("创建时间")]
  93. public DateTime? CreateTime { get; set; }
  94. /// <summary>
  95. /// 修改人
  96. /// </summary>
  97. [DisplayName("修改人")]
  98. public Guid? ModifyUserID { get; set; }
  99. /// <summary>
  100. /// 修改人
  101. /// </summary>
  102. [DisplayName("修改人")]
  103. public string ModifyUserName { get; set; }
  104. /// <summary>
  105. /// 修改时间
  106. /// </summary>
  107. [DisplayName("修改时间")]
  108. public DateTime? ModifyTime { get; set; }
  109. }
  110. }