浏览代码

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

临城职教中职
ndbs 2 年前
父节点
当前提交
225cf55fb8
共有 1 个文件被更改,包括 21 次插入0 次删除
  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 查看文件

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


正在加载...
取消
保存