NewStudentView.cs 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel;
  6. using System.ComponentModel.DataAnnotations;
  7. using EMIS.ViewModel.CacheManage;
  8. namespace EMIS.ViewModel.EnrollManage.NewStudentManage
  9. {
  10. public class NewStudentView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [DisplayName("主键ID")]
  16. public Guid NewStudentID { get; set; }
  17. /// <summary>
  18. /// 考生号
  19. /// </summary>
  20. [Required]
  21. [DisplayName("考生号")]
  22. [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入字符或数字")]
  23. public string ExamineeNum { get; set; }
  24. /// <summary>
  25. /// 准考证号
  26. /// </summary>
  27. [DisplayName("准考证号")]
  28. [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入字符或数字")]
  29. public string AdmissionTicketNo { get; set; }
  30. /// <summary>
  31. /// 姓名
  32. /// </summary>
  33. [Required]
  34. [DisplayName("姓名")]
  35. public string Name { get; set; }
  36. /// <summary>
  37. /// 性别
  38. /// </summary>
  39. [Required]
  40. [DisplayName("性别")]
  41. public int? SexID { get; set; }
  42. /// <summary>
  43. /// 性别(Excel导入用)
  44. /// </summary>
  45. [DisplayName("性别")]
  46. public string SexStr { get; set; }
  47. /// <summary>
  48. /// 性别
  49. /// </summary>
  50. [DisplayName("性别")]
  51. public string SexName
  52. {
  53. get
  54. {
  55. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Sex.ToString()).Where(x => x.Value == SexID).Select(x => x.Name).FirstOrDefault();
  56. }
  57. }
  58. /// <summary>
  59. /// 民族
  60. /// </summary>
  61. [Required]
  62. [DisplayName("民族")]
  63. public int? NationID { get; set; }
  64. /// <summary>
  65. /// 民族(Excel导入用)
  66. /// </summary>
  67. [DisplayName("民族")]
  68. public string NationStr { get; set; }
  69. /// <summary>
  70. /// 民族
  71. /// </summary>
  72. [DisplayName("民族")]
  73. public string NationName
  74. {
  75. get
  76. {
  77. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Nation.ToString()).Where(x => x.Value == NationID).Select(x => x.Name).FirstOrDefault();
  78. }
  79. }
  80. /// <summary>
  81. /// 政治面貌
  82. /// </summary>
  83. [Required]
  84. [DisplayName("政治面貌")]
  85. public int? PoliticsID { get; set; }
  86. /// <summary>
  87. /// 政治面貌(Excel导入用)
  88. /// </summary>
  89. [DisplayName("政治面貌")]
  90. public string PoliticsStr { get; set; }
  91. /// <summary>
  92. /// 政治面貌
  93. /// </summary>
  94. [DisplayName("政治面貌")]
  95. public string PoliticsName
  96. {
  97. get
  98. {
  99. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Politics.ToString()).Where(x => x.Value == PoliticsID).Select(x => x.Name).FirstOrDefault();
  100. }
  101. }
  102. /// <summary>
  103. /// 出生日期
  104. /// </summary>
  105. [DisplayName("出生日期")]
  106. public DateTime? BirthDate { get; set; }
  107. /// <summary>
  108. /// 出生日期(Excel导入用)
  109. /// </summary>
  110. [DisplayName("出生日期")]
  111. public string BirthDateStr { get; set; }
  112. /// <summary>
  113. /// 证件类型
  114. /// </summary>
  115. [Required]
  116. [DisplayName("证件类型")]
  117. public int? CertificatesType { get; set; }
  118. /// <summary>
  119. /// 证件类型(Excel导入用)
  120. /// </summary>
  121. [DisplayName("证件类型")]
  122. public string CertificatesTypeStr { get; set; }
  123. /// <summary>
  124. /// 证件类型
  125. /// </summary>
  126. [DisplayName("证件类型")]
  127. public string CertificatesTypeName
  128. {
  129. get
  130. {
  131. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CertificatesType.ToString()).Where(x => x.Value == CertificatesType).Select(x => x.Name).FirstOrDefault();
  132. }
  133. }
  134. /// <summary>
  135. /// 身份证号
  136. /// </summary>
  137. [Required]
  138. [DisplayName("身份证号")]
  139. //[RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入字符或数字")]
  140. public string IDNumber { get; set; }
  141. /// <summary>
  142. /// 年级
  143. /// </summary>
  144. [Required]
  145. [DisplayName("年级")]
  146. public int? GradeID { get; set; }
  147. /// <summary>
  148. /// 年级(Excel导入用)
  149. /// </summary>
  150. [DisplayName("年级")]
  151. public string GradeStr { get; set; }
  152. /// <summary>
  153. /// 年级
  154. /// </summary>
  155. [DisplayName("年级")]
  156. public string GradeName
  157. {
  158. get
  159. {
  160. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Grade.ToString()).Where(x => x.Value == GradeID).Select(x => x.Name).FirstOrDefault();
  161. }
  162. }
  163. /// <summary>
  164. /// 学期
  165. /// </summary>
  166. [Required]
  167. [DisplayName("学期")]
  168. public int? SemesterID { get; set; }
  169. /// <summary>
  170. /// 学期(Excel导入用)
  171. /// </summary>
  172. [DisplayName("学期")]
  173. public string SemesterStr { get; set; }
  174. /// <summary>
  175. /// 学期
  176. /// </summary>
  177. [DisplayName("学期")]
  178. public string SemesterName
  179. {
  180. get
  181. {
  182. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Semester.ToString()).Where(x => x.Value == SemesterID).Select(x => x.Name).FirstOrDefault();
  183. }
  184. }
  185. /// <summary>
  186. /// 专业信息ID
  187. /// </summary>
  188. [Required]
  189. [DisplayName("专业信息ID")]
  190. public Guid? SpecialtyID { get; set; }
  191. /// <summary>
  192. /// 省招代码(用于匹配省招专业)
  193. /// </summary>
  194. [DisplayName("省招代码")]
  195. public string CustomStandardCode { get; set; }
  196. /// <summary>
  197. /// 专业ID(Value)
  198. /// </summary>
  199. [DisplayName("专业ID(Value)")]
  200. public int? StandardID { get; set; }
  201. /// <summary>
  202. /// 专业代码(6位)
  203. /// </summary>
  204. [DisplayName("专业代码")]
  205. public string Code
  206. {
  207. get
  208. {
  209. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString()).Where(x => x.Value == StandardID).Select(x => x.Code).FirstOrDefault();
  210. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  211. }
  212. }
  213. /// <summary>
  214. /// 专业代码
  215. /// </summary>
  216. [DisplayName("专业代码")]
  217. public string StandardCode { get; set; }
  218. /// <summary>
  219. /// 专业名称
  220. /// </summary>
  221. [DisplayName("专业名称")]
  222. public string StandardName { get; set; }
  223. /// <summary>
  224. /// 培养层次
  225. /// </summary>
  226. [Required]
  227. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  228. public int? EducationID { get; set; }
  229. /// <summary>
  230. /// 培养层次(Excel导入用)
  231. /// </summary>
  232. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  233. public string EducationStr { get; set; }
  234. /// <summary>
  235. /// 培养层次
  236. /// </summary>
  237. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  238. public string EducationName
  239. {
  240. get
  241. {
  242. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString()).Where(x => x.Value == EducationID).Select(x => x.Name).FirstOrDefault();
  243. }
  244. }
  245. /// <summary>
  246. /// 学习形式
  247. /// </summary>
  248. [Required]
  249. [DisplayName("学习形式")]
  250. public int? LearningformID { get; set; }
  251. /// <summary>
  252. /// 学习形式(Excel导入用)
  253. /// </summary>
  254. [DisplayName("学习形式")]
  255. public string LearningformStr { get; set; }
  256. /// <summary>
  257. /// 学习形式
  258. /// </summary>
  259. [DisplayName("学习形式")]
  260. public string LearningformName
  261. {
  262. get
  263. {
  264. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString()).Where(x => x.Value == LearningformID).Select(x => x.Name).FirstOrDefault();
  265. }
  266. }
  267. /// <summary>
  268. /// 学制
  269. /// </summary>
  270. [Required]
  271. [DisplayName("学制")]
  272. [DisplayFormat(DataFormatString = "{0:#.#}")]
  273. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  274. public decimal? LearnSystem { get; set; }
  275. /// <summary>
  276. /// 学制(Excel导入用)
  277. /// </summary>
  278. [DisplayName("学制")]
  279. public string LearnSystemStr { get; set; }
  280. /// <summary>
  281. /// 入学日期
  282. /// </summary>
  283. [DisplayName("入学日期")]
  284. public DateTime? EntranceDate { get; set; }
  285. /// <summary>
  286. /// 入学日期(Excel导入用)
  287. /// </summary>
  288. [DisplayName("入学日期")]
  289. public string EntranceDateStr { get; set; }
  290. /// <summary>
  291. /// 总分
  292. /// </summary>
  293. [DisplayName("总分")]
  294. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  295. public decimal? Score { get; set; }
  296. /// <summary>
  297. /// 总分(Excel导入用)
  298. /// </summary>
  299. [DisplayName("总分")]
  300. public string ScoreStr { get; set; }
  301. /// <summary>
  302. /// 联系电话
  303. /// </summary>
  304. [DisplayName("联系电话")]
  305. [RegularExpression(@"^[-0-9]+$", ErrorMessage = "请输入正确格式")]
  306. public string Telephone { get; set; }
  307. /// <summary>
  308. /// 邮政编码
  309. /// </summary>
  310. [DisplayName("邮政编码")]
  311. public string ZIPCode { get; set; }
  312. /// <summary>
  313. /// 入学方式
  314. /// </summary>
  315. [DisplayName("入学方式")]
  316. public int? EntranceWayID { get; set; }
  317. /// <summary>
  318. /// 入学方式(Excel导入用)
  319. /// </summary>
  320. [DisplayName("入学方式")]
  321. public string EntranceWayStr { get; set; }
  322. /// <summary>
  323. /// 入学方式
  324. /// </summary>
  325. [DisplayName("入学方式")]
  326. public string EntranceWaymName
  327. {
  328. get
  329. {
  330. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_EntranceWay.ToString()).Where(x => x.Value == EntranceWayID).Select(x => x.Name).FirstOrDefault();
  331. }
  332. }
  333. /// <summary>
  334. /// 考生特征
  335. /// </summary>
  336. [DisplayName("考生特征")]
  337. public int? FeaturesID { get; set; }
  338. /// <summary>
  339. /// 考生特征(Excel导入用)
  340. /// </summary>
  341. [DisplayName("考生特征")]
  342. public string FeaturesStr { get; set; }
  343. /// <summary>
  344. /// 考生特征
  345. /// </summary>
  346. [DisplayName("考生特征")]
  347. public string FeaturesName
  348. {
  349. get
  350. {
  351. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Features.ToString()).Where(x => x.Value == FeaturesID).Select(x => x.Name).FirstOrDefault();
  352. }
  353. }
  354. /// <summary>
  355. /// 生源所属地
  356. /// </summary>
  357. [DisplayName("生源所属地")]
  358. public int? TerritorialID { get; set; }
  359. /// <summary>
  360. /// 生源所属地(Excel导入用)
  361. /// </summary>
  362. [DisplayName("生源所属地")]
  363. public string TerritorialStr { get; set; }
  364. /// <summary>
  365. /// 生源所属地
  366. /// </summary>
  367. [DisplayName("生源所属地")]
  368. public string TerritorialName
  369. {
  370. get
  371. {
  372. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Province.ToString()).Where(x => x.Value == TerritorialID).Select(x => x.Name).FirstOrDefault();
  373. }
  374. }
  375. /// <summary>
  376. /// 通讯地址
  377. /// </summary>
  378. [DisplayName("通讯地址")]
  379. public string Address { get; set; }
  380. /// <summary>
  381. /// 宿舍地址
  382. /// </summary>
  383. [DisplayName("宿舍地址")]
  384. public string Dormitory { get; set; }
  385. /// <summary>
  386. /// 录取通知书编号
  387. /// </summary>
  388. [DisplayName("录取通知书编号")]
  389. public string EnrollmentNo { get; set; }
  390. /// <summary>
  391. /// 照片
  392. /// </summary>
  393. [DisplayName("照片")]
  394. public string RecruitPictureUrl { get; set; }
  395. /// <summary>
  396. /// 照片
  397. /// </summary>
  398. [DisplayName("照片")]
  399. public string RecruitPictureUrlStr
  400. {
  401. get
  402. {
  403. if (string.IsNullOrWhiteSpace(this.RecruitPictureUrl))
  404. {
  405. return "/Content/images/noPhoto.png";
  406. }
  407. else
  408. {
  409. return this.RecruitPictureUrl;
  410. }
  411. }
  412. }
  413. /// <summary>
  414. /// 照片有无
  415. /// </summary>
  416. [DisplayName("照片有无")]
  417. public bool PhotoHasValue { get; set; }
  418. /// <summary>
  419. /// 照片有无
  420. /// </summary>
  421. [DisplayName("照片有无")]
  422. public string PhotoHasValueName
  423. {
  424. get { return this.PhotoHasValue != true ? "无" : "有"; }
  425. }
  426. /// <summary>
  427. /// 标识状态
  428. /// </summary>
  429. [DisplayName("标识状态")]
  430. public bool IsDoubt { get; set; }
  431. /// <summary>
  432. /// 标识状态
  433. /// </summary>
  434. [DisplayName("标识状态")]
  435. public string IsDoubtName
  436. {
  437. get { return this.IsDoubt == true ? "是" : "否"; }
  438. }
  439. /// <summary>
  440. /// 分配状态
  441. /// </summary>
  442. [Required]
  443. [DisplayName("分配状态")]
  444. public int? AssignStatus { get; set; }
  445. /// <summary>
  446. /// 分配状态
  447. /// </summary>
  448. [DisplayName("分配状态")]
  449. public string AssignStatusName
  450. {
  451. get
  452. {
  453. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_AssignStatus.ToString()).Where(x => x.Value == AssignStatus).Select(x => x.Name).FirstOrDefault();
  454. }
  455. }
  456. /// <summary>
  457. /// 序号
  458. /// </summary>
  459. [Required]
  460. [DisplayName("序号")]
  461. public int? OrderNo { get; set; }
  462. /// <summary>
  463. /// 序号(Excel导入用)
  464. /// </summary>
  465. [DisplayName("序号")]
  466. public string OrderNoStr { get; set; }
  467. /// <summary>
  468. /// 院系所ID
  469. /// </summary>
  470. [Required]
  471. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  472. public Guid? CollegeID { get; set; }
  473. /// <summary>
  474. /// 院系所代码
  475. /// </summary>
  476. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  477. public string CollegeNo { get; set; }
  478. /// <summary>
  479. /// 院系所名称
  480. /// </summary>
  481. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeName")]
  482. public string CollegeName { get; set; }
  483. /// <summary>
  484. /// 校区
  485. /// </summary>
  486. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
  487. public Guid? CampusID { get; set; }
  488. /// <summary>
  489. /// 校区代码
  490. /// </summary>
  491. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
  492. public string CampusCode { get; set; }
  493. /// <summary>
  494. /// 校区名称
  495. /// </summary>
  496. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")]
  497. public string CampusName { get; set; }
  498. /// <summary>
  499. /// 班级信息ID
  500. /// </summary>
  501. [DisplayName("班级信息ID")]
  502. public Guid? ClassmajorID { get; set; }
  503. /// <summary>
  504. /// 班级编号
  505. /// </summary>
  506. [DisplayName("班级编号")]
  507. public string ClassmajorNo { get; set; }
  508. /// <summary>
  509. /// 班级名称
  510. /// </summary>
  511. [DisplayName("班级名称")]
  512. public string ClassmajorName { get; set; }
  513. /// <summary>
  514. /// 年级专业ID
  515. /// </summary>
  516. [DisplayName("年级专业ID")]
  517. public Guid? GrademajorID { get; set; }
  518. /// <summary>
  519. /// 年级专业代码
  520. /// </summary>
  521. [DisplayName("年级专业代码")]
  522. public string GrademajorCode { get; set; }
  523. /// <summary>
  524. /// 年级专业名称
  525. /// </summary>
  526. [DisplayName("年级专业名称")]
  527. public string GrademajorName { get; set; }
  528. /// <summary>
  529. /// 院系专业ID
  530. /// </summary>
  531. [DisplayName("院系专业ID")]
  532. public Guid? FacultymajorID { get; set; }
  533. /// <summary>
  534. /// 院系专业代码
  535. /// </summary>
  536. [DisplayName("院系专业代码")]
  537. public string FacultymajorCode { get; set; }
  538. /// <summary>
  539. /// 院系专业名称
  540. /// </summary>
  541. [DisplayName("院系专业名称")]
  542. public string FacultymajorName { get; set; }
  543. /// <summary>
  544. /// 学号
  545. /// </summary>
  546. [DisplayName("学号")]
  547. [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入字符或数字")]
  548. public string StudentNo { get; set; }
  549. /// <summary>
  550. /// 备注
  551. /// </summary>
  552. [DisplayName("备注")]
  553. public string Remark { get; set; }
  554. /// <summary>
  555. /// 错误信息(Excel导入)
  556. /// </summary>
  557. [DisplayName("未导入原因")]
  558. public string ErrorMessage { get; set; }
  559. /// <summary>
  560. /// 状态
  561. /// </summary>
  562. [DisplayName("状态")]
  563. public int? RecordStatus { get; set; }
  564. /// <summary>
  565. /// 状态
  566. /// </summary>
  567. [DisplayName("状态")]
  568. public string RecordStatusName
  569. {
  570. get
  571. {
  572. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_NewStudentEnterStatus.ToString()).Where(x => x.Value == RecordStatus).Select(x => x.Name).FirstOrDefault();
  573. }
  574. }
  575. /// <summary>
  576. /// 创建人
  577. /// </summary>
  578. [DisplayName("创建人")]
  579. public Guid? CreateUserID { get; set; }
  580. /// <summary>
  581. /// 创建时间
  582. /// </summary>
  583. [DisplayName("创建时间")]
  584. public DateTime? CreateTime { get; set; }
  585. /// <summary>
  586. /// 修改人
  587. /// </summary>
  588. [DisplayName("修改人")]
  589. public Guid? ModifyUserID { get; set; }
  590. /// <summary>
  591. /// 修改时间
  592. /// </summary>
  593. [DisplayName("修改时间")]
  594. public DateTime? ModifyTime { get; set; }
  595. }
  596. }