ImportScoreView.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  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 EMIS.ViewModel.CacheManage;
  8. namespace EMIS.ViewModel.ScoreManage
  9. {
  10. public class ImportScoreView
  11. {
  12. /// <summary>
  13. /// 导入成绩(平时成绩)主键ID
  14. /// </summary>
  15. [DisplayName("导入成绩主键ID")]
  16. public Guid ImportScoreID { get; set; }
  17. /// <summary>
  18. /// 学年学期ID
  19. /// </summary>
  20. [Required]
  21. [DisplayName("学年学期ID")]
  22. public Nullable<System.Guid> SchoolyearID { get; set; }
  23. /// <summary>
  24. /// 学年学期
  25. /// </summary>
  26. [DisplayName("学年学期")]
  27. public string SchoolyearCode { get; set; }
  28. /// <summary>
  29. /// 用户ID
  30. /// </summary>
  31. [Required]
  32. [DisplayName("用户ID")]
  33. public Guid? UserID { get; set; }
  34. /// <summary>
  35. /// 学号
  36. /// </summary>
  37. [DisplayName("学号")]
  38. public string StudentNo { get; set; }
  39. /// <summary>
  40. /// 姓名
  41. /// </summary>
  42. [DisplayName("姓名")]
  43. public string UserName { get; set; }
  44. /// <summary>
  45. /// 性别
  46. /// </summary>
  47. [DisplayName("性别")]
  48. public int? Sex { get; set; }
  49. /// <summary>
  50. /// 性别
  51. /// </summary>
  52. [DisplayName("性别")]
  53. public string SexName
  54. {
  55. get
  56. {
  57. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Sex.ToString())
  58. .Where(x => x.Value == Sex)
  59. .Select(x => x.Name).FirstOrDefault();
  60. }
  61. }
  62. /// <summary>
  63. /// 在校状态
  64. /// </summary>
  65. [DisplayName("在校状态")]
  66. public int? InSchoolStatusID { get; set; }
  67. /// <summary>
  68. /// 在校状态
  69. /// </summary>
  70. [DisplayName("在校状态")]
  71. public string InSchoolStatusName
  72. {
  73. get
  74. {
  75. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_InschoolStatus.ToString())
  76. .Where(x => x.Value == InSchoolStatusID)
  77. .Select(x => x.Name).FirstOrDefault();
  78. }
  79. }
  80. /// <summary>
  81. /// 学籍状态
  82. /// </summary>
  83. [DisplayName("学籍状态")]
  84. public int? StudentStatusID { get; set; }
  85. /// <summary>
  86. /// 学籍状态
  87. /// </summary>
  88. [DisplayName("学籍状态")]
  89. public string StudentStatusName
  90. {
  91. get
  92. {
  93. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StudentStatus.ToString())
  94. .Where(x => x.Value == StudentStatusID)
  95. .Select(x => x.Name).FirstOrDefault();
  96. }
  97. }
  98. /// <summary>
  99. /// 班级信息ID
  100. /// </summary>
  101. [Required]
  102. [DisplayName("班级信息ID")]
  103. public Guid? ClassID { get; set; }
  104. /// <summary>
  105. /// 班级编号
  106. /// </summary>
  107. [DisplayName("班级编号")]
  108. public string ClassNo { get; set; }
  109. /// <summary>
  110. /// 班级名称
  111. /// </summary>
  112. [DisplayName("班级名称")]
  113. public string ClassName { get; set; }
  114. /// <summary>
  115. /// 年级专业ID
  116. /// </summary>
  117. [Required]
  118. [DisplayName("年级专业ID")]
  119. public Guid? GrademajorID { get; set; }
  120. /// <summary>
  121. /// 年级专业编号
  122. /// </summary>
  123. [DisplayName("年级专业编号")]
  124. public string GrademajorCode { get; set; }
  125. /// <summary>
  126. /// 年级专业名称
  127. /// </summary>
  128. [DisplayName("年级专业名称")]
  129. public string GrademajorName { get; set; }
  130. /// <summary>
  131. /// 院系专业ID
  132. /// </summary>
  133. [DisplayName("院系专业ID")]
  134. public Guid? FacultymajorID { get; set; }
  135. /// <summary>
  136. /// 院系专业编号
  137. /// </summary>
  138. [DisplayName("院系专业编号")]
  139. public string FacultymajorNo { get; set; }
  140. /// <summary>
  141. /// 院系专业名称
  142. /// </summary>
  143. [DisplayName("院系专业名称")]
  144. public string FacultymajorName { get; set; }
  145. /// <summary>
  146. /// 院系所ID
  147. /// </summary>
  148. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
  149. public Guid? CollegeID { get; set; }
  150. /// <summary>
  151. /// 院系所代码
  152. /// </summary>
  153. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  154. public string CollegeNo { get; set; }
  155. /// <summary>
  156. /// 院系所名称
  157. /// </summary>
  158. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  159. public string CollegeName { get; set; }
  160. /// <summary>
  161. /// 校区ID
  162. /// </summary>
  163. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
  164. public Guid? CampusID { get; set; }
  165. /// <summary>
  166. /// 校区代码
  167. /// </summary>
  168. [Required]
  169. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
  170. public string CampusNo { get; set; }
  171. /// <summary>
  172. /// 校区名称
  173. /// </summary>
  174. [Required]
  175. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")]
  176. public string CampusName { get; set; }
  177. /// <summary>
  178. /// 年级
  179. /// </summary>
  180. [DisplayName("年级")]
  181. public int? GradeID { get; set; }
  182. /// <summary>
  183. /// 专业ID(Value)
  184. /// </summary>
  185. [DisplayName("专业ID(Value)")]
  186. public int? StandardID { get; set; }
  187. /// <summary>
  188. /// 专业代码
  189. /// </summary>
  190. [DisplayName("专业代码")]
  191. public string StandardCode
  192. {
  193. get
  194. {
  195. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  196. .Where(x => x.Value == StandardID)
  197. .Select(x => x.Code).FirstOrDefault();
  198. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  199. }
  200. }
  201. /// <summary>
  202. /// 专业名称
  203. /// </summary>
  204. [DisplayName("专业名称")]
  205. public string StandardName
  206. {
  207. get
  208. {
  209. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  210. .Where(x => x.Value == StandardID)
  211. .Select(x => x.Name).FirstOrDefault();
  212. }
  213. }
  214. /// <summary>
  215. /// 培养层次
  216. /// </summary>
  217. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  218. public int? EducationID { get; set; }
  219. /// <summary>
  220. /// 培养层次
  221. /// </summary>
  222. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  223. public string EducationName
  224. {
  225. get
  226. {
  227. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
  228. .Where(x => x.Value == EducationID)
  229. .Select(x => x.Name).FirstOrDefault();
  230. }
  231. }
  232. /// <summary>
  233. /// 学习形式
  234. /// </summary>
  235. [DisplayName("学习形式")]
  236. public int? LearningformID { get; set; }
  237. /// <summary>
  238. /// 学习形式
  239. /// </summary>
  240. [DisplayName("学习形式")]
  241. public string LearningformName
  242. {
  243. get
  244. {
  245. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
  246. .Where(x => x.Value == LearningformID)
  247. .Select(x => x.Name).FirstOrDefault();
  248. }
  249. }
  250. /// <summary>
  251. /// 学制
  252. /// </summary>
  253. [DisplayName("学制")]
  254. public decimal? LearnSystem { get; set; }
  255. /// <summary>
  256. /// 课程信息ID
  257. /// </summary>
  258. [Required]
  259. [DisplayName("课程信息ID")]
  260. public Nullable<System.Guid> CoursematerialID { get; set; }
  261. /// <summary>
  262. /// 课程代码
  263. /// </summary>
  264. [DisplayName("课程代码")]
  265. public string CourseCode { get; set; }
  266. /// <summary>
  267. /// 课程名称
  268. /// </summary>
  269. [DisplayName("课程名称")]
  270. public string CourseName { get; set; }
  271. /// <summary>
  272. /// 成绩
  273. /// </summary>
  274. [Required]
  275. [DisplayName("成绩")]
  276. [RegularExpression(@"^\d+(\.\d{1,2})?$", ErrorMessage = "请输入分数或保留2位以下小数点分数")]
  277. public Nullable<decimal> Score { get; set; }
  278. /// <summary>
  279. /// 成绩(Excel导入)
  280. /// </summary>
  281. [DisplayName("成绩")]
  282. public string ScoreStr { get; set; }
  283. /// <summary>
  284. /// 错误信息(Excel导入)
  285. /// </summary>
  286. [DisplayName("错误信息")]
  287. public string ErrorMessage { get; set; }
  288. /// <summary>
  289. /// 备注
  290. /// </summary>
  291. [DisplayName("备注")]
  292. public string Remark { get; set; }
  293. /// <summary>
  294. /// 创建人ID
  295. /// </summary>
  296. [DisplayName("创建人ID")]
  297. public Guid? CreateUserID { get; set; }
  298. /// <summary>
  299. /// 创建时间
  300. /// </summary>
  301. [DisplayName("创建时间")]
  302. public DateTime? CreateTime { get; set; }
  303. /// <summary>
  304. /// 操作人ID
  305. /// </summary>
  306. [DisplayName("操作人ID")]
  307. public Guid? ModifyUserID { get; set; }
  308. /// <summary>
  309. /// 操作人编号
  310. /// </summary>
  311. [DisplayName("操作人编号")]
  312. public string ModifyUserNo { get; set; }
  313. /// <summary>
  314. /// 操作人
  315. /// </summary>
  316. [DisplayName("操作人")]
  317. public string ModifyUserName { get; set; }
  318. /// <summary>
  319. /// 操作时间
  320. /// </summary>
  321. [DisplayName("操作时间")]
  322. public DateTime? ModifyTime { get; set; }
  323. }
  324. }