StudentScoreView.cs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  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.ScoreManage
  9. {
  10. public class StudentScoreView
  11. {
  12. /// <summary>
  13. /// 已提交成绩ID
  14. /// </summary>
  15. [DisplayName("已提交成绩ID")]
  16. public Guid? SubmitedScoreID { get; set; }
  17. /// <summary>
  18. /// 最终成绩ID
  19. /// </summary>
  20. [DisplayName("最终成绩ID")]
  21. public Guid? FinallyScoreID { get; set; }
  22. /// <summary>
  23. /// 学年学期
  24. /// </summary>
  25. [Required]
  26. [DisplayName("学年学期")]
  27. public Guid? SchoolyearID { get; set; }
  28. /// <summary>
  29. /// 学年学期
  30. /// </summary>
  31. [DisplayName("学年学期")]
  32. public string SchoolyearCode { get; set; }
  33. /// <summary>
  34. /// 院系所
  35. /// </summary>
  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 = "College")]
  42. public string CollegeName { get; set; }
  43. /// <summary>
  44. /// 教研室
  45. /// </summary>
  46. [Required]
  47. [DisplayName("教研室")]
  48. public Guid? DepartmentID { get; set; }
  49. /// <summary>
  50. /// 教研室
  51. /// </summary>
  52. [DisplayName("教研室")]
  53. public string DepartmentName { get; set; }
  54. /// <summary>
  55. /// 年级专业ID
  56. /// </summary>
  57. [DisplayName("年级专业ID")]
  58. public Guid? GrademajorID { get; set; }
  59. /// <summary>
  60. /// 年级专业代码
  61. /// </summary>
  62. [DisplayName("年级专业代码")]
  63. public string GrademajorCode { get; set; }
  64. /// <summary>
  65. /// 年级专业名称
  66. /// </summary>
  67. [DisplayName("年级专业名称")]
  68. public string GrademajorName { get; set; }
  69. /// <summary>
  70. /// 班级ID
  71. /// </summary>
  72. [DisplayName("班级ID")]
  73. public Guid? ClassmajorID { get; set; }
  74. /// <summary>
  75. /// 班级编号
  76. /// </summary>
  77. [DisplayName("班级编号")]
  78. public string ClassmajorCode { get; set; }
  79. /// <summary>
  80. /// 班级名称
  81. /// </summary>
  82. [DisplayName("班级名称")]
  83. public string ClassmajorName { get; set; }
  84. /// <summary>
  85. /// 录入班级名称
  86. /// </summary>
  87. [Required]
  88. [DisplayName("录入班级名称")]
  89. public string ClassName { get; set; }
  90. /// <summary>
  91. /// 设定类型
  92. /// </summary>
  93. public int? ExaminationType { get; set; }
  94. /// <summary>
  95. /// 设定类型
  96. /// </summary>
  97. public string ExaminationTypeName
  98. {
  99. get
  100. {
  101. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationType.ToString())
  102. .Where(x => x.Value == ExaminationType)
  103. .Select(x => x.Name).FirstOrDefault();
  104. }
  105. }
  106. /// <summary>
  107. /// 考试性质
  108. /// </summary>
  109. [Required]
  110. [DisplayName("考试性质")]
  111. public int? ExamsCategoryID { get; set; }
  112. /// <summary>
  113. /// 考试性质
  114. /// </summary>
  115. [DisplayName("考试性质")]
  116. public string ExamsCategoryName
  117. {
  118. get
  119. {
  120. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExamsCategory.ToString())
  121. .Where(x => x.Value == ExamsCategoryID)
  122. .Select(x => x.Name).FirstOrDefault();
  123. }
  124. }
  125. /// <summary>
  126. /// 开课学年
  127. /// </summary>
  128. [Required]
  129. [DisplayName("开课学年")]
  130. public int? SchoolyearNumID { get; set; }
  131. /// <summary>
  132. /// 开课学年
  133. /// </summary>
  134. [DisplayName("开课学年")]
  135. public string SchoolyearNumName
  136. {
  137. get
  138. {
  139. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolyearNum.ToString())
  140. .Where(x => x.Value == SchoolyearNumID)
  141. .Select(x => x.Name).FirstOrDefault();
  142. }
  143. }
  144. /// <summary>
  145. /// 开课学期
  146. /// </summary>
  147. [DisplayName("开课学期")]
  148. [Required]
  149. public int? StarttermID { get; set; }
  150. /// <summary>
  151. /// 开课学期
  152. /// </summary>
  153. public string StarttermName
  154. {
  155. get
  156. {
  157. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Startterm.ToString())
  158. .Where(x => x.Value == StarttermID)
  159. .Select(x => x.Name).FirstOrDefault();
  160. }
  161. }
  162. /// <summary>
  163. /// 课程代码
  164. /// </summary>
  165. [DisplayName("课程代码")]
  166. public string CourseCode { get; set; }
  167. /// <summary>
  168. /// 课程名称
  169. /// </summary>
  170. [Required]
  171. [DisplayName("课程名称")]
  172. public Guid? CoursematerialID { get; set; }
  173. /// <summary>
  174. /// 课程名称
  175. /// </summary>
  176. [DisplayName("课程名称")]
  177. public string CourseName { get; set; }
  178. /// <summary>
  179. /// 课程类型
  180. /// </summary>
  181. [Required]
  182. [DisplayName("课程类型")]
  183. public int? CourseTypeID { get; set; }
  184. /// <summary>
  185. /// 课程类型
  186. /// </summary>
  187. [DisplayName("课程类型")]
  188. public string CourseTypeName
  189. {
  190. get
  191. {
  192. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseType.ToString())
  193. .Where(x => x.Value == CourseTypeID)
  194. .Select(x => x.Name).FirstOrDefault();
  195. }
  196. }
  197. /// <summary>
  198. /// 课程学分
  199. /// </summary>
  200. [Required]
  201. [DisplayName("课程学分")]
  202. [RegularExpression(@"^\d+(\.\d{1,2})?$", ErrorMessage = "请输整数或保留2位小数")]
  203. public decimal? Credit { get; set; }
  204. /// <summary>
  205. /// 总学时
  206. /// </summary>
  207. [DisplayName("总学时")]
  208. public int? TotalHours { get; set; }
  209. /// <summary>
  210. /// 成绩类型
  211. /// </summary>
  212. [Required]
  213. [DisplayName("成绩类型")]
  214. public int? ResultTypeID { get; set; }
  215. /// <summary>
  216. /// 成绩类型
  217. /// </summary>
  218. [DisplayName("成绩类型")]
  219. public string ResultTypeName
  220. {
  221. get
  222. {
  223. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ResultType.ToString())
  224. .Where(x => x.Value == ResultTypeID)
  225. .Select(x => x.Name).FirstOrDefault();
  226. }
  227. }
  228. /// <summary>
  229. /// 考试方式
  230. /// </summary>
  231. [Required]
  232. [DisplayName("考试方式")]
  233. public int? ExaminationModeID { get; set; }
  234. /// <summary>
  235. /// 考试方式
  236. /// </summary>
  237. [DisplayName("考试方式")]
  238. public string ExaminationModeName
  239. {
  240. get
  241. {
  242. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationMode.ToString())
  243. .Where(x => x.Value == ExaminationModeID)
  244. .Select(x => x.Name).FirstOrDefault();
  245. }
  246. }
  247. /// <summary>
  248. /// 考试日期
  249. /// </summary>
  250. [DisplayName("考试日期")]
  251. public DateTime? ExamsDatetime { get; set; }
  252. /// <summary>
  253. /// 录入截止日期
  254. /// </summary>
  255. [DisplayName("录入截止日期")]
  256. public DateTime? EntryDeadlineTime { get; set; }
  257. /// <summary>
  258. /// 录入人
  259. /// </summary>
  260. [Required]
  261. [DisplayName("录入人")]
  262. public Guid? CreatorUserID { get; set; }
  263. /// <summary>
  264. /// 录入人编号
  265. /// </summary>
  266. [DisplayName("录入人编号")]
  267. public string CreatorUserCode{ get; set; }
  268. /// <summary>
  269. /// 录入人姓名
  270. /// </summary>
  271. [DisplayName("录入人姓名")]
  272. public string CreatorUserName { get; set; }
  273. /// <summary>
  274. /// 学生ID
  275. /// </summary>
  276. [Required]
  277. [DisplayName("学生ID")]
  278. public Guid? UserID { get; set; }
  279. /// <summary>
  280. /// 学号
  281. /// </summary>
  282. [DisplayName("学号")]
  283. public string LoginID { get; set; }
  284. /// <summary>
  285. /// 姓名
  286. /// </summary>
  287. [DisplayName("姓名")]
  288. public string UserName { get; set; }
  289. /// <summary>
  290. /// 考试状态
  291. /// </summary>
  292. [DisplayName("考试状态")]
  293. [Required]
  294. public int? ExamsStateID { get; set; }
  295. /// <summary>
  296. /// 考试状态
  297. /// </summary>
  298. public string ExamsStateName
  299. {
  300. get
  301. {
  302. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExamsState.ToString())
  303. .Where(x => x.Value == ExamsStateID)
  304. .Select(x => x.Name).FirstOrDefault();
  305. }
  306. }
  307. /// <summary>
  308. /// 平时成绩
  309. /// </summary>
  310. //[DisplayName("平时成绩")]
  311. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Peacetime")]
  312. public decimal? Pingshi { get; set; }
  313. /// <summary>
  314. /// 技术成绩
  315. /// </summary>
  316. //[DisplayName("技术成绩")]
  317. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Technique")]
  318. public decimal? Jishu { get; set; }
  319. /// <summary>
  320. /// 理论成绩
  321. /// </summary>
  322. //[DisplayName("理论成绩")]
  323. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Theoretical")]
  324. public decimal? Lilun { get; set; }
  325. /// <summary>
  326. /// 总成绩
  327. /// </summary>
  328. [DisplayName("总成绩")]
  329. public decimal? TotalScore { get; set; }
  330. /// <summary>
  331. /// 总成绩
  332. /// </summary>
  333. [DisplayName("总成绩")]
  334. public string TotalScoreStr { get; set; }
  335. /// <summary>
  336. /// 学分
  337. /// </summary>
  338. [DisplayName("学分")]
  339. public decimal? ScoreCredit { get; set; }
  340. /// <summary>
  341. /// 绩点
  342. /// </summary>
  343. [DisplayName("绩点")]
  344. public decimal? GradePoint { get; set; }
  345. /// <summary>
  346. /// 备注
  347. /// </summary>
  348. [DisplayName("备注")]
  349. public string Remarks { get; set; }
  350. /// <summary>
  351. /// 备注
  352. /// </summary>
  353. [DisplayName("备注")]
  354. public string StudentScoreRemark { get; set; }
  355. /// <summary>
  356. /// 创建时间
  357. /// </summary>
  358. [DisplayName("创建时间")]
  359. public DateTime? CreateTime { get; set; }
  360. /// <summary>
  361. /// 创建人
  362. /// </summary>
  363. [DisplayName("创建人")]
  364. public Guid? CreateUserID { get; set; }
  365. [DisplayName("等级明细")]
  366. public Guid? ResultTypeDetailID { get; set; }
  367. [DisplayName("等级明细")]
  368. public string ResultTypeDetailName { get; set; }
  369. [DisplayName("处理方式")]
  370. public int? HandleModeID { get; set; }
  371. [DisplayName("考试方式")]
  372. public string HandleModeName
  373. {
  374. get
  375. {
  376. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_HandleMode.ToString())
  377. .Where(x => x.Value == HandleModeID)
  378. .Select(x => x.Name).FirstOrDefault();
  379. }
  380. }
  381. }
  382. }