FacultymajorView.cs 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  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.Specialtyclass
  9. {
  10. public class FacultymajorView
  11. {
  12. /// <summary>
  13. /// 院系专业ID
  14. /// </summary>
  15. [DisplayName("院系专业ID")]
  16. public Guid FacultymajorID { 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. /// 简称
  32. /// </summary>
  33. [DisplayName("简称")]
  34. public string Abbreviation { get; set; }
  35. /// <summary>
  36. /// 英文名称
  37. /// </summary>
  38. [DisplayName("英文名称")]
  39. public string EnglishName { get; set; }
  40. /// <summary>
  41. /// 院系专业名称+代码
  42. /// </summary>
  43. [DisplayName("院系专业")]
  44. public string NameCode { get; set; }
  45. /// <summary>
  46. /// 校区ID
  47. /// </summary>
  48. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
  49. public Guid? CampusID { get; set; }
  50. /// <summary>
  51. /// 校区代码
  52. /// </summary>
  53. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
  54. public string CampusNo { get; set; }
  55. /// <summary>
  56. /// 校区名称
  57. /// </summary>
  58. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")]
  59. public string CampusName { get; set; }
  60. /// <summary>
  61. /// 院系所ID
  62. /// </summary>
  63. [Required]
  64. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  65. public Guid? CollegeID { get; set; }
  66. /// <summary>
  67. /// 院系所代码
  68. /// </summary>
  69. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  70. public string CollegeCode { get; set; }
  71. /// <summary>
  72. /// 院系所名称
  73. /// </summary>
  74. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeName")]
  75. public string CollegeName { get; set; }
  76. /// <summary>
  77. /// 专业ID(Value)
  78. /// </summary>
  79. [Required]
  80. [DisplayName("专业ID(Value)")]
  81. public int? StandardID { get; set; }
  82. /// <summary>
  83. /// 专业代码(Excel导入)
  84. /// </summary>
  85. [DisplayName("专业代码")]
  86. public string StandardCodeStr { get; set; }
  87. /// <summary>
  88. /// 专业名称(Excel导入)
  89. /// </summary>
  90. [DisplayName("专业名称")]
  91. public string StandardNameStr { get; set; }
  92. /// <summary>
  93. /// 专业代码
  94. /// </summary>
  95. [DisplayName("专业代码")]
  96. public string StandardCode
  97. {
  98. get
  99. {
  100. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  101. .Where(x => x.Value == StandardID)
  102. .Select(x => x.Code).FirstOrDefault();
  103. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  104. }
  105. }
  106. /// <summary>
  107. /// 专业名称
  108. /// </summary>
  109. [DisplayName("专业名称")]
  110. public string StandardName { get; set; }
  111. /// <summary>
  112. /// 培养层次
  113. /// </summary>
  114. [Required]
  115. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  116. public int? EducationID { get; set; }
  117. /// <summary>
  118. /// 培养层次(Excel导入)
  119. /// </summary>
  120. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  121. public string EducationStr { get; set; }
  122. /// <summary>
  123. /// 培养层次
  124. /// </summary>
  125. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  126. public string EducationName
  127. {
  128. get
  129. {
  130. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
  131. .Where(x => x.Value == EducationID)
  132. .Select(x => x.Name).FirstOrDefault();
  133. }
  134. }
  135. /// <summary>
  136. /// 学习形式
  137. /// </summary>
  138. [Required]
  139. [DisplayName("学习形式")]
  140. public int? LearningformID { get; set; }
  141. /// <summary>
  142. /// 学习形式(Excel导入)
  143. /// </summary>
  144. [DisplayName("学习形式")]
  145. public string LearningformStr { get; set; }
  146. /// <summary>
  147. /// 学习形式
  148. /// </summary>
  149. [DisplayName("学习形式")]
  150. public string LearningformName
  151. {
  152. get
  153. {
  154. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
  155. .Where(x => x.Value == LearningformID)
  156. .Select(x => x.Name).FirstOrDefault();
  157. }
  158. }
  159. /// <summary>
  160. /// 学制
  161. /// </summary>
  162. [Required]
  163. [DisplayName("学制")]
  164. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  165. public decimal? LearnSystem { get; set; }
  166. /// <summary>
  167. /// 学制(Excel导入)
  168. /// </summary>
  169. [DisplayName("学制")]
  170. public string LearnSystemStr { get; set; }
  171. /// <summary>
  172. /// 专业科类
  173. /// </summary>
  174. [DisplayName("专业科类")]
  175. public int? ScienceclassID { get; set; }
  176. /// <summary>
  177. /// 专业科类(Excel导入)
  178. /// </summary>
  179. [DisplayName("专业科类")]
  180. public string ScienceclassStr { get; set; }
  181. /// <summary>
  182. /// 专业科类
  183. /// </summary>
  184. [DisplayName("专业科类")]
  185. public string ScienceclassName
  186. {
  187. get
  188. {
  189. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Scienceclass.ToString())
  190. .Where(x => x.Value == ScienceclassID)
  191. .Select(x => x.Name).FirstOrDefault();
  192. }
  193. }
  194. /// <summary>
  195. /// 学习方式
  196. /// </summary>
  197. [DisplayName("学习方式")]
  198. public int? LearningstyleID { get; set; }
  199. /// <summary>
  200. /// 学习方式(Excel导入)
  201. /// </summary>
  202. [DisplayName("学习方式")]
  203. public string LearningstyleStr { get; set; }
  204. /// <summary>
  205. /// 学习方式
  206. /// </summary>
  207. [DisplayName("学习方式")]
  208. public string LearningstyleName
  209. {
  210. get
  211. {
  212. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningstyle.ToString())
  213. .Where(x => x.Value == LearningstyleID)
  214. .Select(x => x.Name).FirstOrDefault();
  215. }
  216. }
  217. /// <summary>
  218. /// 授予学位
  219. /// </summary>
  220. [DisplayName("授予学位")]
  221. public int? LearnPositionID { get; set; }
  222. /// <summary>
  223. /// 授予学位(Excel导入)
  224. /// </summary>
  225. [DisplayName("授予学位")]
  226. public string LearnPositionStr { get; set; }
  227. /// <summary>
  228. /// 授予学位
  229. /// </summary>
  230. [DisplayName("授予学位")]
  231. public string LearnPositionName
  232. {
  233. get
  234. {
  235. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_LearnPosition.ToString())
  236. .Where(x => x.Value == LearnPositionID)
  237. .Select(x => x.Name).FirstOrDefault();
  238. }
  239. }
  240. /// <summary>
  241. /// 师范标识
  242. /// </summary>
  243. [DisplayName("师范标识")]
  244. public string TeacherIdentification { get; set; }
  245. /// <summary>
  246. /// 设置时间
  247. /// </summary>
  248. [DisplayName("设置时间")]
  249. public DateTime? SetTime { get; set; }
  250. /// <summary>
  251. /// 设置时间(Excel导入)
  252. /// </summary>
  253. [DisplayName("设置时间")]
  254. public string SetTimeStr { get; set; }
  255. /// <summary>
  256. /// 年级专业数
  257. /// </summary>
  258. [DisplayName("年级专业数")]
  259. public int? GrademajorCount { get; set; }
  260. /// <summary>
  261. /// 学生人数
  262. /// </summary>
  263. [DisplayName("学生人数")]
  264. public int? StudentCount { get; set; }
  265. /// <summary>
  266. /// 备注
  267. /// </summary>
  268. [DisplayName("备注")]
  269. public string Remark { get; set; }
  270. /// <summary>
  271. /// 错误信息(Excel导入)
  272. /// </summary>
  273. [DisplayName("未导入原因")]
  274. public string ErrorMessage { get; set; }
  275. /// <summary>
  276. /// 状态
  277. /// </summary>
  278. [DisplayName("状态")]
  279. public int? RecordStatus { get; set; }
  280. /// <summary>
  281. /// 创建人
  282. /// </summary>
  283. [DisplayName("创建人")]
  284. public Guid? CreateUserID { get; set; }
  285. /// <summary>
  286. /// 创建时间
  287. /// </summary>
  288. [DisplayName("创建时间")]
  289. public DateTime? CreateTime { get; set; }
  290. /// <summary>
  291. /// 修改人
  292. /// </summary>
  293. [DisplayName("修改人")]
  294. public Guid? ModifyUserID { get; set; }
  295. /// <summary>
  296. /// 修改时间
  297. /// </summary>
  298. [DisplayName("修改时间")]
  299. public DateTime? ModifyTime { get; set; }
  300. }
  301. }