Przeglądaj źródła

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

临城职教中职
ndbs 2 lat temu
rodzic
commit
225cf55fb8
1 zmienionych plików z 21 dodań i 0 usunięć
  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 Wyświetl plik

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


Ładowanie…
Anuluj
Zapisz