RetakePlanTaskView.cs 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel;
  6. using EMIS.ViewModel.CacheManage;
  7. using System.ComponentModel.DataAnnotations;
  8. namespace EMIS.ViewModel.RetakeManage
  9. {
  10. public class RetakePlanTaskView
  11. {
  12. /// <summary>
  13. /// 重修计划ID
  14. /// </summary>
  15. [DisplayName("重修计划ID")]
  16. public Guid RetakePlanID { get; set; }
  17. /// <summary>
  18. /// 重修计划名单ID
  19. /// </summary>
  20. [DisplayName("重修计划名单ID")]
  21. public Guid RetakePlanStudentID { get; set; }
  22. /// <summary>
  23. /// 重修计划名单UserIDs
  24. /// </summary>
  25. [DisplayName("重修计划名单UserIDs")]
  26. public string UserIDs { get; set; }
  27. /// <summary>
  28. /// 重修学年学期ID
  29. /// </summary>
  30. [Required]
  31. [DisplayName("重修学年学期ID")]
  32. public Guid? SchoolyearID { get; set; }
  33. /// <summary>
  34. /// 重修学年学期
  35. /// </summary>
  36. [DisplayName("重修学年学期")]
  37. public string SchoolyearCode { get; set; }
  38. /// <summary>
  39. /// 重修类型
  40. /// </summary>
  41. [Required]
  42. [DisplayName("重修类型")]
  43. public int? RetakeTypeID { get; set; }
  44. /// <summary>
  45. /// 重修类型
  46. /// </summary>
  47. [DisplayName("重修类型")]
  48. public string RetakeTypeName
  49. {
  50. get
  51. {
  52. return IdNameExt.GetDictionaryItem(DictionaryItem.ER_RetakeType.ToString())
  53. .Where(x => x.Value == RetakeTypeID)
  54. .Select(x => x.Name).FirstOrDefault();
  55. }
  56. }
  57. /// <summary>
  58. /// 重修班级名称
  59. /// </summary>
  60. [Required]
  61. [DisplayName("重修班级名称")]
  62. public string ClassName { get; set; }
  63. /// <summary>
  64. /// 课程信息ID
  65. /// </summary>
  66. [Required]
  67. [DisplayName("课程信息ID")]
  68. public Guid? CoursematerialID { get; set; }
  69. /// <summary>
  70. /// 课程代码
  71. /// </summary>
  72. [DisplayName("课程代码")]
  73. public string CourseCode { get; set; }
  74. /// <summary>
  75. /// 课程名称
  76. /// </summary>
  77. [DisplayName("课程名称")]
  78. public string CourseName { get; set; }
  79. /// <summary>
  80. /// 开课教研室ID
  81. /// </summary>
  82. [Required]
  83. [DisplayName("开课教研室ID")]
  84. public Guid? DepartmentID { get; set; }
  85. /// <summary>
  86. /// 开课教研室代码
  87. /// </summary>
  88. [DisplayName("开课教研室代码")]
  89. public string DepartmentCode { get; set; }
  90. /// <summary>
  91. /// 开课教研室
  92. /// </summary>
  93. [DisplayName("开课教研室")]
  94. public string DepartmentName { get; set; }
  95. /// <summary>
  96. /// 开课院系所ID
  97. /// </summary>
  98. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
  99. public Guid? CourseCollegeID { get; set; }
  100. /// <summary>
  101. /// 开课院系所代码
  102. /// </summary>
  103. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  104. public string CourseCollegeNo { get; set; }
  105. /// <summary>
  106. /// 开课院系所名称
  107. /// </summary>
  108. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  109. public string CourseCollegeName { get; set; }
  110. /// <summary>
  111. /// 课程类型
  112. /// </summary>
  113. [Required]
  114. [DisplayName("课程类型")]
  115. public int? CourseTypeID { get; set; }
  116. /// <summary>
  117. /// 课程类型
  118. /// </summary>
  119. [DisplayName("课程类型")]
  120. public string CourseTypeName
  121. {
  122. get
  123. {
  124. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseType.ToString())
  125. .Where(x => x.Value == CourseTypeID)
  126. .Select(x => x.Name).FirstOrDefault();
  127. }
  128. }
  129. /// <summary>
  130. /// 课程学分
  131. /// </summary>
  132. [Required]
  133. [DisplayName("课程学分")]
  134. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  135. public decimal Credit { get; set; }
  136. /// <summary>
  137. /// 人数上限
  138. /// </summary>
  139. [Required]
  140. [DisplayName("人数上限")]
  141. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输入数字")]
  142. public int? PeopleNumlimit { get; set; }
  143. /// <summary>
  144. /// 人数下限
  145. /// </summary>
  146. [Required]
  147. [DisplayName("人数下限")]
  148. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输入数字")]
  149. public int? PeopleNumlower { get; set; }
  150. /// <summary>
  151. /// 理论学时
  152. /// </summary>
  153. [Required]
  154. [DisplayName("理论学时")]
  155. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  156. public int? TheoryCourse { get; set; }
  157. /// <summary>
  158. /// 实践学时
  159. /// </summary>
  160. [Required]
  161. [DisplayName("实践学时")]
  162. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  163. public int? Practicehours { get; set; }
  164. /// <summary>
  165. /// 实验学时
  166. /// </summary>
  167. [Required]
  168. [DisplayName("实验学时")]
  169. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  170. public int? Trialhours { get; set; }
  171. /// <summary>
  172. /// 总学时
  173. /// </summary>
  174. [Required]
  175. [DisplayName("总学时")]
  176. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  177. public int? Totalhours
  178. {
  179. get
  180. {
  181. return ((TheoryCourse ?? 0) + (Practicehours ?? 0));
  182. }
  183. }
  184. /// <summary>
  185. /// 开始周次
  186. /// </summary>
  187. [DisplayName("开始周次")]
  188. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  189. public int? StartWeeklyNum { get; set; }
  190. /// <summary>
  191. /// 结束周次
  192. /// </summary>
  193. [DisplayName("结束周次")]
  194. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  195. public int? EndWeeklyNum { get; set; }
  196. /// <summary>
  197. /// 起止周次
  198. /// </summary>
  199. [DisplayName("起止周次")]
  200. public string StartEndWeeklyNum
  201. {
  202. get
  203. {
  204. if (StartWeeklyNum != null && EndWeeklyNum != null)
  205. return StartWeeklyNum + "-" + EndWeeklyNum;
  206. else
  207. return "";
  208. }
  209. }
  210. /// <summary>
  211. /// 星期
  212. /// </summary>
  213. [DisplayName("星期")]
  214. public int? Weekday { get; set; }
  215. /// <summary>
  216. /// 星期
  217. /// </summary>
  218. [DisplayName("星期")]
  219. public string WeekdayName { get; set; }
  220. /// <summary>
  221. /// 课程时间ID
  222. /// </summary>
  223. [DisplayName("课程时间ID")]
  224. public Guid? CoursesTimeID { get; set; }
  225. /// <summary>
  226. /// 课程时间
  227. /// </summary>
  228. [DisplayName("课程时间")]
  229. public string CoursesTimeName { get; set; }
  230. /// <summary>
  231. /// 教室ID
  232. /// </summary>
  233. [DisplayName("教室ID")]
  234. public Guid? ClassroomID { get; set; }
  235. /// <summary>
  236. /// 教室
  237. /// </summary>
  238. [DisplayName("教室")]
  239. public string ClassroomName { get; set; }
  240. /// <summary>
  241. /// 上课时间
  242. /// </summary>
  243. [DisplayName("上课时间")]
  244. public string WeekdayTimesSegmentName { get; set; }
  245. /// <summary>
  246. /// 任课教师
  247. /// </summary>
  248. [DisplayName("任课教师")]
  249. public Guid? TeacherUserID { get; set; }
  250. /// <summary>
  251. /// 教职工号
  252. /// </summary>
  253. [DisplayName("教职工号")]
  254. public string TeacherUserCode { get; set; }
  255. /// <summary>
  256. /// 任课教师
  257. /// </summary>
  258. [DisplayName("任课教师")]
  259. public string TeacherName { get; set; }
  260. /// <summary>
  261. /// 计划人数
  262. /// </summary>
  263. [DisplayName("计划人数")]
  264. public int? PlanNumber { get; set; }
  265. /// <summary>
  266. /// 已报人数
  267. /// </summary>
  268. [DisplayName("已报人数")]
  269. public int? ApplyNumber { get; set; }
  270. /// <summary>
  271. /// 学号
  272. /// </summary>
  273. [DisplayName("学号")]
  274. public Guid? UserID { get; set; }
  275. /// <summary>
  276. /// 学号
  277. /// </summary>
  278. [DisplayName("学号")]
  279. public string LoginID { get; set; }
  280. /// <summary>
  281. /// 姓名
  282. /// </summary>
  283. [DisplayName("姓名")]
  284. public string UserName { get; set; }
  285. /// <summary>
  286. /// 性别
  287. /// </summary>
  288. [DisplayName("性别")]
  289. public int? SexID { get; set; }
  290. /// <summary>
  291. /// 性别
  292. /// </summary>
  293. [DisplayName("性别")]
  294. public string SexName
  295. {
  296. get
  297. {
  298. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Sex.ToString())
  299. .Where(x => x.Value == SexID)
  300. .Select(x => x.Name).FirstOrDefault();
  301. }
  302. }
  303. /// <summary>
  304. /// 在校状态
  305. /// </summary>
  306. [DisplayName("在校状态")]
  307. public int? InSchoolStatusID { get; set; }
  308. /// <summary>
  309. /// 在校状态
  310. /// </summary>
  311. [DisplayName("在校状态")]
  312. public string InSchoolStatusName
  313. {
  314. get
  315. {
  316. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_InschoolStatus.ToString())
  317. .Where(x => x.Value == InSchoolStatusID)
  318. .Select(x => x.Name).FirstOrDefault();
  319. }
  320. }
  321. /// <summary>
  322. /// 学籍状态
  323. /// </summary>
  324. [DisplayName("学籍状态")]
  325. public int? StudentStatusID { get; set; }
  326. /// <summary>
  327. /// 学籍状态
  328. /// </summary>
  329. [DisplayName("学籍状态")]
  330. public string StudentStatusName
  331. {
  332. get
  333. {
  334. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StudentStatus.ToString())
  335. .Where(x => x.Value == StudentStatusID).Select(x => x.Name).FirstOrDefault();
  336. }
  337. }
  338. /// <summary>
  339. /// 班级信息ID
  340. /// </summary>
  341. [DisplayName("班级信息ID")]
  342. public Guid? ClassmajorID { get; set; }
  343. /// <summary>
  344. /// 班级编号
  345. /// </summary>
  346. [DisplayName("班级编号")]
  347. public string ClassmajorCode { get; set; }
  348. /// <summary>
  349. /// 班级名称
  350. /// </summary>
  351. [DisplayName("班级名称")]
  352. public string ClassmajorName { get; set; }
  353. /// <summary>
  354. /// 年级专业ID
  355. /// </summary>
  356. [DisplayName("年级专业ID")]
  357. public Guid? GrademajorID { get; set; }
  358. /// <summary>
  359. /// 年级专业编号
  360. /// </summary>
  361. [DisplayName("年级专业编号")]
  362. public string GrademajorCode { get; set; }
  363. /// <summary>
  364. /// 年级专业名称
  365. /// </summary>
  366. [DisplayName("年级专业名称")]
  367. public string GrademajorName { get; set; }
  368. /// <summary>
  369. /// 院系所ID
  370. /// </summary>
  371. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
  372. public Guid? CollegeID { get; set; }
  373. /// <summary>
  374. /// 院系所代码
  375. /// </summary>
  376. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  377. public string CollegeNo { get; set; }
  378. /// <summary>
  379. /// 院系所名称
  380. /// </summary>
  381. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  382. public string CollegeName { get; set; }
  383. /// <summary>
  384. /// 年级
  385. /// </summary>
  386. [DisplayName("年级")]
  387. public int? Gradeyear { get; set; }
  388. /// <summary>
  389. /// 专业ID(Value)
  390. /// </summary>
  391. [DisplayName("专业ID(Value)")]
  392. public int? StandardID { get; set; }
  393. /// <summary>
  394. /// 专业代码
  395. /// </summary>
  396. [DisplayName("专业代码")]
  397. public string StandardCode
  398. {
  399. get
  400. {
  401. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  402. .Where(x => x.Value == StandardID)
  403. .Select(x => x.Code).FirstOrDefault();
  404. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  405. }
  406. }
  407. /// <summary>
  408. /// 专业名称
  409. /// </summary>
  410. [DisplayName("专业名称")]
  411. public string StandardDesc
  412. {
  413. get
  414. {
  415. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  416. .Where(x => x.Value == StandardID)
  417. .Select(x => x.Name).FirstOrDefault();
  418. }
  419. }
  420. /// <summary>
  421. /// 培养层次
  422. /// </summary>
  423. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  424. public int? EducationID { get; set; }
  425. /// <summary>
  426. /// 培养层次
  427. /// </summary>
  428. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  429. public string EducationName
  430. {
  431. get
  432. {
  433. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
  434. .Where(x => x.Value == EducationID)
  435. .Select(x => x.Name).FirstOrDefault();
  436. }
  437. }
  438. /// <summary>
  439. /// 培养层次
  440. /// </summary>
  441. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  442. public string EducationStr { get; set; }
  443. /// <summary>
  444. /// 学习形式
  445. /// </summary>
  446. [DisplayName("学习形式")]
  447. public int? LearningformID { get; set; }
  448. /// <summary>
  449. /// 学习形式
  450. /// </summary>
  451. [DisplayName("学习形式")]
  452. public string LearningformName
  453. {
  454. get
  455. {
  456. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
  457. .Where(x => x.Value == LearningformID)
  458. .Select(x => x.Name).FirstOrDefault();
  459. }
  460. }
  461. /// <summary>
  462. /// 学习形式
  463. /// </summary>
  464. [DisplayName("学习形式")]
  465. public string LearningformStr { get; set; }
  466. /// <summary>
  467. /// 学制
  468. /// </summary>
  469. [DisplayName("学制")]
  470. public decimal? LearnSystem { get; set; }
  471. /// <summary>
  472. /// 重修任务状态
  473. /// </summary>
  474. public Nullable<int> RecordStatus { get; set; }
  475. /// <summary>
  476. /// 重修任务状态
  477. /// </summary>
  478. [DisplayName("状态")]
  479. public string RecordStatusCode
  480. {
  481. get
  482. {
  483. return IdNameExt.GetDictionaryItem(DictionaryItem.ER_RetakePlanStatus.ToString())
  484. .Where(x => x.Value == RecordStatus)
  485. .Select(x => x.Code).FirstOrDefault();
  486. }
  487. }
  488. /// <summary>
  489. /// 重修任务状态
  490. /// </summary>
  491. [DisplayName("状态")]
  492. public string RecordStatusName
  493. {
  494. get
  495. {
  496. return IdNameExt.GetDictionaryItem(DictionaryItem.ER_RetakePlanStatus.ToString())
  497. .Where(x => x.Value == RecordStatus)
  498. .Select(x => x.Name).FirstOrDefault();
  499. }
  500. }
  501. }
  502. }