EvaluationTableView.cs 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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 EvaluationTableView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [DisplayName("主键ID")]
  16. public Guid EvaluationTableID { 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 Name { get; set; }
  30. /// <summary>
  31. /// 参评类型ID
  32. /// </summary>
  33. [Required]
  34. [DisplayName("参评类型ID")]
  35. public Guid? EvaluationParticipateTypeID { get; set; }
  36. /// <summary>
  37. /// 参评类型
  38. /// </summary>
  39. [DisplayName("参评类型")]
  40. public int? ParticipateTypeID { get; set; }
  41. /// <summary>
  42. /// 参评代码
  43. /// </summary>
  44. [DisplayName("参评代码")]
  45. public string ParticipateTypeCode
  46. {
  47. get
  48. {
  49. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_ParticipateType.ToString()).Where(x => x.Value == ParticipateTypeID).Select(x => x.Code).FirstOrDefault();
  50. }
  51. }
  52. /// <summary>
  53. /// 参评类型
  54. /// </summary>
  55. [DisplayName("参评类型")]
  56. public string ParticipateTypeName
  57. {
  58. get
  59. {
  60. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_ParticipateType.ToString()).Where(x => x.Value == ParticipateTypeID).Select(x => x.Name).FirstOrDefault();
  61. }
  62. }
  63. /// <summary>
  64. /// 学生用
  65. /// </summary>
  66. [DisplayName("学生用")]
  67. public bool IsStudent { get; set; }
  68. /// <summary>
  69. /// 学生用
  70. /// </summary>
  71. [DisplayName("学生用")]
  72. public string IsStudentName
  73. {
  74. get { return this.IsStudent == true ? "是" : "否"; }
  75. }
  76. /// <summary>
  77. /// 评价类型ID
  78. /// </summary>
  79. [Required]
  80. [DisplayName("评价类型ID")]
  81. public Guid? EvaluationTypeID { get; set; }
  82. /// <summary>
  83. /// 评价类型编号
  84. /// </summary>
  85. [DisplayName("评价类型编号")]
  86. public string EvaluationTypeCode { get; set; }
  87. /// <summary>
  88. /// 评价类型
  89. /// </summary>
  90. [DisplayName("评价类型")]
  91. public string EvaluationTypeName { get; set; }
  92. /// <summary>
  93. /// 授课方式
  94. /// </summary>
  95. [DisplayName("授课方式")]
  96. public List<int?> TeachingModeIDList { get; set; }
  97. /// <summary>
  98. /// 授课方式(可存在多个授课方式--用顿号隔开)
  99. /// </summary>
  100. [DisplayName("授课方式")]
  101. public string TeachingModeIDListName
  102. {
  103. get
  104. {
  105. if (TeachingModeIDList != null && TeachingModeIDList.Count() > 0)
  106. {
  107. return string.Join("、", TeachingModeIDList.Select(x => IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMode.ToString()).Where(w => w.Value == x).Select(w => w.Name).FirstOrDefault()));
  108. }
  109. else
  110. {
  111. return "";
  112. }
  113. }
  114. }
  115. /// <summary>
  116. /// 权重
  117. /// </summary>
  118. [Required]
  119. [DisplayName("权重")]
  120. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  121. public int? Weight { get; set; }
  122. /// <summary>
  123. /// 指标个数
  124. /// </summary>
  125. [DisplayName("指标个数")]
  126. public int? TargetCount { get; set; }
  127. /// <summary>
  128. /// 项目个数
  129. /// </summary>
  130. [DisplayName("项目个数")]
  131. public int? ProjectCount { get; set; }
  132. /// <summary>
  133. /// 是否启用
  134. /// </summary>
  135. [DisplayName("是否启用")]
  136. public bool IsEnabled { get; set; }
  137. /// <summary>
  138. /// 是否启用
  139. /// </summary>
  140. [DisplayName("是否启用")]
  141. public string IsEnabledName
  142. {
  143. get { return this.IsEnabled == true ? "是" : "否"; }
  144. }
  145. /// <summary>
  146. /// 备注
  147. /// </summary>
  148. [DisplayName("备注")]
  149. public string Remark { get; set; }
  150. /// <summary>
  151. /// 状态
  152. /// </summary>
  153. [DisplayName("状态")]
  154. public int? RecordStatus { get; set; }
  155. /// <summary>
  156. /// 创建人
  157. /// </summary>
  158. [DisplayName("创建人")]
  159. public Guid? CreateUserID { get; set; }
  160. /// <summary>
  161. /// 创建人
  162. /// </summary>
  163. [DisplayName("创建人")]
  164. public string CreateUserName { get; set; }
  165. /// <summary>
  166. /// 创建时间
  167. /// </summary>
  168. [DisplayName("创建时间")]
  169. public DateTime? CreateTime { get; set; }
  170. /// <summary>
  171. /// 修改人
  172. /// </summary>
  173. [DisplayName("修改人")]
  174. public Guid? ModifyUserID { get; set; }
  175. /// <summary>
  176. /// 修改人
  177. /// </summary>
  178. [DisplayName("修改人")]
  179. public string ModifyUserName { get; set; }
  180. /// <summary>
  181. /// 修改时间
  182. /// </summary>
  183. [DisplayName("修改时间")]
  184. public DateTime? ModifyTime { get; set; }
  185. }
  186. }