EvaluationTargetView.cs 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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 EvaluationTargetView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [DisplayName("主键ID")]
  16. public Guid EvaluationTargetID { get; set; }
  17. /// <summary>
  18. /// 次序
  19. /// </summary>
  20. [Required]
  21. [DisplayName("次序")]
  22. [RegularExpression(@"^[1-9]\d*|0$", ErrorMessage = "请输入自然数")]
  23. public int? OrderNo { get; set; }
  24. /// <summary>
  25. /// 指标编号
  26. /// </summary>
  27. [Required]
  28. [DisplayName("指标编号")]
  29. [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入数字或英文字母")]
  30. public string Code { get; set; }
  31. /// <summary>
  32. /// 指标名称
  33. /// </summary>
  34. [Required]
  35. [DisplayName("指标名称")]
  36. public string Name { get; set; }
  37. /// <summary>
  38. /// 评价表ID
  39. /// </summary>
  40. [Required]
  41. [DisplayName("评价表ID")]
  42. public Guid? EvaluationTableID { get; set; }
  43. /// <summary>
  44. /// 评价表编号
  45. /// </summary>
  46. [DisplayName("评价表编号")]
  47. public string EvaluationTableCode { get; set; }
  48. /// <summary>
  49. /// 评价表名
  50. /// </summary>
  51. [DisplayName("评价表名")]
  52. public string EvaluationTableName { get; set; }
  53. /// <summary>
  54. /// 评价表权重
  55. /// </summary>
  56. [DisplayName("评价表权重")]
  57. public decimal? EvaluationTableWeight { get; set; }
  58. /// <summary>
  59. /// 参评类型ID
  60. /// </summary>
  61. [DisplayName("参评类型ID")]
  62. public Guid? EvaluationParticipateTypeID { get; set; }
  63. /// <summary>
  64. /// 参评类型
  65. /// </summary>
  66. [DisplayName("参评类型")]
  67. public int? ParticipateTypeID { get; set; }
  68. /// <summary>
  69. /// 参评代码
  70. /// </summary>
  71. [DisplayName("参评代码")]
  72. public string ParticipateTypeCode
  73. {
  74. get
  75. {
  76. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_ParticipateType.ToString()).Where(x => x.Value == ParticipateTypeID).Select(x => x.Code).FirstOrDefault();
  77. }
  78. }
  79. /// <summary>
  80. /// 参评类型
  81. /// </summary>
  82. [DisplayName("参评类型")]
  83. public string ParticipateTypeName
  84. {
  85. get
  86. {
  87. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_ParticipateType.ToString()).Where(x => x.Value == ParticipateTypeID).Select(x => x.Name).FirstOrDefault();
  88. }
  89. }
  90. /// <summary>
  91. /// 学生用
  92. /// </summary>
  93. [DisplayName("学生用")]
  94. public bool IsStudent { get; set; }
  95. /// <summary>
  96. /// 学生用
  97. /// </summary>
  98. [DisplayName("学生用")]
  99. public string IsStudentName
  100. {
  101. get { return this.IsStudent == true ? "是" : "否"; }
  102. }
  103. /// <summary>
  104. /// 评价类型ID
  105. /// </summary>
  106. [DisplayName("评价类型ID")]
  107. public Guid? EvaluationTypeID { get; set; }
  108. /// <summary>
  109. /// 评价类型编号
  110. /// </summary>
  111. [DisplayName("评价类型编号")]
  112. public string EvaluationTypeCode { get; set; }
  113. /// <summary>
  114. /// 评价类型
  115. /// </summary>
  116. [DisplayName("评价类型")]
  117. public string EvaluationTypeName { get; set; }
  118. /// <summary>
  119. /// 授课方式
  120. /// </summary>
  121. [DisplayName("授课方式")]
  122. public List<int?> TeachingModeIDList { get; set; }
  123. /// <summary>
  124. /// 授课方式(可存在多个授课方式--用顿号隔开)
  125. /// </summary>
  126. [DisplayName("授课方式")]
  127. public string TeachingModeIDListName
  128. {
  129. get
  130. {
  131. if (TeachingModeIDList != null && TeachingModeIDList.Count() > 0)
  132. {
  133. return string.Join("、", TeachingModeIDList.Select(x => IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMode.ToString()).Where(w => w.Value == x).Select(w => w.Name).FirstOrDefault()));
  134. }
  135. else
  136. {
  137. return "";
  138. }
  139. }
  140. }
  141. /// <summary>
  142. /// 评分标准ID
  143. /// </summary>
  144. [Required]
  145. [DisplayName("评分标准ID")]
  146. public Guid? EvaluationNormID { get; set; }
  147. /// <summary>
  148. /// 评分标准
  149. /// </summary>
  150. [DisplayName("评分标准")]
  151. public string EvaluationNormName { get; set; }
  152. /// <summary>
  153. /// 评分类型
  154. /// </summary>
  155. [DisplayName("评分类型")]
  156. public int? NormTypeID { get; set; }
  157. /// <summary>
  158. /// 评分类型
  159. /// </summary>
  160. [DisplayName("评分类型")]
  161. public string NormTypeName
  162. {
  163. get
  164. {
  165. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_EvaluationNormType.ToString()).Where(x => x.Value == NormTypeID).Select(x => x.Name).FirstOrDefault();
  166. }
  167. }
  168. /// <summary>
  169. /// 权重
  170. /// </summary>
  171. [Required]
  172. [DisplayName("权重")]
  173. [RegularExpression(@"^\d+(\.\d{1})?$", ErrorMessage = "请输入整数或保留1位小数")]
  174. public decimal? Weight { get; set; }
  175. /// <summary>
  176. /// 项目个数
  177. /// </summary>
  178. [DisplayName("项目个数")]
  179. public int? ProjectCount { get; set; }
  180. /// <summary>
  181. /// 备注
  182. /// </summary>
  183. [DisplayName("备注")]
  184. public string Remark { get; set; }
  185. /// <summary>
  186. /// 状态
  187. /// </summary>
  188. [DisplayName("状态")]
  189. public int? RecordStatus { get; set; }
  190. /// <summary>
  191. /// 创建人
  192. /// </summary>
  193. [DisplayName("创建人")]
  194. public Guid? CreateUserID { get; set; }
  195. /// <summary>
  196. /// 创建人
  197. /// </summary>
  198. [DisplayName("创建人")]
  199. public string CreateUserName { get; set; }
  200. /// <summary>
  201. /// 创建时间
  202. /// </summary>
  203. [DisplayName("创建时间")]
  204. public DateTime? CreateTime { get; set; }
  205. /// <summary>
  206. /// 修改人
  207. /// </summary>
  208. [DisplayName("修改人")]
  209. public Guid? ModifyUserID { get; set; }
  210. /// <summary>
  211. /// 修改人
  212. /// </summary>
  213. [DisplayName("修改人")]
  214. public string ModifyUserName { get; set; }
  215. /// <summary>
  216. /// 修改时间
  217. /// </summary>
  218. [DisplayName("修改时间")]
  219. public DateTime? ModifyTime { get; set; }
  220. }
  221. }