EvaluationParticipateTypeView.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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 Bowin.Common.Mvc;
  8. using EMIS.ViewModel.CacheManage;
  9. namespace EMIS.ViewModel.EvaluationManage.EvaluationSetting
  10. {
  11. public class EvaluationParticipateTypeView
  12. {
  13. /// <summary>
  14. /// 主键ID
  15. /// </summary>
  16. [DisplayName("主键ID")]
  17. public Guid EvaluationParticipateTypeID { get; set; }
  18. /// <summary>
  19. /// 参评类型
  20. /// </summary>
  21. [Required]
  22. [DisplayName("参评类型")]
  23. public int? ParticipateTypeID { get; set; }
  24. /// <summary>
  25. /// 参评代码
  26. /// </summary>
  27. [DisplayName("参评代码")]
  28. public string ParticipateTypeCode
  29. {
  30. get
  31. {
  32. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_ParticipateType.ToString()).Where(x => x.Value == ParticipateTypeID).Select(x => x.Code).FirstOrDefault();
  33. }
  34. }
  35. /// <summary>
  36. /// 参评类型
  37. /// </summary>
  38. [DisplayName("参评类型")]
  39. public string ParticipateTypeName
  40. {
  41. get
  42. {
  43. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_ParticipateType.ToString()).Where(x => x.Value == ParticipateTypeID).Select(x => x.Name).FirstOrDefault();
  44. }
  45. }
  46. /// <summary>
  47. /// 学生用
  48. /// </summary>
  49. [DisplayName("学生用")]
  50. public bool IsStudent { get; set; }
  51. /// <summary>
  52. /// 学生用
  53. /// </summary>
  54. [DisplayName("学生用")]
  55. public string IsStudentName
  56. {
  57. get { return this.IsStudent == true ? "是" : "否"; }
  58. }
  59. /// <summary>
  60. /// 可评次数
  61. /// </summary>
  62. [Required]
  63. [DisplayName("可评次数")]
  64. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  65. public int? Number { get; set; }
  66. /// <summary>
  67. /// 开始时间
  68. /// </summary>
  69. [Required]
  70. [DisplayName("开始时间")]
  71. [DataType(DataType.DateTime)]
  72. public DateTime? StartTime { get; set; }
  73. /// <summary>
  74. /// 结束时间
  75. /// </summary>
  76. [Required]
  77. [DisplayName("结束时间")]
  78. [DataType(DataType.DateTime)]
  79. [DateTimeNotLessThan("StartTime", "开始时间")]
  80. public DateTime? EndTime { get; set; }
  81. /// <summary>
  82. /// 备注
  83. /// </summary>
  84. [DisplayName("备注")]
  85. public string Remark { get; set; }
  86. /// <summary>
  87. /// 状态
  88. /// </summary>
  89. [DisplayName("状态")]
  90. public int? RecordStatus { get; set; }
  91. /// <summary>
  92. /// 创建人
  93. /// </summary>
  94. [DisplayName("创建人")]
  95. public Guid? CreateUserID { get; set; }
  96. /// <summary>
  97. /// 创建人
  98. /// </summary>
  99. [DisplayName("创建人")]
  100. public string CreateUserName { get; set; }
  101. /// <summary>
  102. /// 创建时间
  103. /// </summary>
  104. [DisplayName("创建时间")]
  105. public DateTime? CreateTime { get; set; }
  106. /// <summary>
  107. /// 修改人
  108. /// </summary>
  109. [DisplayName("修改人")]
  110. public Guid? ModifyUserID { get; set; }
  111. /// <summary>
  112. /// 修改人
  113. /// </summary>
  114. [DisplayName("修改人")]
  115. public string ModifyUserName { get; set; }
  116. /// <summary>
  117. /// 修改时间
  118. /// </summary>
  119. [DisplayName("修改时间")]
  120. public DateTime? ModifyTime { get; set; }
  121. }
  122. }