diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailService.cs index a70148560..1e6109ebe 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailService.cs @@ -246,11 +246,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration entity.OrderBy(x => x.ECOrder); for (int i = 0; i < entity.Count(); i++) { - var insertEntity = new Exam_ExamRoomDetailEntity(); - insertEntity.ClassRoomNo = entity[i].ClassRoomNo; - insertEntity.ClassRoomName = entity[i].ClassRoomName; - insertEntity.ECEnabled = entity[i].ECEnabled; - insertEntity.ECOrder = i + 1; + var insertEntity = new Exam_ExamRoomDetailEntity + { + ClassRoomNo = entity[i].ClassRoomNo, + ClassRoomName = entity[i].ClassRoomName, + AcademicYearNo = AcademicYearNo, + Semester = Semester, + ECEnabled = entity[i].ECEnabled, + ECOrder = i + 1 + }; insertEntity.Create(); enList.Add(insertEntity); } @@ -258,7 +262,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration db.Insert(enList); //修改实际考试人数 var Update = db.FindEntity(x => x.ClassroomNo == ClassroomNo && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester); - Update.ActualNum = Update.Where(x => x.ECEnabled == true).Count(); + Update.ActualNum = enList.Where(x => x.ECEnabled == true).Count(); db.Update(Update); db.Commit(); }