EvaluationProjectView.cs 7.7 KB

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