RetakeStudentListView.cs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.ViewModel.CacheManage;
  6. using System.ComponentModel;
  7. using System.ComponentModel.DataAnnotations;
  8. namespace EMIS.ViewModel.RetakeManage
  9. {
  10. public class RetakeStudentListView : RetakeStudentView
  11. {
  12. /// <summary>
  13. /// 重修计划ID
  14. /// </summary>
  15. [DisplayName("重修计划ID")]
  16. public Guid RetakePlanID { get; set; }
  17. /// <summary>
  18. /// 重修类型
  19. /// </summary>
  20. [Required]
  21. [DisplayName("重修类型")]
  22. public int? RetakeTypeID { get; set; }
  23. /// <summary>
  24. /// 重修类型
  25. /// </summary>
  26. [DisplayName("重修类型")]
  27. public string RetakeTypeName
  28. {
  29. get
  30. {
  31. return IdNameExt.GetDictionaryItem(DictionaryItem.ER_RetakeType.ToString())
  32. .Where(x => x.Value == RetakeTypeID)
  33. .Select(x => x.Name).FirstOrDefault();
  34. }
  35. }
  36. /// <summary>
  37. /// 重修班级名称
  38. /// </summary>
  39. [DisplayName("重修班级名称")]
  40. public string ClassName { get; set; }
  41. /// <summary>
  42. /// 重修计划名单ID
  43. /// </summary>
  44. [DisplayName("重修计划名单ID")]
  45. public Guid RetakePlanStudentID { get; set; }
  46. /// <summary>
  47. /// 最终成绩ID
  48. /// </summary>
  49. [DisplayName("最终成绩ID")]
  50. public Guid FinallyScoreID { get; set; }
  51. /// <summary>
  52. /// 最终成绩IDs(重修生成时,将选择的FinallyScoreID传入后台)
  53. /// </summary>
  54. [DisplayName("最终成绩IDs")]
  55. public string FinallyScoreIDs { get; set; }
  56. /// <summary>
  57. /// 学年学期
  58. /// </summary>
  59. [DisplayName("学年学期")]
  60. public string SchoolyearCode { get; set; }
  61. /// <summary>
  62. /// 开课教研室ID
  63. /// </summary>
  64. [DisplayName("开课教研室ID")]
  65. public Guid? DepartmentID { get; set; }
  66. /// <summary>
  67. /// 开课教研室代码
  68. /// </summary>
  69. [DisplayName("开课教研室代码")]
  70. public string DepartmentCode { get; set; }
  71. /// <summary>
  72. /// 开课教研室
  73. /// </summary>
  74. [DisplayName("开课教研室")]
  75. public string DepartmentName { get; set; }
  76. /// <summary>
  77. /// 学号
  78. /// </summary>
  79. [DisplayName("学号")]
  80. public string LoginID { get; set; }
  81. /// <summary>
  82. /// 姓名
  83. /// </summary>
  84. [DisplayName("姓名")]
  85. public string UserName { get; set; }
  86. /// <summary>
  87. /// 性别
  88. /// </summary>
  89. [DisplayName("性别")]
  90. public int? SexID { get; set; }
  91. /// <summary>
  92. /// 性别
  93. /// </summary>
  94. [DisplayName("性别")]
  95. public string SexName
  96. {
  97. get
  98. {
  99. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Sex.ToString())
  100. .Where(x => x.Value == SexID)
  101. .Select(x => x.Name).FirstOrDefault();
  102. }
  103. }
  104. /// <summary>
  105. /// 在校状态
  106. /// </summary>
  107. [DisplayName("在校状态")]
  108. public int? InSchoolStatusID { get; set; }
  109. /// <summary>
  110. /// 在校状态
  111. /// </summary>
  112. [DisplayName("在校状态")]
  113. public string InSchoolStatusName
  114. {
  115. get
  116. {
  117. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_InschoolStatus.ToString())
  118. .Where(x => x.Value == InSchoolStatusID)
  119. .Select(x => x.Name).FirstOrDefault();
  120. }
  121. }
  122. /// <summary>
  123. /// 学籍状态
  124. /// </summary>
  125. [DisplayName("学籍状态")]
  126. public int? StudentStatusID { get; set; }
  127. /// <summary>
  128. /// 学籍状态
  129. /// </summary>
  130. [DisplayName("学籍状态")]
  131. public string StudentStatusName
  132. {
  133. get
  134. {
  135. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StudentStatus.ToString())
  136. .Where(x => x.Value == StudentStatusID).Select(x => x.Name).FirstOrDefault();
  137. }
  138. }
  139. /// <summary>
  140. /// 班级信息ID
  141. /// </summary>
  142. [DisplayName("班级信息ID")]
  143. public Guid? ClassmajorID { get; set; }
  144. /// <summary>
  145. /// 班级编号
  146. /// </summary>
  147. [DisplayName("班级编号")]
  148. public string ClassmajorCode { get; set; }
  149. /// <summary>
  150. /// 班级名称
  151. /// </summary>
  152. [DisplayName("班级名称")]
  153. public string ClassmajorName { get; set; }
  154. /// <summary>
  155. /// 年级专业ID
  156. /// </summary>
  157. [DisplayName("年级专业ID")]
  158. public Guid? GrademajorID { get; set; }
  159. /// <summary>
  160. /// 年级专业编号
  161. /// </summary>
  162. [DisplayName("年级专业编号")]
  163. public string GrademajorCode { get; set; }
  164. /// <summary>
  165. /// 年级专业名称
  166. /// </summary>
  167. [DisplayName("年级专业名称")]
  168. public string GrademajorName { get; set; }
  169. /// <summary>
  170. /// 院系所ID
  171. /// </summary>
  172. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
  173. public Guid? CollegeID { get; set; }
  174. /// <summary>
  175. /// 院系所代码
  176. /// </summary>
  177. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  178. public string CollegeNo { get; set; }
  179. /// <summary>
  180. /// 院系所名称
  181. /// </summary>
  182. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  183. public string CollegeName { get; set; }
  184. /// <summary>
  185. /// 年级
  186. /// </summary>
  187. [DisplayName("年级")]
  188. public int? Gradeyear { get; set; }
  189. /// <summary>
  190. /// 专业ID(Value)
  191. /// </summary>
  192. [DisplayName("专业ID(Value)")]
  193. public int? StandardID { get; set; }
  194. /// <summary>
  195. /// 专业代码
  196. /// </summary>
  197. [DisplayName("专业代码")]
  198. public string StandardCode
  199. {
  200. get
  201. {
  202. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  203. .Where(x => x.Value == StandardID)
  204. .Select(x => x.Code).FirstOrDefault();
  205. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  206. }
  207. }
  208. /// <summary>
  209. /// 专业名称
  210. /// </summary>
  211. [DisplayName("专业名称")]
  212. public string StandardDesc
  213. {
  214. get
  215. {
  216. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  217. .Where(x => x.Value == StandardID)
  218. .Select(x => x.Name).FirstOrDefault();
  219. }
  220. }
  221. /// <summary>
  222. /// 培养层次
  223. /// </summary>
  224. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  225. public int? EducationID { get; set; }
  226. /// <summary>
  227. /// 培养层次
  228. /// </summary>
  229. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  230. public string EducationName
  231. {
  232. get
  233. {
  234. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
  235. .Where(x => x.Value == EducationID)
  236. .Select(x => x.Name).FirstOrDefault();
  237. }
  238. }
  239. /// <summary>
  240. /// 培养层次
  241. /// </summary>
  242. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  243. public string EducationStr { get; set; }
  244. /// <summary>
  245. /// 学习形式
  246. /// </summary>
  247. [DisplayName("学习形式")]
  248. public int? LearningformID { get; set; }
  249. /// <summary>
  250. /// 学习形式
  251. /// </summary>
  252. [DisplayName("学习形式")]
  253. public string LearningformName
  254. {
  255. get
  256. {
  257. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
  258. .Where(x => x.Value == LearningformID)
  259. .Select(x => x.Name).FirstOrDefault();
  260. }
  261. }
  262. /// <summary>
  263. /// 学习形式
  264. /// </summary>
  265. [DisplayName("学习形式")]
  266. public string LearningformStr { get; set; }
  267. /// <summary>
  268. /// 学制
  269. /// </summary>
  270. [DisplayName("学制")]
  271. public decimal? LearnSystem { get; set; }
  272. /// <summary>
  273. /// 考试性质
  274. /// </summary>
  275. [DisplayName("考试性质")]
  276. public int? ExamsCategoryID { get; set; }
  277. /// <summary>
  278. /// 考试性质
  279. /// </summary>
  280. [DisplayName("考试性质")]
  281. public string ExamsCategoryDesc
  282. {
  283. get
  284. {
  285. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExamsCategory.ToString())
  286. .Where(x => x.Value == ExamsCategoryID)
  287. .Select(x => x.Name).FirstOrDefault();
  288. }
  289. }
  290. /// <summary>
  291. /// 考试状态
  292. /// </summary>
  293. [DisplayName("考试状态")]
  294. public int? ExamsStateID { get; set; }
  295. /// <summary>
  296. /// 考试状态
  297. /// </summary>
  298. [DisplayName("考试状态")]
  299. public string ExamsStateDesc
  300. {
  301. get
  302. {
  303. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExamsState.ToString())
  304. .Where(x => x.Value == ExamsStateID)
  305. .Select(x => x.Name).FirstOrDefault();
  306. }
  307. }
  308. /// <summary>
  309. /// 理论学时
  310. /// </summary>
  311. [DisplayName("理论学时")]
  312. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  313. public int? TheoryCourse { get; set; }
  314. /// <summary>
  315. /// 实践学时
  316. /// </summary>
  317. [DisplayName("实践学时")]
  318. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  319. public int? Practicehours { get; set; }
  320. /// <summary>
  321. /// 实验学时
  322. /// </summary>
  323. [DisplayName("实验学时")]
  324. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  325. public int? Trialhours { get; set; }
  326. /// <summary>
  327. /// 总学时
  328. /// </summary>
  329. [Required]
  330. [DisplayName("总学时")]
  331. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  332. public int? Totalhours
  333. {
  334. get
  335. {
  336. //return ((TheoryCourse ?? 0) + (Practicehours ?? 0) + (Trialhours ?? 0));
  337. return ((TheoryCourse ?? 0) + (Practicehours ?? 0));
  338. }
  339. }
  340. /// <summary>
  341. /// 不及格门数
  342. /// </summary>
  343. [DisplayName("不及格门数")]
  344. public int? NoPassCount { get; set; }
  345. /// <summary>
  346. /// 欠费金额
  347. /// </summary>
  348. [DisplayName("欠费金额")]
  349. public decimal? AmountSum { get; set; }
  350. /// <summary>
  351. /// 缴费状态
  352. /// </summary>
  353. [DisplayName("缴费状态")]
  354. public bool IsNoArrears { get; set; }
  355. /// <summary>
  356. /// 缴费状态
  357. /// </summary>
  358. [DisplayName("缴费状态")]
  359. public string IsNoArrearsDesc
  360. {
  361. get
  362. {
  363. if (AmountSum == 0 || AmountSum == null)
  364. {
  365. return "否";
  366. }
  367. return IsNoArrears ? "是" : "否";
  368. }
  369. }
  370. /// <summary>
  371. /// 报名状态
  372. /// </summary>
  373. [DisplayName("报名状态")]
  374. public bool ApplyStatus { get; set; }
  375. /// <summary>
  376. /// 报名状态
  377. /// </summary>
  378. [DisplayName("报名状态")]
  379. public string ApplyStatusName
  380. {
  381. get
  382. {
  383. return ApplyStatus == true ? "是" : "否";
  384. }
  385. }
  386. /// <summary>
  387. /// 状态
  388. /// </summary>
  389. public Nullable<int> RecordStatus { get; set; }
  390. /// <summary>
  391. /// 重修任务状态
  392. /// </summary>
  393. [DisplayName("状态")]
  394. public string RecordStatusCode
  395. {
  396. get
  397. {
  398. return IdNameExt.GetDictionaryItem(DictionaryItem.ER_RetakePlanStatus.ToString())
  399. .Where(x => x.Value == RecordStatus)
  400. .Select(x => x.Code).FirstOrDefault();
  401. }
  402. }
  403. /// <summary>
  404. /// 重修任务状态
  405. /// </summary>
  406. [DisplayName("状态")]
  407. public string RecordStatusName
  408. {
  409. get
  410. {
  411. return IdNameExt.GetDictionaryItem(DictionaryItem.ER_RetakePlanStatus.ToString())
  412. .Where(x => x.Value == RecordStatus)
  413. .Select(x => x.Name).FirstOrDefault();
  414. }
  415. }
  416. }
  417. }