EvaluationNeedView.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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.EvaluationSetting
  9. {
  10. public class EvaluationNeedView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [DisplayName("主键ID")]
  16. public Guid EvaluationNeedID { get; set; }
  17. /// <summary>
  18. /// 编号
  19. /// </summary>
  20. [Required]
  21. [DisplayName("编号")]
  22. [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入数字或英文字母")]
  23. public string Code { get; set; }
  24. /// <summary>
  25. /// 标题
  26. /// </summary>
  27. [Required]
  28. [DisplayName("标题")]
  29. public string Title { get; set; }
  30. /// <summary>
  31. /// 参评类型
  32. /// </summary>
  33. [Required]
  34. [DisplayName("参评类型")]
  35. public int? ParticipateTypeID { get; set; }
  36. /// <summary>
  37. /// 参评类型
  38. /// </summary>
  39. [DisplayName("参评类型")]
  40. public string ParticipateTypeName
  41. {
  42. get
  43. {
  44. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_ParticipateType.ToString()).Where(x => x.Value == ParticipateTypeID).Select(x => x.Name).FirstOrDefault();
  45. }
  46. }
  47. /// <summary>
  48. /// 内容
  49. /// </summary>
  50. [Required]
  51. [DisplayName("内容")]
  52. public string Content { get; set; }
  53. /// <summary>
  54. /// 是否启用
  55. /// </summary>
  56. [DisplayName("是否启用")]
  57. public bool IsEnabled { get; set; }
  58. /// <summary>
  59. /// 是否启用
  60. /// </summary>
  61. [DisplayName("是否启用")]
  62. public string IsEnabledName
  63. {
  64. get { return this.IsEnabled == true ? "是" : "否"; }
  65. }
  66. /// <summary>
  67. /// 备注
  68. /// </summary>
  69. [DisplayName("备注")]
  70. public string Remark { get; set; }
  71. /// <summary>
  72. /// 状态
  73. /// </summary>
  74. [DisplayName("状态")]
  75. public int? RecordStatus { get; set; }
  76. /// <summary>
  77. /// 创建人
  78. /// </summary>
  79. [DisplayName("创建人")]
  80. public Guid? CreateUserID { get; set; }
  81. /// <summary>
  82. /// 创建人
  83. /// </summary>
  84. [DisplayName("创建人")]
  85. public string CreateUserName { get; set; }
  86. /// <summary>
  87. /// 创建时间
  88. /// </summary>
  89. [DisplayName("创建时间")]
  90. public DateTime? CreateTime { get; set; }
  91. /// <summary>
  92. /// 修改人
  93. /// </summary>
  94. [DisplayName("修改人")]
  95. public Guid? ModifyUserID { get; set; }
  96. /// <summary>
  97. /// 修改人
  98. /// </summary>
  99. [DisplayName("修改人")]
  100. public string ModifyUserName { get; set; }
  101. /// <summary>
  102. /// 修改时间
  103. /// </summary>
  104. [DisplayName("修改时间")]
  105. public DateTime? ModifyTime { get; set; }
  106. }
  107. }