FinalExaminationView.cs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  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. using EMIS.Entities;
  9. namespace EMIS.ViewModel.ScoreManage
  10. {
  11. public class FinalExaminationView
  12. {
  13. /// <summary>
  14. /// 期末设定ID
  15. /// </summary>
  16. [DisplayName("期末设定ID")]
  17. public Guid? FinalExaminationID { get; set; }
  18. /// <summary>
  19. /// 设定类型
  20. /// </summary>
  21. public int? ExaminationType { get; set; }
  22. /// <summary>
  23. /// 设定类型
  24. /// </summary>
  25. public string ExaminationTypeName
  26. {
  27. get
  28. {
  29. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationType.ToString())
  30. .Where(x => x.Value == ExaminationType)
  31. .Select(x => x.Name).FirstOrDefault();
  32. }
  33. }
  34. /// <summary>
  35. /// 学年学期
  36. /// </summary>
  37. [Required]
  38. [DisplayName("学年学期")]
  39. public Guid? SchoolyearID { get; set; }
  40. /// <summary>
  41. /// 学年学期
  42. /// </summary>
  43. [DisplayName("学年学期")]
  44. public string SchoolyearCode { get; set; }
  45. /// <summary>
  46. /// 教学任务主表ID
  47. /// </summary>
  48. [DisplayName("教学任务主表ID")]
  49. public Guid? EducationMissionID { get; set; }
  50. /// <summary>
  51. /// 开课院系所
  52. /// </summary>
  53. public Guid? CourseCollegeID { get; set; }
  54. /// <summary>
  55. /// 院系所
  56. /// </summary>
  57. [Required]
  58. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  59. public Guid? CollegeID { get; set; }
  60. /// <summary>
  61. /// 院系所
  62. /// </summary>
  63. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  64. public string CollegeName { get; set; }
  65. /// <summary>
  66. /// 开课教研室
  67. /// </summary>
  68. [Required]
  69. [DisplayName("开课教研室")]
  70. public Guid? DepartmentID { get; set; }
  71. /// <summary>
  72. /// 教研室
  73. /// </summary>
  74. [DisplayName("教研室")]
  75. public string DepartmentName { get; set; }
  76. /// <summary>
  77. /// 录入班级名称
  78. /// </summary>
  79. [Required]
  80. [DisplayName("录入班级名称")]
  81. public string ClassName { get; set; }
  82. /// <summary>
  83. /// 班级ID
  84. /// </summary>
  85. [DisplayName("班级ID")]
  86. public Guid? ClassmajorID { get; set; }
  87. /// <summary>
  88. /// 班级编号
  89. /// </summary>
  90. [DisplayName("班级编号")]
  91. public string ClassID { get; set; }
  92. /// <summary>
  93. /// 班级编号
  94. /// </summary>
  95. [DisplayName("班级编号")]
  96. public string ClassmajorCode { get; set; }
  97. /// <summary>
  98. /// 班级名称
  99. /// </summary>
  100. [DisplayName("班级名称")]
  101. public string ClassmajorName { get; set; }
  102. /// <summary>
  103. /// 年级
  104. /// </summary>
  105. [Required]
  106. [DisplayName("年级")]
  107. public int? GradeYearID { get; set; }
  108. ///<summary>
  109. /// 专业信息ID
  110. ///</summary>
  111. [DisplayName("专业信息ID")]
  112. public int? StandardID { get; set; }
  113. ///<summary>
  114. /// 专业代码
  115. ///</summary>
  116. [DisplayName("专业代码")]
  117. public string StandardCode { get; set; }
  118. ///<summary>
  119. /// 专业名称
  120. ///</summary>
  121. [DisplayName("专业名称")]
  122. public string StandardName { get; set; }
  123. ///<summary>
  124. /// 开课学期
  125. ///</summary>
  126. [Required]
  127. [DisplayName("开课学期")]
  128. public int? StarttermID { get; set; }
  129. /// <summary>
  130. /// 开课学期
  131. /// </summary>
  132. [DisplayName("开课学期")]
  133. public string StarttermName
  134. {
  135. get
  136. {
  137. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Startterm.ToString())
  138. .Where(x => x.Value == StarttermID)
  139. .Select(x => x.Name).FirstOrDefault();
  140. }
  141. }
  142. /// <summary>
  143. /// 课程名称
  144. /// </summary>
  145. [Required]
  146. [DisplayName("课程名称")]
  147. public Guid? CoursematerialID { get; set; }
  148. /// <summary>
  149. /// 课程代码
  150. /// </summary>
  151. [DisplayName("课程代码")]
  152. public string CourseCode { get; set; }
  153. /// <summary>
  154. /// 课程名称
  155. /// </summary>
  156. [DisplayName("课程名称")]
  157. public string CourseName { get; set; }
  158. /// <summary>
  159. /// 课程类型
  160. /// </summary>
  161. [Required]
  162. [DisplayName("课程类型")]
  163. public int? CourseTypeID { get; set; }
  164. /// <summary>
  165. /// 课程类型
  166. /// </summary>
  167. [DisplayName("课程类型")]
  168. public string CourseTypeName
  169. {
  170. get
  171. {
  172. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseType.ToString())
  173. .Where(x => x.Value == CourseTypeID)
  174. .Select(x => x.Name).FirstOrDefault();
  175. }
  176. }
  177. /// <summary>
  178. /// 考试性质
  179. /// </summary>
  180. [Required]
  181. [DisplayName("考试性质")]
  182. public int? ExamsCategoryID { get; set; }
  183. /// <summary>
  184. /// 考试性质
  185. /// </summary>
  186. [DisplayName("考试性质")]
  187. public string ExamsCategoryName
  188. {
  189. get
  190. {
  191. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExamsCategory.ToString())
  192. .Where(x => x.Value == ExamsCategoryID)
  193. .Select(x => x.Name).FirstOrDefault();
  194. }
  195. }
  196. /// <summary>
  197. /// 考试方式
  198. /// </summary>
  199. [Required]
  200. [DisplayName("考试方式")]
  201. public int? ExaminationModeID { get; set; }
  202. /// <summary>
  203. /// 考试方式
  204. /// </summary>
  205. [DisplayName("考试方式")]
  206. public string ExaminationModeName
  207. {
  208. get
  209. {
  210. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationMode.ToString())
  211. .Where(x => x.Value == ExaminationModeID)
  212. .Select(x => x.Name).FirstOrDefault();
  213. }
  214. }
  215. /// <summary>
  216. /// 课程学分
  217. /// </summary>
  218. [Required]
  219. [DisplayName("课程学分")]
  220. [RegularExpression(@"^\d+(\.\d{1,2})?$", ErrorMessage = "请输整数或保留2位小数")]
  221. public decimal? Credit { get; set; }
  222. /// <summary>
  223. /// 总学时
  224. /// </summary>
  225. [Required]
  226. [DisplayName("总学时")]
  227. public int? TotalHours { get; set; }
  228. /// <summary>
  229. /// 考试日期
  230. /// </summary>
  231. [DisplayName("考试日期")]
  232. public DateTime? ExamsDatetime { get; set; }
  233. /// <summary>
  234. /// 成绩类型
  235. /// </summary>
  236. [Required]
  237. [DisplayName("成绩类型")]
  238. public int? ResultTypeID { get; set; }
  239. /// <summary>
  240. /// 成绩类型
  241. /// </summary>
  242. [DisplayName("成绩类型")]
  243. public string ResultTypeName
  244. {
  245. get
  246. {
  247. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ResultType.ToString())
  248. .Where(x => x.Value == ResultTypeID)
  249. .Select(x => x.Name).FirstOrDefault();
  250. }
  251. }
  252. /// <summary>
  253. /// 录入人ID
  254. /// </summary>
  255. //[Required]
  256. [DisplayName("录入人ID")]
  257. public Guid? CreatorUserID { get; set; }
  258. /// <summary>
  259. /// 录入人编号
  260. /// </summary>
  261. [DisplayName("录入人编号")]
  262. public string CreatorUserNo { get; set; }
  263. /// <summary>
  264. /// 录入人姓名
  265. /// </summary>
  266. [DisplayName("录入人姓名")]
  267. public string CreatorUserName { get; set; }
  268. /// <summary>
  269. /// 录入截止日期
  270. /// </summary>
  271. [DisplayName("录入截止日期")]
  272. public DateTime? EntryDeadlineTime { get; set; }
  273. /// <summary>
  274. /// 学生数
  275. /// </summary>
  276. [DisplayName("学生数")]
  277. public int? StudentCount { get; set; }
  278. /// <summary>
  279. /// 未录入人数
  280. /// </summary>
  281. [DisplayName("未录入人数")]
  282. public int? SAPunlogStudentCount { get; set; }
  283. /// <summary>
  284. ///
  285. /// </summary>
  286. [DisplayName("")]
  287. public int? sAPunlogStudentCounts
  288. {
  289. get
  290. {
  291. if (SAPunlogStudentCount >= 0)
  292. {
  293. return SAPunlogStudentCount;
  294. }
  295. else
  296. {
  297. SAPunlogStudentCount = SAPunlogStudentCount * (-1);
  298. return SAPunlogStudentCount;
  299. }
  300. }
  301. }
  302. /// <summary>
  303. /// 是否可录入
  304. /// </summary>
  305. [DisplayName("是否可录入")]
  306. public bool IsEntry { get; set; }
  307. /// <summary>
  308. /// 是否可录入
  309. /// </summary>
  310. [DisplayName("是否可录入")]
  311. public string IsEntryName
  312. {
  313. get
  314. {
  315. return IsEntry == true ? "可录入" : "不可录入";
  316. }
  317. }
  318. ///<summary>
  319. /// 同时添加学生
  320. ///</summary>
  321. [DisplayName("同时添加学生")]
  322. public bool isAutoAdd { get; set; }
  323. /// <summary>
  324. /// 已通过状态
  325. /// </summary>
  326. [DisplayName("已通过状态")]
  327. public int? ApprovalEndStatus { get; set; }
  328. /// <summary>
  329. /// 审核状态
  330. /// </summary>
  331. [DisplayName("审核状态")]
  332. public int? ApprovalStatus { get; set; }
  333. /// <summary>
  334. /// 审核状态
  335. /// </summary>
  336. [DisplayName("审核状态")]
  337. public string ApprovalStatusName
  338. {
  339. get;
  340. set;
  341. //get
  342. //{
  343. // return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ScoreState.ToString())
  344. // .Where(x => x.Value == ApprovalStatus)
  345. // .Select(x => x.Name).FirstOrDefault();
  346. //}
  347. }
  348. /// <summary>
  349. /// 总评语
  350. /// </summary>
  351. [DisplayName("总评语")]
  352. public string Comment { get; set; }
  353. /// <summary>
  354. /// 总分公式ID
  355. /// </summary>
  356. [DisplayName("总分公式ID")]
  357. public Guid? ScoreFormulaID { get; set; }
  358. /// <summary>
  359. /// 学分公式ID
  360. /// </summary>
  361. [DisplayName("学分公式ID")]
  362. public Guid? CreditFormulaID { get; set; }
  363. /// <summary>
  364. /// 绩点公式ID
  365. /// </summary>
  366. [DisplayName("绩点公式ID")]
  367. public Guid? GradePointFormulaID { get; set; }
  368. /// <summary>
  369. /// 处理方式
  370. /// </summary>
  371. [DisplayName("处理方式")]
  372. public int? HandleModeID { get; set; }
  373. ///// <summary>
  374. ///// 开课学年
  375. ///// </summary>
  376. //[DisplayName("开课学年")]
  377. //public int? SchooolYearNumID { get; set; }
  378. /// <summary>
  379. /// 备注
  380. /// </summary>
  381. [DisplayName("备注")]
  382. public string Remarks { get; set; }
  383. //成绩审核的撤销功能用到
  384. [Required]
  385. [DisplayName("学号")]
  386. public Guid? UserID { get; set; }
  387. /// <summary>
  388. /// 姓名
  389. /// </summary>
  390. [DisplayName("姓名")]
  391. public string UserName { get; set; }
  392. /// <summary>
  393. /// 状态
  394. /// </summary>
  395. [DisplayName("状态")]
  396. public int? RecordStatus { get; set; }
  397. /// <summary>
  398. /// 创建时间
  399. /// </summary>
  400. [DisplayName("创建时间")]
  401. public DateTime? CreateTime { get; set; }
  402. /// <summary>
  403. /// 创建人
  404. /// </summary>
  405. [DisplayName("创建人")]
  406. public Guid? CreateUserID { get; set; }
  407. }
  408. }