@@ -140,7 +140,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
Exam_ExamLessonEntity entity = strEntity.ToObject<Exam_ExamLessonEntity>(); | Exam_ExamLessonEntity entity = strEntity.ToObject<Exam_ExamLessonEntity>(); | ||||
//判断课程编号有无重复 | //判断课程编号有无重复 | ||||
var model = exam_ExamLessonIBLL.GetEntityByLessonNo(entity.LessonNo); | |||||
var model = exam_ExamLessonIBLL.GetEntityByLessonNo(entity.LessonNo,entity.AcademicYearNo,entity.Semester); | |||||
if (model != null && string.IsNullOrEmpty(keyValue)) | if (model != null && string.IsNullOrEmpty(keyValue)) | ||||
{ | { | ||||
return Fail("课程编号重复!"); | return Fail("课程编号重复!"); | ||||
@@ -67,11 +67,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo) | |||||
public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo, string AcademicYearNo, int? Semester) | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
return exam_ExamLessonService.GetEntityByLessonNo(lessonNo); | |||||
return exam_ExamLessonService.GetEntityByLessonNo(lessonNo, AcademicYearNo, Semester); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -27,7 +27,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
Exam_ExamLessonEntity GetExam_ExamLessonEntity(string keyValue); | Exam_ExamLessonEntity GetExam_ExamLessonEntity(string keyValue); | ||||
Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo); | |||||
Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo,string AcademicYearNo, int? Semester); | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -109,11 +109,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
/// <param name="lessonNo"></param> | /// <param name="lessonNo"></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo) | |||||
public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo, string AcademicYearNo, int? Semester) | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamLessonEntity>(x => x.LessonNo == lessonNo); | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamLessonEntity>(x => x.LessonNo == lessonNo && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||