Commit 70c5f01f authored by 黄奎's avatar 黄奎

页面修改

parent fc259620
......@@ -535,6 +535,12 @@ namespace Edu.WebApi.Controllers.Course
{
return ApiResult.ParamIsNull(message: message.TrimStart(',').TrimEnd('、') + "重复!请删除后再提交!");
}
var classModel = classModule.GetClassModule(list[0].ClassId);
if (list.Where(qitem => qitem.CourseId == classModel.CouseId).Count() > 0)
{
var model = list.Where(qitem => qitem.CourseId == classModel.CouseId)?.FirstOrDefault();
return ApiResult.ParamIsNull(message: string.Format("此班级已绑定{0}课程,请删除后再提交!", (model?.CourseName ?? "")));
}
bool flag = classModule.SetClassCourseModule(list);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment