CourseGradeDAL.cs 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.Entities;
  6. using EMIS.DataLogic.Repositories;
  7. using EMIS.ViewModel.Students;
  8. using EMIS.ViewModel.ScoreManage;
  9. using EMIS.ViewModel;
  10. namespace EMIS.DataLogic.StudentSystem.MyGrade
  11. {
  12. public class CourseGradeDAL
  13. {
  14. public StudentRepository StudentRepository { get; set; }
  15. public UserRepository UserRepository { get; set; }
  16. public FinallyScoreRepository ScoreRepository { get; set; }
  17. public FinallyScoreDetailRepository FinallyScoreDetailRepository { get; set; }
  18. public SubmitedScoreDetailRepository ScoreDetailRepository { get; set; }
  19. public SubmitedScoreRepository SubmitedScoreRepository { get; set; }
  20. public DictionaryItemRepository DictionaryItemRepository { get; set; }
  21. public ClassmajorRepository ClassRepository { get; set; }
  22. public GrademajorRepository GradeRepository { get; set; }
  23. public FacultymajorRepository FacultyRepository { get; set; }
  24. public StudentProfileRepository ProfileRepository { get; set; }
  25. public StudentContactRepository ContactRepository { get; set; }
  26. public RecruitstudentsRepository RecruitsRepository { get; set; }
  27. public GraduationCourseTypeSettingRepository GraduationCourseTypeSettingRepository { get; set; }
  28. public ClubCourseRepository ClubCourseRepository { get; set; }
  29. public CourseTypeSelectCourseTypeRepository CourseTypeSelectCourseTypeRepository { get; set; }
  30. public FinallyScoreRepository finallyScoreRepository { get; set; }
  31. public GraduationCourseTypeSettingRepository graduationCourseTypeSettingRepository { get; set; }
  32. public CourseTypeSelectCourseTypeRepository courseTypeSelectCourseTypeRepository { get; set; }
  33. public ClubCourseRepository clubCourseRepository { get; set; }
  34. public ResultTypeDetailRepository ResultTypeDetailRepository { get; set; }
  35. public ExamsStateSettingRepository examsStateSettingRepository { get; set; }
  36. public virtual IList<CourseGradeView> GetStudentCourseGrade(Guid UserID)
  37. {
  38. List<int?> examsStateList = examsStateSettingRepository.GetList(x => x.IsNormal == true).Select(x => x.ExamsStateID).ToList();
  39. var query = from fina in ScoreRepository.Entities
  40. join student in StudentRepository.Entities
  41. on fina.UserID equals student.UserID
  42. join courseColour in CourseTypeSelectCourseTypeRepository.Entities
  43. on fina.CourseTypeID equals courseColour.CourseTypeID
  44. into colour
  45. from cc in colour.DefaultIfEmpty()
  46. join isClub in ClubCourseRepository.Entities
  47. on fina.EM_Coursematerial.CoursematerialID equals isClub.CoursematerialID
  48. into club
  49. from clu in club.DefaultIfEmpty()
  50. join ed in DictionaryItemRepository.GetList(x => x.DictionaryCode == "CF_ExamsState")
  51. on fina.ExamsStateID equals ed.Value
  52. into ged
  53. from f in ged.DefaultIfEmpty()
  54. join d in DictionaryItemRepository.GetList(x => x.DictionaryCode == "CF_ResultType")
  55. on fina.ResultTypeID equals d.Value
  56. join rd in ResultTypeDetailRepository.GetList(x => true)
  57. on d.Value equals rd.ResultTypeID
  58. into ResultTypeDetail
  59. from Result in ResultTypeDetail.DefaultIfEmpty()
  60. where ((Result.ResultTypeDetailID != null &&
  61. (
  62. (fina.TotalScore <= Result.MaxScore && Result.MinScore <= fina.TotalScore && (Result.MaxScoreOperator == "<=" && Result.MinScoreOperator == "<="))
  63. || (fina.TotalScore <= Result.MaxScore && Result.MinScore < fina.TotalScore && (Result.MaxScoreOperator == "<=" && Result.MinScoreOperator == "<"))
  64. || (fina.TotalScore < Result.MaxScore && Result.MinScore < fina.TotalScore && (Result.MaxScoreOperator == "<" && Result.MinScoreOperator == "<"))
  65. || (fina.TotalScore < Result.MaxScore && Result.MinScore <= fina.TotalScore && (Result.MaxScoreOperator == "<" && Result.MinScoreOperator == "<="))
  66. )
  67. )
  68. || (Result.ResultTypeDetailID == null))
  69. &&( fina.UserID == UserID)
  70. orderby new { fina.StarttermID, fina.CourseTypeID, fina.EM_Coursematerial.CourseName }
  71. select new CourseGradeView()
  72. {
  73. Club = clu.ClubCourseID,
  74. CourseTypeColour=cc.CourseTypeColour,
  75. UserID = fina.UserID,
  76. CourseName = fina.EM_Coursematerial.CourseName,
  77. TotalScore = fina.TotalScore,
  78. //暂时按此种逻辑处理。。后续优化(廖兵良)
  79. //已经优化--20180517李晓林
  80. TotalScoreStr = examsStateList.Any(w => w.Value == fina.ExamsStateID) ? (Result.Name ?? ((double)Math.Round(fina.TotalScore.Value, 1)).ToString()) : f.Name,
  81. ScoreCredit = fina.ScoreCredit,
  82. CoursematerialID = fina.CoursematerialID,
  83. SchoolyearNumID = fina.SchoolyearNumID,
  84. SchoolyearID = fina.SchoolyearID,
  85. PlanningGraduateDate = student.PlanningGraduateDate,
  86. StarttermID = fina.StarttermID
  87. };
  88. return query.ToList();
  89. }
  90. /// <summary>
  91. /// 获取已提交成绩
  92. /// </summary>
  93. /// <param name="CoursematerialID"></param>
  94. /// <param name="SchoolyearID"></param>
  95. /// <param name="UserID"></param>
  96. public virtual IList<SubmitedScoreView> GetSubmitedScoreList(Guid? CoursematerialID, int? StartTermID, Guid? UserID)
  97. {
  98. int examsState = (int)CF_ExamsState.NormalExams;
  99. var query = from submited in SubmitedScoreRepository.Entities
  100. join coursetype in DictionaryItemRepository.Entities
  101. on new { CourseTypeID = submited.CourseTypeID, DictionaryCode = typeof(CF_CourseType).Name }
  102. equals new { CourseTypeID = coursetype.Value, coursetype.DictionaryCode }
  103. into courseTypedata
  104. from courseTypetb in courseTypedata.DefaultIfEmpty()
  105. join examscategory in DictionaryItemRepository.Entities
  106. on new { CourseTypeID = submited.ExamsCategoryID, DictionaryCode = typeof(CF_ExamsCategory).Name }
  107. equals new { CourseTypeID = examscategory.Value, examscategory.DictionaryCode }
  108. into examsCategorydata
  109. from examsCategorytb in examsCategorydata.DefaultIfEmpty()
  110. join examsstate in DictionaryItemRepository.Entities
  111. on new { CourseTypeID = submited.ExamsStateID, DictionaryCode = typeof(CF_ExamsState).Name }
  112. equals new { CourseTypeID = examsstate.Value, examsstate.DictionaryCode }
  113. into examsStatedata
  114. from examsStatetb in examsStatedata.DefaultIfEmpty()
  115. join opera in UserRepository.Entities on submited.CreatorUserID equals opera.UserID
  116. join d in DictionaryItemRepository.GetList(x => x.DictionaryCode == "CF_ResultType") on submited.ResultTypeID equals d.Value
  117. join rd in ResultTypeDetailRepository.GetList(x => true) on d.Value equals rd.ResultTypeID
  118. into ResultTypeDetail
  119. from Result in ResultTypeDetail.DefaultIfEmpty()
  120. where (
  121. (Result.ResultTypeDetailID != null &&
  122. (
  123. (submited.TotalScore <= Result.MaxScore && Result.MinScore <= submited.TotalScore && (Result.MaxScoreOperator == "<=" && Result.MinScoreOperator == "<="))
  124. || (submited.TotalScore <= Result.MaxScore && Result.MinScore < submited.TotalScore && (Result.MaxScoreOperator == "<=" && Result.MinScoreOperator == "<"))
  125. || (submited.TotalScore < Result.MaxScore && Result.MinScore < submited.TotalScore && (Result.MaxScoreOperator == "<" && Result.MinScoreOperator == "<"))
  126. || (submited.TotalScore < Result.MaxScore && Result.MinScore <= submited.TotalScore && (Result.MaxScoreOperator == "<" && Result.MinScoreOperator == "<="))
  127. )
  128. )
  129. || (Result.ResultTypeDetailID == null)
  130. )
  131. &&submited.CoursematerialID == CoursematerialID && submited.StarttermID == StartTermID && submited.UserID == UserID
  132. select new SubmitedScoreView
  133. {
  134. SubmitedScoreID = submited.SubmitedScoreID,
  135. UserID = submited.UserID,
  136. LoginID = submited.CF_Student.Sys_User.LoginID,
  137. UserName = submited.CF_Student.Sys_User.Name,
  138. SchoolyearID = submited.SchoolyearID,
  139. SchoolyearCode = submited.CF_Schoolyear.Code,
  140. Schoolyear = submited.CF_Schoolyear.Years,
  141. CourseName = submited.EM_Coursematerial.CourseName,
  142. CourseCode = submited.EM_Coursematerial.CourseCode,
  143. TotalScore = submited.TotalScore,
  144. //暂时按此种逻辑处理。。后续优化(廖兵良)
  145. TotalScoreStr = (submited.ExamsStateID == examsState || submited.ExamsStateID == 10) ? (Result.Name ?? ((double)Math.Round(submited.TotalScore.Value, 1)).ToString()) : examsStatetb.Name,
  146. ScoreCredit = submited.ScoreCredit,
  147. CoursetypeName = courseTypetb.Name,
  148. CreateTime = submited.CreateTime,
  149. OperaUser = opera.Name,
  150. ExamsCategoryName = examsCategorytb.Name,
  151. ExamsStateName = examsStatetb.Name,
  152. CoursematerialID = submited.CoursematerialID,
  153. StarttermID = submited.StarttermID,
  154. Remarks = submited.Remark,
  155. StudentScoreRemark = submited.Remark,
  156. };
  157. return query.ToList();
  158. }
  159. public IList<ER_SubmitedScoreDetail> GetScoreDetail(Guid SubmitedScoreID)
  160. {
  161. var query = ScoreDetailRepository.GetList(q => q.SubmitedScoreID == SubmitedScoreID);
  162. return query.ToList();
  163. }
  164. public StudentGradView GetStudentInfo(Guid StudentID)
  165. {
  166. var userScore = from score in ScoreRepository.Entities
  167. //join detail in FinallyScoreDetailRepository.Entities on score.FinallyScoreID equals detail.FinallyScoreID
  168. select new
  169. {
  170. score.UserID,
  171. score.TotalScore
  172. };
  173. var query = from student in StudentRepository.Entities
  174. join profile in ProfileRepository.Entities on student.UserID equals profile.UserID
  175. join contact in ContactRepository.Entities on profile.UserID equals contact.UserID
  176. join recruits in RecruitsRepository.Entities on contact.UserID equals recruits.UserID
  177. join cla in ClassRepository.Entities on student.ClassmajorID equals cla.ClassmajorID
  178. join grade in GradeRepository.Entities on cla.GrademajorID equals grade.GrademajorID
  179. join faculty in FacultyRepository.Entities on grade.FacultymajorID equals faculty.FacultymajorID
  180. where student.UserID == StudentID
  181. select new StudentGradView()
  182. {
  183. UserID = student.UserID,
  184. LoginID = student.Sys_User.LoginID,
  185. UserName = student.Sys_User.Name,
  186. FacultyName = faculty.Name,
  187. GradeName = grade.Name,
  188. GradeCode = grade.Code,
  189. ClassName = cla.Name,
  190. PlanningGraduateDate = student.PlanningGraduateDate,
  191. Menshu = student.ER_FinallyScore.Count,
  192. AverageGrade = userScore.Where(q => q.UserID == student.UserID).Average(q => q.TotalScore)
  193. };
  194. return query.SingleOrDefault();
  195. }
  196. public StudentGradView GetStudentPersonalScore(Guid? userID)
  197. {
  198. var userScore = from score in ScoreRepository.Entities
  199. select new
  200. {
  201. score.UserID,
  202. score.TotalScore,
  203. score.ScoreCredit
  204. };
  205. var query = from student in StudentRepository.Entities.Where(x => x.UserID == userID)
  206. select new StudentGradView
  207. {
  208. UserID = student.UserID,
  209. LoginID = student.Sys_User.LoginID,
  210. UserName = student.Sys_User.Name,
  211. FacultyName = student.CF_Classmajor.CF_Grademajor.CF_Facultymajor.CF_College.Name,
  212. ClassName = student.CF_Classmajor.Name,
  213. PlanningGraduateDate = student.PlanningGraduateDate,
  214. Menshu = student.ER_FinallyScore.Count,
  215. AverageGrade = userScore.Where(q => q.UserID == student.UserID).Average(q => q.TotalScore),
  216. TotalScore = userScore.Where(q => q.UserID == student.UserID).Sum(q => q.ScoreCredit)
  217. };
  218. return query.FirstOrDefault();
  219. }
  220. public StudentGradView GetStudentPersonalScoreGT(Guid? userID)
  221. {
  222. //必修学分
  223. var RequiredCredit = from q in finallyScoreRepository.GetList(x => x.UserID == userID)
  224. join a in courseTypeSelectCourseTypeRepository.Entities
  225. on q.CourseTypeID equals a.CourseTypeID
  226. where a.IsRequired == true
  227. group q by q.UserID
  228. into g
  229. select new
  230. {
  231. UserID = g.Key,
  232. RequiredCredit = g.Sum(x => x.ScoreCredit ?? 0),
  233. };
  234. //限选学分
  235. var OptionalCourseCredit = from q in finallyScoreRepository.GetList(x => x.UserID == userID)
  236. join a in courseTypeSelectCourseTypeRepository.Entities.Where(x => x.IsOptionalCourse == true)
  237. on q.CourseTypeID equals a.CourseTypeID
  238. where a.IsOptionalCourse == true
  239. group q by q.UserID
  240. into g
  241. select new
  242. {
  243. UserID = g.Key,
  244. OptionalCourseCredit = g.Sum(x => x.ScoreCredit ?? 0),
  245. };
  246. //任选学分
  247. var FreeSelectionCourseCredit = from q in finallyScoreRepository.GetList(x => x.UserID == userID)
  248. join a in courseTypeSelectCourseTypeRepository.Entities.Where(x => x.IsFreeSelectionCourse == true)
  249. on q.CourseTypeID equals a.CourseTypeID
  250. where a.IsFreeSelectionCourse == true
  251. group q by q.UserID
  252. into g
  253. select new
  254. {
  255. UserID = g.Key,
  256. FreeSelectionCourseCredit = g.Sum(x => x.ScoreCredit ?? 0),
  257. };
  258. //通识教育
  259. var GeneralEducationCredit = from final in finallyScoreRepository.GetList(x => x.UserID == userID)
  260. join gcts in graduationCourseTypeSettingRepository.Entities
  261. on final.CourseTypeID equals gcts.CourseTypeID
  262. into a
  263. from j in a.DefaultIfEmpty()
  264. where j.IsGeneralEducation == true
  265. group final by final.UserID
  266. into g
  267. select new
  268. {
  269. UserID = g.Key,
  270. GeneralEducationCredit = g.Sum(x => x.ScoreCredit ?? 0),
  271. };
  272. //方向选修
  273. var ElectiveCredit = from final in finallyScoreRepository.GetList(x => x.UserID == userID)
  274. join gcts in graduationCourseTypeSettingRepository.Entities
  275. on final.CourseTypeID equals gcts.CourseTypeID
  276. into a
  277. from j in a.DefaultIfEmpty()
  278. where j.IsElective == true
  279. group final by final.UserID
  280. into g
  281. select new
  282. {
  283. UserID = g.Key,
  284. ElectiveCredit = g.Sum(x => x.ScoreCredit ?? 0),
  285. };
  286. //公共选修
  287. var ElectivePublicCredit = from final in finallyScoreRepository.GetList(x => x.UserID == userID)
  288. join gcts in graduationCourseTypeSettingRepository.Entities
  289. on final.CourseTypeID equals gcts.CourseTypeID
  290. into a
  291. from j in a.DefaultIfEmpty()
  292. where j.IsElectivePublic == true
  293. group final by final.UserID
  294. into g
  295. select new
  296. {
  297. UserID = g.Key,
  298. ElectivePublicCredit = g.Sum(x => x.ScoreCredit ?? 0),
  299. };
  300. //实践环节
  301. var PractiseCredit = from final in finallyScoreRepository.GetList(x => x.UserID == userID)
  302. join gcts in graduationCourseTypeSettingRepository.Entities
  303. on final.CourseTypeID equals gcts.CourseTypeID
  304. into a
  305. from j in a.DefaultIfEmpty()
  306. where j.IsPractise == true
  307. group final by final.UserID
  308. into g
  309. select new
  310. {
  311. UserID = g.Key,
  312. PractiseCredit = g.Sum(x => x.ScoreCredit ?? 0),
  313. };
  314. //实践环节并且只包含俱乐部
  315. var PractiseWithClub = from final in finallyScoreRepository.GetList(x => x.UserID == userID)
  316. join gcts in graduationCourseTypeSettingRepository.Entities
  317. on final.CourseTypeID equals gcts.CourseTypeID
  318. into a
  319. from j in a.DefaultIfEmpty()
  320. join cc in clubCourseRepository.Entities
  321. on final.CoursematerialID equals cc.CoursematerialID
  322. into b
  323. from k in b.DefaultIfEmpty()
  324. where j.IsPractise == true && k.ClubCourseID != null//实践环节并且只包含俱乐部
  325. group final by final.UserID
  326. into g
  327. select new
  328. {
  329. UserID = g.Key,
  330. PractiseWithClub = g.Sum(x => x.ScoreCredit ?? 0),
  331. };
  332. //实践环节并且不包含俱乐部
  333. var PractiseNotCredit = from final in finallyScoreRepository.GetList(x => x.UserID == userID)
  334. join gcts in graduationCourseTypeSettingRepository.Entities
  335. on final.CourseTypeID equals gcts.CourseTypeID
  336. into a
  337. from j in a.DefaultIfEmpty()
  338. join cc in clubCourseRepository.Entities
  339. on final.CoursematerialID equals cc.CoursematerialID
  340. into b
  341. from k in b.DefaultIfEmpty()
  342. where j.IsPractise == true && k.ClubCourseID == null//实践环节并且不包含俱乐部
  343. group final by final.UserID
  344. into g
  345. select new
  346. {
  347. UserID = g.Key,
  348. PractiseNotCredit = g.Sum(x => x.ScoreCredit ?? 0),
  349. };
  350. //校本课
  351. var Schoolbased = from final in finallyScoreRepository.GetList(x => x.UserID == userID)
  352. join gcts in graduationCourseTypeSettingRepository.Entities
  353. on final.CourseTypeID equals gcts.CourseTypeID
  354. into a
  355. from j in a.DefaultIfEmpty()
  356. where j.IsSchoolbasedCurriculum == true
  357. group final by final.UserID
  358. into g
  359. select new
  360. {
  361. UserID = g.Key,
  362. Schoolbased = g.Sum(x => x.ScoreCredit ?? 0),
  363. };
  364. //校本课程(只包含俱乐部)
  365. var SchoolbasedWithClub = from final in finallyScoreRepository.GetList(x => x.UserID == userID)
  366. join gcts in graduationCourseTypeSettingRepository.Entities
  367. on final.CourseTypeID equals gcts.CourseTypeID
  368. into a
  369. from j in a.DefaultIfEmpty()
  370. join cc in clubCourseRepository.Entities
  371. on final.CoursematerialID equals cc.CoursematerialID
  372. into b
  373. from k in b.DefaultIfEmpty()
  374. where j.IsSchoolbasedCurriculum == true && k.ClubCourseID != null
  375. group final by final.UserID
  376. into g
  377. select new
  378. {
  379. UserID = g.Key,
  380. Schoolbased = g.Sum(x => x.ScoreCredit ?? 0),
  381. };
  382. //校本课程(不包含俱乐部)
  383. var SchoolbasedNotClub = from final in finallyScoreRepository.GetList(x => x.UserID == userID)
  384. join gcts in graduationCourseTypeSettingRepository.Entities
  385. on final.CourseTypeID equals gcts.CourseTypeID
  386. into a
  387. from j in a.DefaultIfEmpty()
  388. join cc in clubCourseRepository.Entities
  389. on final.CoursematerialID equals cc.CoursematerialID
  390. into b
  391. from k in b.DefaultIfEmpty()
  392. where j.IsSchoolbasedCurriculum == true && k.ClubCourseID == null
  393. group final by final.UserID
  394. into g
  395. select new
  396. {
  397. UserID = g.Key,
  398. Schoolbased = g.Sum(x => x.ScoreCredit ?? 0),
  399. };
  400. var userScore = from score in ScoreRepository.Entities
  401. select new
  402. {
  403. score.UserID,
  404. score.TotalScore,
  405. score.ScoreCredit
  406. };
  407. var query = from student in StudentRepository.Entities.Where(x => x.UserID == userID)
  408. select new StudentGradView
  409. {
  410. UserID = student.UserID,
  411. LoginID = student.Sys_User.LoginID,
  412. UserName = student.Sys_User.Name,
  413. FacultyName = student.CF_Classmajor.CF_Grademajor.CF_Facultymajor.CF_College.Name,
  414. ClassName = student.CF_Classmajor.Name,
  415. PlanningGraduateDate = student.PlanningGraduateDate,
  416. Menshu = student.ER_FinallyScore.Count,
  417. AverageGrade = userScore.Where(q => q.UserID == student.UserID).Average(q => q.TotalScore),
  418. //TotalScore = userScore.Where(q => q.UserID == student.UserID).Sum(q => q.ScoreCredit),
  419. Required = RequiredCredit.Select(x => x.RequiredCredit).FirstOrDefault(),
  420. OptionalCourseCredit = OptionalCourseCredit.Select(x => x.OptionalCourseCredit).FirstOrDefault(),
  421. FreeSelectionCourseCredit = FreeSelectionCourseCredit.Select(x => x.FreeSelectionCourseCredit).FirstOrDefault(),
  422. ElectiveCredit = ElectiveCredit.Select(x => x.ElectiveCredit).FirstOrDefault(),
  423. ElectivePublicCredit = ElectivePublicCredit.Select(x => x.ElectivePublicCredit).FirstOrDefault(),
  424. PractiseNotCredit = PractiseNotCredit.Select(x => x.PractiseNotCredit).FirstOrDefault(),
  425. PractiseWithClub = PractiseWithClub.Select(x => x.PractiseWithClub).FirstOrDefault(),
  426. PractiseCredit = PractiseCredit.Select(x => x.PractiseCredit).FirstOrDefault(),
  427. SchoolbasedCredit = Schoolbased.Select(x => x.Schoolbased).FirstOrDefault(),
  428. SchoolbasedWithClub = SchoolbasedWithClub.Select(x => x.Schoolbased).FirstOrDefault(),
  429. SchoolbasedNotClub = SchoolbasedNotClub.Select(x => x.Schoolbased).FirstOrDefault()
  430. };
  431. return query.FirstOrDefault();
  432. }
  433. public IQueryable<SubmitedScoreDetailView> GetSubmitedScoreViewQueryable()
  434. {
  435. var query = from a in SubmitedScoreRepository.Entities
  436. select new SubmitedScoreDetailView
  437. {
  438. SubmitedScoreID = a.SubmitedScoreID,
  439. SchoolyearID = a.SchoolyearID,
  440. SchoolyearNumID = a.SchoolyearNumID,
  441. DepartmentID = a.DepartmentID,
  442. ClassName = a.ClassName,
  443. CoursematerialID = a.CoursematerialID,
  444. CourseTypeID = a.CourseTypeID,
  445. ExamsCategoryID = a.ExamsCategoryID,
  446. ExaminationModeID = a.ExaminationModeID,
  447. Credit = a.Credit,
  448. ExamsDatetime = a.ExamsDatetime,
  449. CreatorUserID = a.CreatorUserID,
  450. EntryDeadlineTime = a.EntryDeadlineTime,
  451. ExaminationTypeID = a.ExaminationType,
  452. StarttermID = a.StarttermID,
  453. ExamsStateID = a.ExamsStateID,
  454. TotalScore = a.TotalScore,
  455. ScoreCredit = a.ScoreCredit,
  456. GradePoint = a.GradePoint,
  457. ResultTypeID=a.ResultTypeID,
  458. UserID = a.UserID,
  459. Remark = a.Remark,
  460. CreateUserID = a.CreateUserID,
  461. CreateTime = a.CreateTime
  462. };
  463. return query;
  464. }
  465. }
  466. }