LevelScoreView.cs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.ComponentModel;
  7. using Bowin.Common.Mvc;
  8. using EMIS.ViewModel.CacheManage;
  9. namespace EMIS.ViewModel.ScoreManage
  10. {
  11. public class LevelScoreView
  12. {
  13. /// <summary>
  14. /// 主键ID
  15. /// </summary>
  16. [DisplayName("主键ID")]
  17. public Guid? LevelScoreID { get; set; }
  18. /// <summary>
  19. /// 学年学期
  20. /// </summary>
  21. [DisplayName("学年学期")]
  22. public Guid? SchoolyearID { get; set; }
  23. /// <summary>
  24. /// 学年学期
  25. /// </summary>
  26. [DisplayName("学年学期")]
  27. public string SchoolyearCode { get; set; }
  28. public Guid? ExaminationRegistrationID { get; set; }
  29. [Required]
  30. [DisplayName("考试科目")]
  31. public Guid? ExaminationSubjectID { get; set; }
  32. [DisplayName("考试科目")]
  33. public string ExaminationSubjectName { get; set; }
  34. [Required]
  35. public Guid? UserID { get; set; }
  36. [Required]
  37. [DisplayName("学号")]
  38. public string LoginID { get; set; }
  39. [DisplayName("姓名")]
  40. public string UserName { get; set; }
  41. /// <summary>
  42. /// 性别
  43. /// </summary>
  44. [DisplayName("性别")]
  45. public int? Sex { get; set; }
  46. /// <summary>
  47. /// 性别
  48. /// </summary>
  49. [DisplayName("性别")]
  50. public string SexName
  51. {
  52. get
  53. {
  54. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Sex.ToString())
  55. .Where(x => x.Value == Sex)
  56. .Select(x => x.Name).FirstOrDefault();
  57. }
  58. }
  59. /// <summary>
  60. /// 出生日期
  61. /// </summary>
  62. [DisplayName("出生日期")]
  63. public DateTime? BirthDate { get; set; }
  64. /// <summary>
  65. /// 民族
  66. /// </summary>
  67. [DisplayName("民族")]
  68. public int? NationID { get; set; }
  69. /// <summary>
  70. /// 民族
  71. /// </summary>
  72. [DisplayName("民族")]
  73. public string NationName
  74. {
  75. get
  76. {
  77. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Nation.ToString())
  78. .Where(x => x.Value == NationID)
  79. .Select(x => x.Name).FirstOrDefault();
  80. }
  81. }
  82. /// <summary>
  83. /// 政治面貌
  84. /// </summary>
  85. [DisplayName("政治面貌")]
  86. public int? PoliticsID { get; set; }
  87. /// <summary>
  88. /// 政治面貌
  89. /// </summary>
  90. [DisplayName("政治面貌")]
  91. public string PoliticsName
  92. {
  93. get
  94. {
  95. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Politics.ToString())
  96. .Where(x => x.Value == PoliticsID)
  97. .Select(x => x.Name).FirstOrDefault();
  98. }
  99. }
  100. /// <summary>
  101. /// 身份证号
  102. /// </summary>
  103. [DisplayName("身份证号")]
  104. public string IDNumber { get; set; }
  105. /// <summary>
  106. /// 在校状态
  107. /// </summary>
  108. [DisplayName("在校状态")]
  109. public int? InSchoolStatusID { get; set; }
  110. /// <summary>
  111. /// 在校状态
  112. /// </summary>
  113. [DisplayName("在校状态")]
  114. public string InSchoolStatusName
  115. {
  116. get
  117. {
  118. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_InschoolStatus.ToString())
  119. .Where(x => x.Value == InSchoolStatusID)
  120. .Select(x => x.Name).FirstOrDefault();
  121. }
  122. }
  123. /// <summary>
  124. /// 学籍状态
  125. /// </summary>
  126. [DisplayName("学籍状态")]
  127. public int? StudentStatusID { get; set; }
  128. /// <summary>
  129. /// 学籍状态
  130. /// </summary>
  131. [DisplayName("学籍状态")]
  132. public string StudentStatusName
  133. {
  134. get
  135. {
  136. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StudentStatus.ToString())
  137. .Where(x => x.Value == StudentStatusID).Select(x => x.Name).FirstOrDefault();
  138. }
  139. }
  140. [DisplayName("年级")]
  141. public int? YearID { get; set; }
  142. [DisplayName("年级")]
  143. public int? Years { get; set; }
  144. /// <summary>
  145. /// 专业ID(Value)
  146. /// </summary>
  147. [DisplayName("专业ID(Value)")]
  148. public int? StandardID { get; set; }
  149. /// <summary>
  150. /// 专业代码
  151. /// </summary>
  152. [DisplayName("专业代码")]
  153. public string StandardCode
  154. {
  155. get
  156. {
  157. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  158. .Where(x => x.Value == StandardID)
  159. .Select(x => x.Code).FirstOrDefault();
  160. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  161. }
  162. }
  163. /// <summary>
  164. /// 专业名称
  165. /// </summary>
  166. [DisplayName("专业名称")]
  167. public string StandardName
  168. {
  169. get
  170. {
  171. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  172. .Where(x => x.Value == StandardID)
  173. .Select(x => x.Name).FirstOrDefault();
  174. }
  175. }
  176. /// <summary>
  177. /// 培养层次
  178. /// </summary>
  179. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  180. public int? EducationID { get; set; }
  181. /// <summary>
  182. /// 培养层次
  183. /// </summary>
  184. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  185. public string EducationName
  186. {
  187. get
  188. {
  189. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
  190. .Where(x => x.Value == EducationID)
  191. .Select(x => x.Name).FirstOrDefault();
  192. }
  193. }
  194. /// <summary>
  195. /// 学习形式
  196. /// </summary>
  197. [DisplayName("学习形式")]
  198. public int? LearningformID { get; set; }
  199. /// <summary>
  200. /// 学习形式
  201. /// </summary>
  202. [DisplayName("学习形式")]
  203. public string LearningformName
  204. {
  205. get
  206. {
  207. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
  208. .Where(x => x.Value == LearningformID)
  209. .Select(x => x.Name).FirstOrDefault();
  210. }
  211. }
  212. /// <summary>
  213. /// 学制
  214. /// </summary>
  215. [DisplayName("学制")]
  216. public decimal? LearnSystem { get; set; }
  217. [DisplayName("学籍卡编号")]
  218. public string StudentCardNo { get; set; }
  219. public string StudentCardNoStr { get; set; }
  220. /// <summary>
  221. /// 班级信息ID
  222. /// </summary>
  223. [DisplayName("班级信息ID")]
  224. public Guid? ClassmajorID { get; set; }
  225. /// <summary>
  226. /// 班级编号
  227. /// </summary>
  228. [DisplayName("班级编号")]
  229. public string ClassmajorCode { get; set; }
  230. /// <summary>
  231. /// 班级名称
  232. /// </summary>
  233. [DisplayName("班级名称")]
  234. public string ClassmajorName { get; set; }
  235. /// <summary>
  236. /// 年级专业ID
  237. /// </summary>
  238. [DisplayName("年级专业ID")]
  239. public Guid? GrademajorID { get; set; }
  240. /// <summary>
  241. /// 年级专业编号
  242. /// </summary>
  243. [DisplayName("年级专业编号")]
  244. public string GrademajorCode { get; set; }
  245. /// <summary>
  246. /// 年级专业名称
  247. /// </summary>
  248. [DisplayName("年级专业名称")]
  249. public string GrademajorName { get; set; }
  250. /// <summary>
  251. /// 院系专业ID
  252. /// </summary>
  253. [DisplayName("院系专业ID")]
  254. public Guid? FacultymajorID { get; set; }
  255. /// <summary>
  256. /// 院系专业编号
  257. /// </summary>
  258. [DisplayName("院系专业编号")]
  259. public string FacultymajorCode { get; set; }
  260. /// <summary>
  261. /// 院系专业名称
  262. /// </summary>
  263. [DisplayName("院系专业名称")]
  264. public string FacultymajorName { get; set; }
  265. /// <summary>
  266. /// 院系所ID
  267. /// </summary>
  268. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
  269. public Guid? CollegeID { get; set; }
  270. /// <summary>
  271. /// 院系所代码
  272. /// </summary>
  273. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  274. public string CollegeNo { get; set; }
  275. /// <summary>
  276. /// 院系所名称
  277. /// </summary>
  278. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  279. public string CollegeName { get; set; }
  280. /// <summary>
  281. /// 校区ID
  282. /// </summary>
  283. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
  284. public Guid? CampusID { get; set; }
  285. /// <summary>
  286. /// 校区代码
  287. /// </summary>
  288. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
  289. public string CampusNo { get; set; }
  290. /// <summary>
  291. /// 校区名称
  292. /// </summary>
  293. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")]
  294. public string CampusName { get; set; }
  295. [DisplayName("成绩单编号")]
  296. public string ScoreNo { get; set; }
  297. [DataType(DataType.Date)]
  298. [DisplayFormat(DataFormatString = "{0:yyyy-MM}")]
  299. [DisplayName("考试日期")]
  300. public DateTime? ExaminationDate { get; set; }
  301. public string ExaminationDateStr { get; set; }
  302. [DisplayName("有效期")]
  303. public DateTime? ValidDate { get; set; }
  304. public string ValidDateStr { get; set; }
  305. [DisplayName("总成绩")]
  306. public decimal? TotalScore { get; set; }
  307. public Guid? LevelSettingID { get; set; }
  308. [Required]
  309. [DisplayName("成绩等级")]
  310. public string LevelName { get; set; }
  311. [Required]
  312. [DisplayName("成绩等级序号")]
  313. public int LevelNo { get; set; }
  314. [Required]
  315. [DisplayName("起始分")]
  316. [RegularExpression(@"(^[0-9]+d*.d*$)", ErrorMessage = "不符合格式")]
  317. public decimal MinScore { get; set; }
  318. [Required]
  319. [DisplayName("终止分")]
  320. [RegularExpression(@"(^[0-9]+d*.d*$)", ErrorMessage = "不符合格式")]
  321. public decimal MaxScore { get; set; }
  322. [DisplayName("成绩分数段")]
  323. public string ScoreRange { get; set; }
  324. public string ReturnMessage { get; set; }
  325. /// <summary>
  326. /// 错误信息
  327. /// </summary>
  328. [DisplayName("错误信息")]
  329. public string ErrorMessage { get; set; }
  330. private bool _isExcelVaildateOK = true;
  331. /// <summary>
  332. /// Excel验证是否通过,默认为true
  333. /// <para>true:通过;false:不通过</para>
  334. /// </summary>
  335. public bool IsExcelVaildateOK
  336. {
  337. get { return _isExcelVaildateOK; }
  338. set { _isExcelVaildateOK = value; }
  339. }
  340. [DisplayName("备注")]
  341. public string Remark { get; set; }
  342. /// <summary>
  343. /// 状态
  344. /// </summary>
  345. [DisplayName("状态")]
  346. public int? RecordStatus { get; set; }
  347. /// <summary>
  348. /// 创建人
  349. /// </summary>
  350. [DisplayName("创建人")]
  351. public Guid? CreateUserID { get; set; }
  352. /// <summary>
  353. /// 创建时间
  354. /// </summary>
  355. [DisplayName("创建时间")]
  356. public DateTime? CreateTime { get; set; }
  357. /// <summary>
  358. /// 修改人
  359. /// </summary>
  360. [DisplayName("")]
  361. public Guid? ModifyUserID { get; set; }
  362. /// <summary>
  363. /// 修改时间
  364. /// </summary>
  365. [DisplayName("修改时间")]
  366. public DateTime? ModifyTime { get; set; }
  367. }
  368. }