ExaminationScoreView.cs 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. using EMIS.ViewModel.Cache;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.Linq;
  7. using System.Text;
  8. namespace EMIS.ViewModel.ScoreManage
  9. {
  10. public class ExaminationScoreView
  11. {
  12. [DisplayName("过级成绩ID")]
  13. public Guid? ExaminationScoreID { get; set; }
  14. [Required]
  15. [DisplayName("学年学期")]
  16. public Guid? SchoolyearID { get; set; }
  17. [DisplayName("学年学期")]
  18. public string SchoolyearCode { get; set; }
  19. [DisplayName("考试批次")]
  20. public Guid? ExaminationBatchProjectID { get; set; }
  21. [Required]
  22. [DisplayName("考试批次")]
  23. public Guid? ExaminationBatchID { get; set; }
  24. [DisplayName("考试批次")]
  25. public string ExaminationBatchName { get; set; }
  26. [Required]
  27. [DisplayName("考试类型")]
  28. public Guid? ExaminationTypeID { get; set; }
  29. [DisplayName("考试类型")]
  30. public string ExaminationTypeName { get; set; }
  31. [Required]
  32. [DisplayName("项目名称")]
  33. public Guid? ExaminationProjectID { get; set; }
  34. [DisplayName("项目名称")]
  35. public string ExaminationProjectName { get; set; }
  36. [Required]
  37. [DisplayName("考试科目ID")]
  38. public int? ExaminationSubjectID { get; set; }
  39. [DisplayName("导入考试科目")]
  40. public string ExaminationSubjectIDImport { get; set; }
  41. [DisplayName("考试科目项")]
  42. public string ExaminationSubjectName
  43. {
  44. get
  45. {
  46. return IdNameExt.GetDictionaryItem(DictionaryItem.EX_ExaminationSubject.ToString())
  47. .Where(x => x.Value == ExaminationSubjectID)
  48. .Select(x => x.Name).FirstOrDefault();
  49. }
  50. }
  51. [DisplayName("院系")]
  52. public Guid? CollegeID { get; set; }
  53. [DisplayName("院系")]
  54. public string CollegeName { get; set; }
  55. /// <summary>
  56. /// 校区
  57. /// </summary>
  58. public int? SchoolAreaID { get; set; }
  59. public string SchoolAreaName
  60. {
  61. get
  62. {
  63. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolArea.ToString())
  64. .Where(x => x.Value == SchoolAreaID)
  65. .Select(x => x.Name).FirstOrDefault();
  66. }
  67. }
  68. /// <summary>
  69. /// 校区ID
  70. /// </summary>
  71. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusID")]
  72. public Guid? CampusID { get; set; }
  73. /// <summary>
  74. /// 校区ID
  75. /// </summary>
  76. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
  77. public string CampusName { get; set; }
  78. [DisplayName("年级")]
  79. public int? SchoolyearNumID { get; set; }
  80. [DisplayName("年级")]
  81. public string SchoolyearNumName
  82. {
  83. get
  84. {
  85. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolyearNum.ToString())
  86. .Where(x => x.Value == SchoolyearNumID)
  87. .Select(x => x.Name).FirstOrDefault();
  88. }
  89. }
  90. [DisplayName("专业")]
  91. public int? StandardID { get; set; }
  92. [DisplayName("专业")]
  93. public string StandardName
  94. {
  95. get
  96. {
  97. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  98. .Where(x => x.Value == StandardID)
  99. .Select(x => x.Name).FirstOrDefault();
  100. }
  101. }
  102. /// <summary>
  103. /// 专业代码
  104. /// </summary>
  105. [DisplayName("专业代码")]
  106. public string StandardCode
  107. {
  108. get
  109. {
  110. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  111. .Where(x => x.Value == StandardID)
  112. .Select(x => x.Code).FirstOrDefault();
  113. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  114. }
  115. }
  116. [DisplayName("班级名称")]
  117. public Guid? ClassmajorID { get; set; }
  118. [DisplayName("班级名称")]
  119. public string ClassmajorName { get; set; }
  120. [DisplayName("学号")]
  121. public string StudentNo { get; set; }
  122. [Required]
  123. [DisplayName("学生")]
  124. public Guid? UserID { get; set; }
  125. public Guid? UserIDForIDNumber { get; set; }
  126. [DisplayName("姓名")]
  127. public string UserName { get; set; }
  128. [DisplayName("证件类型")]
  129. public int? CertificatesType { get; set; }
  130. [DisplayName("证件类型")]
  131. public string CertificatesTypeName
  132. {
  133. get
  134. {
  135. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CertificatesType.ToString())
  136. .Where(x => x.Value == CertificatesType)
  137. .Select(x => x.Name).FirstOrDefault();
  138. }
  139. }
  140. [Required]
  141. [DisplayName("证件号码")]
  142. public string IDNumber { get; set; }
  143. [Required]
  144. [DisplayName("成绩")]
  145. [RegularExpression(@"^\d+(\.\d{2})?$", ErrorMessage = "请输整数或保留2位小数")]
  146. public decimal? Score { get; set; }
  147. [DisplayName("导入成绩")]
  148. public string ScoreImport { get; set; }
  149. [DisplayName("导入有效期")]
  150. public string ExpireImport { get; set; }
  151. [DisplayName("有效期")]
  152. public DateTime? Expire { get; set; }
  153. [DisplayName("备注")]
  154. public string Remark { get; set; }
  155. ///<summary>
  156. ///
  157. /// </summary>
  158. public bool IsExcelVaildateOK { get; set; }
  159. /// <summary>
  160. /// 错误信息
  161. /// </summary>
  162. [DisplayName("错误信息")]
  163. public string ErrorMessage { get; set; }
  164. public string Theory { get; set; }
  165. public string Skill { get; set; }
  166. public string Hearing { get; set; }
  167. public string Writing { get; set; }
  168. public string Operation { get; set; }
  169. public Dictionary<int?, decimal?> ExaminationSubjectIDAndScore { get; set; }
  170. public DateTime? CreateTime { get; set; }
  171. }
  172. }