Parcourir la source

课程信息编辑学分等不能清空属性值

临城职教中职
ndbs il y a 2 ans
Parent
révision
225cf55fb8
1 fichiers modifiés avec 21 ajouts et 0 suppressions
  1. +21
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs

+ 21
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs Voir le fichier

@@ -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
{


Chargement…
Annuler
Enregistrer