diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs index 9352f2da1..9d62cd91e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs @@ -276,7 +276,28 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (!string.IsNullOrEmpty(keyValue)) { entity.Modify(keyValue); + var strSql = ""; + if (entity.WeekPracticeHour.ToString() == "") + { + strSql += " update LessonInfo set WeekPracticeHour = null where LessonId ='" + keyValue + "' ;"; + } + if (entity.TotalStudyHour.ToString() == "") + { + strSql += " update LessonInfo set TotalStudyHour = null where LessonId ='" + keyValue + "' ;"; + } + if (entity.StudyScore.ToString() == "") + { + strSql += " update LessonInfo set StudyScore = null where LessonId ='" + keyValue + "' ;"; + } + if (entity.WeekStudyHour.ToString() == "") + { + strSql += " update LessonInfo set WeekStudyHour = null where LessonId ='" + keyValue + "' ;"; + } this.BaseRepository("CollegeMIS").Update(entity); + if (!string.IsNullOrEmpty(strSql)) + { + BaseRepository("CollegeMIS").ExecuteBySql(strSql); + } } else {