SpecialtyView.cs 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.ComponentModel;
  7. using EMIS.ViewModel.Cache;
  8. namespace EMIS.ViewModel.Specialtymanage
  9. {
  10. public class SpecialtyView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [DisplayName("主键ID")]
  16. public Guid SpecialtyID { get; set; }
  17. /// <summary>
  18. /// 专业ID(Value)
  19. /// </summary>
  20. [Required]
  21. [DisplayName("专业ID(Value)")]
  22. public int? StandardID { get; set; }
  23. /// <summary>
  24. /// 专业代码
  25. /// </summary>
  26. [DisplayName("专业代码")]
  27. public string StandardCode { get; set; }
  28. /// <summary>
  29. /// 专业名称
  30. /// </summary>
  31. [DisplayName("专业名称")]
  32. public string StandardName { get; set; }
  33. /// <summary>
  34. /// 专业代码(6位)
  35. /// </summary>
  36. [DisplayName("专业代码")]
  37. public string Code
  38. {
  39. get
  40. {
  41. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  42. .Where(x => x.Value == StandardID)
  43. .Select(x => x.Code).FirstOrDefault();
  44. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  45. }
  46. }
  47. /// <summary>
  48. /// 专业名称
  49. /// </summary>
  50. [DisplayName("专业名称")]
  51. public string Name
  52. {
  53. get
  54. {
  55. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  56. .Where(x => x.Value == StandardID)
  57. .Select(x => x.Name).FirstOrDefault();
  58. }
  59. }
  60. /// <summary>
  61. /// 培养层次
  62. /// </summary>
  63. [Required]
  64. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  65. public int? EducationID { get; set; }
  66. /// <summary>
  67. /// 培养层次(Excel导入用)
  68. /// </summary>
  69. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  70. public string EducationStr { get; set; }
  71. /// <summary>
  72. /// 培养层次
  73. /// </summary>
  74. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  75. public string EducationName
  76. {
  77. get
  78. {
  79. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
  80. .Where(x => x.Value == EducationID)
  81. .Select(x => x.Name).FirstOrDefault();
  82. }
  83. }
  84. /// <summary>
  85. /// 学习形式
  86. /// </summary>
  87. [Required]
  88. [DisplayName("学习形式")]
  89. public int? LearningformID { get; set; }
  90. /// <summary>
  91. /// 学习形式(Excel导入用)
  92. /// </summary>
  93. [DisplayName("学习形式")]
  94. public string LearningformStr { get; set; }
  95. /// <summary>
  96. /// 学习形式
  97. /// </summary>
  98. [DisplayName("学习形式")]
  99. public string LearningformName
  100. {
  101. get
  102. {
  103. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
  104. .Where(x => x.Value == LearningformID)
  105. .Select(x => x.Name).FirstOrDefault();
  106. }
  107. }
  108. /// <summary>
  109. /// 学制
  110. /// </summary>
  111. [Required]
  112. [DisplayName("学制")]
  113. [DisplayFormat(DataFormatString = "{0:#.#}")]
  114. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  115. public decimal? LearnSystem { get; set; }
  116. /// <summary>
  117. /// 学制(Excel导入用)
  118. /// </summary>
  119. [DisplayName("学制")]
  120. public string LearnSystemStr { get; set; }
  121. /// <summary>
  122. /// 专业科类
  123. /// </summary>
  124. [DisplayName("专业科类")]
  125. public int? ScienceclassID { get; set; }
  126. /// <summary>
  127. /// 专业科类(Excel导入用)
  128. /// </summary>
  129. [DisplayName("专业科类")]
  130. public string ScienceclassStr { get; set; }
  131. /// <summary>
  132. /// 专业科类
  133. /// </summary>
  134. [DisplayName("专业科类")]
  135. public string ScienceclassName
  136. {
  137. get
  138. {
  139. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Scienceclass.ToString())
  140. .Where(x => x.Value == ScienceclassID)
  141. .Select(x => x.Name).FirstOrDefault();
  142. }
  143. }
  144. /// <summary>
  145. /// 专业属性
  146. /// </summary>
  147. [DisplayName("专业属性")]
  148. public int? PropertyID { get; set; }
  149. /// <summary>
  150. /// 专业属性(Excel导入用)
  151. /// </summary>
  152. [DisplayName("专业属性")]
  153. public string PropertyStr { get; set; }
  154. /// <summary>
  155. /// 专业属性
  156. /// </summary>
  157. [DisplayName("专业属性")]
  158. public string PropertyName
  159. {
  160. get
  161. {
  162. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Property.ToString())
  163. .Where(x => x.Value == PropertyID)
  164. .Select(x => x.Name).FirstOrDefault();
  165. }
  166. }
  167. /// <summary>
  168. /// 专业称号
  169. /// </summary>
  170. [DisplayName("专业称号")]
  171. public int? StandardTitle { get; set; }
  172. /// <summary>
  173. /// 专业称号(Excel导入用)
  174. /// </summary>
  175. [DisplayName("专业称号")]
  176. public string StandardTitleStr { get; set; }
  177. /// <summary>
  178. /// 专业称号
  179. /// </summary>
  180. [DisplayName("专业称号")]
  181. public string StandardTitleName
  182. {
  183. get
  184. {
  185. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StandardTitle.ToString())
  186. .Where(x => x.Value == StandardTitle)
  187. .Select(x => x.Name).FirstOrDefault();
  188. }
  189. }
  190. /// <summary>
  191. /// 称号级别
  192. /// </summary>
  193. [DisplayName("称号级别")]
  194. public int? StandardLevel { get; set; }
  195. /// <summary>
  196. /// 称号级别(Excel导入用)
  197. /// </summary>
  198. [DisplayName("称号级别")]
  199. public string StandardLevelStr { get; set; }
  200. /// <summary>
  201. /// 称号级别
  202. /// </summary>
  203. [DisplayName("称号级别")]
  204. public string StandardLevelName
  205. {
  206. get
  207. {
  208. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StandardLevel.ToString())
  209. .Where(x => x.Value == StandardLevel)
  210. .Select(x => x.Name).FirstOrDefault();
  211. }
  212. }
  213. /// <summary>
  214. /// 启用状态
  215. /// </summary>
  216. [Required]
  217. [DisplayName("启用状态")]
  218. public int? RecordStatus { get; set; }
  219. /// <summary>
  220. /// 启用状态
  221. /// </summary>
  222. [DisplayName("启用状态")]
  223. public string RecordStatusStr
  224. {
  225. get
  226. {
  227. return IdNameExt.GetDictionaryItem(DictionaryItem.SYS_STATUS.ToString())
  228. .Where(x => x.Value == RecordStatus)
  229. .Select(x => x.Name).FirstOrDefault();
  230. }
  231. }
  232. /// <summary>
  233. /// 备注
  234. /// </summary>
  235. [DisplayName("备注")]
  236. public string Remark { get; set; }
  237. /// <summary>
  238. /// 错误信息(Excel导入)
  239. /// </summary>
  240. [DisplayName("未导入原因")]
  241. public string ErrorMessage { get; set; }
  242. /// <summary>
  243. /// 创建人
  244. /// </summary>
  245. [DisplayName("创建人")]
  246. public Guid? CreateUserID { get; set; }
  247. /// <summary>
  248. /// 创建时间
  249. /// </summary>
  250. [DisplayName("创建时间")]
  251. public DateTime? CreateTime { get; set; }
  252. /// <summary>
  253. /// 修改人
  254. /// </summary>
  255. [DisplayName("修改人")]
  256. public Guid? ModifyUserID { get; set; }
  257. /// <summary>
  258. /// 修改时间
  259. /// </summary>
  260. [DisplayName("修改时间")]
  261. public DateTime? ModifyTime { get; set; }
  262. }
  263. }