StaffView.cs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  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.TeacherManagement
  9. {
  10. public partial class StaffView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [DisplayName("主键ID")]
  16. public Guid UserID { get; set; }
  17. /// <summary>
  18. /// 校区ID
  19. /// </summary>
  20. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
  21. public Guid? CampusID { get; set; }
  22. /// <summary>
  23. /// 校区代码
  24. /// </summary>
  25. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
  26. public string CampusCode { get; set; }
  27. /// <summary>
  28. /// 校区名称
  29. /// </summary>
  30. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")]
  31. public string CampusName { get; set; }
  32. /// <summary>
  33. /// 院系所ID
  34. /// </summary>
  35. [Required]
  36. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  37. public Guid? CollegeID { get; set; }
  38. /// <summary>
  39. /// 院系所代码
  40. /// </summary>
  41. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
  42. public string CollegeNo { get; set; }
  43. /// <summary>
  44. /// 院系所名称
  45. /// </summary>
  46. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeName")]
  47. public string CollegeName { get; set; }
  48. /// <summary>
  49. /// 所属教研室ID
  50. /// </summary>
  51. [DisplayName("所属教研室ID")]
  52. public Guid? DepartmentID { get; set; }
  53. /// <summary>
  54. /// 所属教研室代码
  55. /// </summary>
  56. [DisplayName("所属教研室代码")]
  57. public string DepartmentCode { get; set; }
  58. /// <summary>
  59. /// 所属教研室
  60. /// </summary>
  61. [DisplayName("所属教研室")]
  62. public string DepartmentName { get; set; }
  63. /// <summary>
  64. /// 教职工号
  65. /// </summary>
  66. [Required]
  67. [DisplayName("教职工号")]
  68. public string StaffCode { get; set; }
  69. /// <summary>
  70. /// 姓名
  71. /// </summary>
  72. [Required]
  73. [DisplayName("姓名")]
  74. public string Name { get; set; }
  75. /// <summary>
  76. /// 曾用名
  77. /// </summary>
  78. [DisplayName("曾用名")]
  79. public string UsedName { get; set; }
  80. /// <summary>
  81. /// 性别
  82. /// </summary>
  83. [Required]
  84. [DisplayName("性别")]
  85. public int? Sex { get; set; }
  86. /// <summary>
  87. /// 性别
  88. /// </summary>
  89. [Required]
  90. [DisplayName("性别")]
  91. public string SexStr { get; set; }
  92. [DisplayName("性别")]
  93. public string SexName
  94. {
  95. get
  96. {
  97. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Sex.ToString())
  98. .Where(x => x.Value == Sex)
  99. .Select(x => x.Name).FirstOrDefault();
  100. }
  101. }
  102. /// <summary>
  103. /// 出生日期
  104. /// </summary>
  105. [DisplayName("出生日期")]
  106. [DataType(DataType.DateTime)]
  107. [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}")]
  108. public DateTime? BirthDate { get; set; }
  109. [DisplayName("出生日期")]
  110. public string BirthDateStr { get; set; }
  111. /// <summary>
  112. /// 民族
  113. /// </summary>
  114. [DisplayName("民族")]
  115. public int? Nation { get; set; }
  116. /// <summary>
  117. /// 民族
  118. /// </summary>
  119. [DisplayName("民族")]
  120. public string NationStr { get; set; }
  121. /// <summary>
  122. /// 民族
  123. /// </summary>
  124. [DisplayName("民族")]
  125. public string NationName
  126. {
  127. get
  128. {
  129. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Nation.ToString())
  130. .Where(x => x.Value == Nation)
  131. .Select(x => x.Name).FirstOrDefault();
  132. }
  133. }
  134. /// <summary>
  135. /// 政治面貌
  136. /// </summary>
  137. [DisplayName("政治面貌")]
  138. public string Politics { get; set; }
  139. /// <summary>
  140. /// 教师类型
  141. /// </summary>
  142. [Required]
  143. [DisplayName("教师类型")]
  144. public int? TeacherType { get; set; }
  145. /// <summary>
  146. /// 教师类型
  147. /// </summary>
  148. [DisplayName("教师类型")]
  149. public string TeacherTypeStr { get; set; }
  150. /// <summary>
  151. /// 教师类型
  152. /// </summary>
  153. [DisplayName("教师类型名称")]
  154. public string TeacherTypeName
  155. {
  156. get
  157. {
  158. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeacherType.ToString())
  159. .Where(x => x.Value == TeacherType)
  160. .Select(x => x.Name).FirstOrDefault();
  161. }
  162. }
  163. /// <summary>
  164. /// 在职状态
  165. /// </summary>
  166. [Required]
  167. [DisplayName("在职状态")]
  168. public int? IncumbencyState { get; set; }
  169. /// <summary>
  170. /// 在职状态
  171. /// </summary>
  172. [DisplayName("在职状态")]
  173. public string IncumbencyStateStr { get; set; }
  174. /// <summary>
  175. /// 在职状态
  176. /// </summary>
  177. [DisplayName("在职状态")]
  178. public string IncumbencyStateName
  179. {
  180. get
  181. {
  182. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_IncumbencyState.ToString())
  183. .Where(x => x.Value == IncumbencyState)
  184. .Select(x => x.Name).FirstOrDefault();
  185. }
  186. }
  187. /// <summary>
  188. /// 证件类型
  189. /// </summary>
  190. [DisplayName("证件类型")]
  191. public int? CertificatesType { get; set; }
  192. /// <summary>
  193. /// 证件类型
  194. /// </summary>
  195. [DisplayName("证件类型")]
  196. public string CertificatesTypeStr { get; set; }
  197. /// <summary>
  198. /// 证件类型
  199. /// </summary>
  200. [DisplayName("证件类型")]
  201. public string CertificatesTypeName
  202. {
  203. get
  204. {
  205. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CertificatesType.ToString())
  206. .Where(x => x.Value == CertificatesType)
  207. .Select(x => x.Name).FirstOrDefault();
  208. }
  209. }
  210. /// <summary>
  211. /// 证件号码
  212. /// </summary>
  213. [DisplayName("证件号码")]
  214. public string CertificatesNum { get; set; }
  215. /// <summary>
  216. /// 职称
  217. /// </summary>
  218. [DisplayName("职称")]
  219. public int? Title { get; set; }
  220. /// <summary>
  221. /// 职称
  222. /// </summary>
  223. [DisplayName("职称")]
  224. public string TitleStr { get; set; }
  225. /// <summary>
  226. /// 职称
  227. /// </summary>
  228. [DisplayName("职称")]
  229. public string TitleName
  230. {
  231. get
  232. {
  233. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Title.ToString())
  234. .Where(x => x.Value == Title)
  235. .Select(x => x.Name).FirstOrDefault();
  236. }
  237. }
  238. /// <summary>
  239. /// 任课状况
  240. /// </summary>
  241. [DisplayName("任课状况")]
  242. public int? Situation { get; set; }
  243. /// <summary>
  244. /// 任课状况
  245. /// </summary>
  246. [DisplayName("任课状况")]
  247. public string SituationStr { get; set; }
  248. /// <summary>
  249. /// 任课状况
  250. /// </summary>
  251. [DisplayName("任课状况")]
  252. public string SituationName
  253. {
  254. get
  255. {
  256. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Situation.ToString())
  257. .Where(x => x.Value == Situation)
  258. .Select(x => x.Name).FirstOrDefault();
  259. }
  260. }
  261. /// <summary>
  262. /// 文化程度
  263. /// </summary>
  264. [DisplayName("文化程度")]
  265. public int? LiteracyLevels { get; set; }
  266. /// <summary>
  267. /// 文化程度
  268. /// </summary>
  269. [DisplayName("文化程度")]
  270. public string LiteracyLevelsStr { get; set; }
  271. /// <summary>
  272. /// 文化程度
  273. /// </summary>
  274. [DisplayName("文化程度")]
  275. public string LiteracyLevelsName
  276. {
  277. get
  278. {
  279. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_LiteracyLevels.ToString())
  280. .Where(x => x.Value == LiteracyLevels)
  281. .Select(x => x.Name).FirstOrDefault();
  282. }
  283. }
  284. /// <summary>
  285. /// 学位状况
  286. /// </summary>
  287. [DisplayName("学位状况")]
  288. public int? DegreeState { get; set; }
  289. /// <summary>
  290. /// 学位状况
  291. /// </summary>
  292. [DisplayName("学位状况")]
  293. public string DegreeStateStr { get; set; }
  294. /// <summary>
  295. /// 学位状况
  296. /// </summary>
  297. [DisplayName("学位状况")]
  298. public string DegreeStateName
  299. {
  300. get
  301. {
  302. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_DegreeState.ToString())
  303. .Where(x => x.Value == DegreeState)
  304. .Select(x => x.Name).FirstOrDefault();
  305. }
  306. }
  307. /// <summary>
  308. /// 学位
  309. /// </summary>
  310. [DisplayName("学位")]
  311. public int? LearnPosition { get; set; }
  312. /// <summary>
  313. /// 学位
  314. /// </summary>
  315. [DisplayName("学位")]
  316. public string LearnPositionStr { get; set; }
  317. /// <summary>
  318. /// 学位
  319. /// </summary>
  320. [DisplayName("学位")]
  321. public string LearnPositionName
  322. {
  323. get
  324. {
  325. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_LearnPosition.ToString())
  326. .Where(x => x.Value == LearnPosition)
  327. .Select(x => x.Name).FirstOrDefault();
  328. }
  329. }
  330. /// <summary>
  331. /// 参加工作年月
  332. /// </summary>
  333. [DisplayName("参加工作年月")]
  334. [DataType(DataType.DateTime)]
  335. public DateTime? WorkDate { get; set; }
  336. /// <summary>
  337. /// 参加工作年月
  338. /// </summary>
  339. [DisplayName("参加工作年月")]
  340. public string WorkDateStr { get; set; }
  341. /// <summary>
  342. /// 来校年月
  343. /// </summary>
  344. [DisplayName("来校年月")]
  345. [DataType(DataType.DateTime)]
  346. public DateTime? ComeSchoolDate { get; set; }
  347. [DisplayName("来校年月")]
  348. public string ComeSchoolDateStr { get; set; }
  349. /// <summary>
  350. /// 从教年月
  351. /// </summary>
  352. [DisplayName("从教年月")]
  353. [DataType(DataType.DateTime)]
  354. public DateTime? TeachingDate { get; set; }
  355. /// <summary>
  356. /// 从教年月
  357. /// </summary>
  358. [DisplayName("从教年月")]
  359. public string TeachingDateStr { get; set; }
  360. /// <summary>
  361. /// 照片地址
  362. /// </summary>
  363. [DisplayName("照片地址")]
  364. public string PhotoUrl { get; set; }
  365. /// <summary>
  366. /// 简介
  367. /// </summary>
  368. [DisplayName("简介")]
  369. public string Profile { get; set; }
  370. /// <summary>
  371. /// 籍贯
  372. /// </summary>
  373. [DisplayName("籍贯")]
  374. public string Place { get; set; }
  375. /// <summary>
  376. /// 学历
  377. /// </summary>
  378. [DisplayName("学历")]
  379. public int? EducationCode { get; set; }
  380. /// <summary>
  381. /// 学历
  382. /// </summary>
  383. [DisplayName("学历")]
  384. public string EducationCodeStr { get; set; }
  385. /// <summary>
  386. /// 学历
  387. /// </summary>
  388. [DisplayName("学历")]
  389. public string EducationCodeName
  390. {
  391. get
  392. {
  393. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_EducationCode.ToString())
  394. .Where(x => x.Value == EducationCode)
  395. .Select(x => x.Name).FirstOrDefault();
  396. }
  397. }
  398. /// <summary>
  399. /// 家庭电话
  400. /// </summary>
  401. [DisplayName("家庭电话")]
  402. public string Telephone { get; set; }
  403. /// <summary>
  404. /// 办公室电话
  405. /// </summary>
  406. [DisplayName("办公室电话")]
  407. public string OfficeTelephone { get; set; }
  408. /// <summary>
  409. /// 移动电话
  410. /// </summary>
  411. [DisplayName("移动电话")]
  412. public string Mobile { get; set; }
  413. /// <summary>
  414. /// 电子邮箱
  415. /// </summary>
  416. [DisplayName("电子邮箱")]
  417. public string Email { get; set; }
  418. /// <summary>
  419. /// QQ
  420. /// </summary>
  421. [DisplayName("QQ")]
  422. public string QQ { get; set; }
  423. /// <summary>
  424. /// 国籍
  425. /// </summary>
  426. [DisplayName("国籍")]
  427. public string Nationality { get; set; }
  428. /// <summary>
  429. /// 健康状况
  430. /// </summary>
  431. [DisplayName("健康状况")]
  432. public int? HealthState { get; set; }
  433. /// <summary>
  434. /// 健康状况
  435. /// </summary>
  436. [DisplayName("健康状况")]
  437. public string HealthStateStr { get; set; }
  438. /// <summary>
  439. /// 健康状况
  440. /// </summary>
  441. [DisplayName("健康状况")]
  442. public string HealthStateName
  443. {
  444. get
  445. {
  446. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_HealthState.ToString())
  447. .Where(x => x.Value == HealthState)
  448. .Select(x => x.Name).FirstOrDefault();
  449. }
  450. }
  451. /// <summary>
  452. /// 住宅电话
  453. /// </summary>
  454. [DisplayName("住宅电话")]
  455. public string HousePhone { get; set; }
  456. /// <summary>
  457. /// 通信地址
  458. /// </summary>
  459. [DisplayName("通信地址")]
  460. public string Address { get; set; }
  461. /// <summary>
  462. /// 邮政编码
  463. /// </summary>
  464. [DisplayName("邮政编码")]
  465. public string Postcode { get; set; }
  466. /// <summary>
  467. /// 家庭住址
  468. /// </summary>
  469. [DisplayName("家庭住址")]
  470. public string HomeAddress { get; set; }
  471. /// <summary>
  472. /// 现住地址
  473. /// </summary>
  474. [DisplayName("现住地址")]
  475. public string NowAddress { get; set; }
  476. /// <summary>
  477. /// 户口所在地
  478. /// </summary>
  479. [DisplayName("户口所在地")]
  480. public string Residence { get; set; }
  481. /// <summary>
  482. /// 特长
  483. /// </summary>
  484. [DisplayName("特长")]
  485. public string Speciality { get; set; }
  486. /// <summary>
  487. /// 微信号
  488. /// </summary>
  489. [DisplayName("微信号")]
  490. public string WeChatNum { get; set; }
  491. /// <summary>
  492. /// 宗教信仰
  493. /// </summary>
  494. [DisplayName("宗教信仰")]
  495. public int? Religion { get; set; }
  496. /// <summary>
  497. /// 宗教信仰
  498. /// </summary>
  499. [DisplayName("宗教信仰")]
  500. public string ReligionStr { get; set; }
  501. /// <summary>
  502. /// 宗教信仰
  503. /// </summary>
  504. [DisplayName("宗教信仰")]
  505. public string ReligionName
  506. {
  507. get
  508. {
  509. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Religion.ToString())
  510. .Where(x => x.Value == Religion)
  511. .Select(x => x.Name).FirstOrDefault();
  512. }
  513. }
  514. [DisplayName("课酬级别")]
  515. public int? PaymentLevelID { get; set; }
  516. public string PaymentLevelStr { get; set; }
  517. public string PaymentLevelName
  518. {
  519. get
  520. {
  521. return IdNameExt.GetDictionaryItem(DictionaryItem.TP_PaymentLevel.ToString())
  522. .Where(x => x.Value == PaymentLevelID)
  523. .Select(x => x.Name).FirstOrDefault();
  524. }
  525. }
  526. [DisplayName("是否双师型教师")]
  527. public bool IsDualTeacher { get; set; }
  528. public string IsDualTeacherStr { get; set; }
  529. public string IsDualTeacherName
  530. {
  531. get
  532. {
  533. return IsDualTeacher ? "是" : "否";
  534. }
  535. }
  536. /// <summary>
  537. /// 银行卡号
  538. /// </summary>
  539. [RegularExpression(@"^[0-9]*$", ErrorMessage = "只能输入数字")]
  540. [DisplayName("银行卡号")]
  541. public string Account { get; set; }
  542. /// <summary>
  543. /// 备注
  544. /// </summary>
  545. [DisplayName("备注")]
  546. public string Remarks { get; set; }
  547. /// <summary>
  548. /// 创建人
  549. /// </summary>
  550. [DisplayName("创建人")]
  551. public Guid? CreateUserID { get; set; }
  552. /// <summary>
  553. /// 创建时间
  554. /// </summary>
  555. [DisplayName("创建时间")]
  556. public DateTime? CreateTime { get; set; }
  557. private bool _isExcelVaildateOK = true;
  558. /// <summary>
  559. /// Excel验证是否通过,默认为true
  560. /// <para>true:通过;false:不通过</para>
  561. /// </summary>
  562. public bool IsExcelVaildateOK
  563. {
  564. get { return _isExcelVaildateOK; }
  565. set { _isExcelVaildateOK = value; }
  566. }
  567. /// <summary>
  568. /// 错误信息
  569. /// </summary>
  570. [DisplayName("错误信息")]
  571. public string ErrorMessage { get; set; }
  572. }
  573. }