|
|
@@ -1633,15 +1633,28 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad |
|
|
|
var Semester = queryParam["Semester"].ToString(); |
|
|
|
var LessonNo = queryParam["LessonNo"].ToString(); |
|
|
|
var ClassNo = queryParam["ClassNo"].ToString(); |
|
|
|
var LessonSection = queryParam["LessonSection"].ToString(); |
|
|
|
var ClassRoomNo = queryParam["ClassRoomNo"].ToString(); |
|
|
|
|
|
|
|
var now = DateTime.Now; |
|
|
|
var loginUserInfo = LoginUserInfo.Get(); |
|
|
|
|
|
|
|
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == ClassNo); |
|
|
|
if (classInfoEntity != null) |
|
|
|
if (!string.IsNullOrEmpty(ClassNo)) |
|
|
|
{ |
|
|
|
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == ClassNo); |
|
|
|
if (classInfoEntity != null) |
|
|
|
{ |
|
|
|
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuScore set IsEditable='0',EditUserId='" + loginUserInfo.account + "',BeginModifyDate='" + now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and OpenLessonDeptNo='" + classInfoEntity.DeptNo + "' and OpenLessonMajorNo='" + classInfoEntity.MajorNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='1' and ClassNo='" + ClassNo + "' "); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuScore set IsEditable='0',EditUserId='" + loginUserInfo.account + "',BeginModifyDate='" + now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and OpenLessonDeptNo='" + classInfoEntity.DeptNo + "' and OpenLessonMajorNo='" + classInfoEntity.MajorNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='1' and ClassNo='" + ClassNo + "' "); |
|
|
|
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassroomInfoEntity>(x => x.ClassroomNo == ClassRoomNo); |
|
|
|
if (classInfoEntity != null) |
|
|
|
{ |
|
|
|
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuScore set IsEditable='0',EditUserId='" + loginUserInfo.account + "',BeginModifyDate='" + now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and ClassRoomNo='" + classInfoEntity.ClassroomNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='2' and LessonSection='" + LessonSection + "' "); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
@@ -1713,15 +1726,29 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad |
|
|
|
var Semester = queryParam["Semester"].ToString(); |
|
|
|
var LessonNo = queryParam["LessonNo"].ToString(); |
|
|
|
var ClassNo = queryParam["ClassNo"].ToString(); |
|
|
|
var LessonSection = queryParam["LessonSection"].ToString(); |
|
|
|
var ClassRoomNo = queryParam["ClassRoomNo"].ToString(); |
|
|
|
|
|
|
|
var now = DateTime.Now; |
|
|
|
var loginUserInfo = LoginUserInfo.Get(); |
|
|
|
|
|
|
|
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == ClassNo); |
|
|
|
if (classInfoEntity != null) |
|
|
|
if (!string.IsNullOrEmpty(ClassNo)) |
|
|
|
{ |
|
|
|
this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuScore set IsEditable='1',EditUserId=null,BeginModifyDate=null,ModifyDate='{now}',ModifyUserId='{loginUserInfo.account}',ModifyUserName='{loginUserInfo.realName}' where F_SchoolId='{F_SchoolId}' and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and OpenLessonDeptNo='{classInfoEntity.DeptNo}' and OpenLessonMajorNo='{classInfoEntity.MajorNo}' and LessonNo='{LessonNo}' and LessonSortNo='1' and ClassNo='{ClassNo}' "); |
|
|
|
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == ClassNo); |
|
|
|
if (classInfoEntity != null) |
|
|
|
{ |
|
|
|
this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuScore set IsEditable='1',EditUserId=null,BeginModifyDate=null,ModifyDate='{now}',ModifyUserId='{loginUserInfo.account}',ModifyUserName='{loginUserInfo.realName}' where F_SchoolId='{F_SchoolId}' and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and OpenLessonDeptNo='{classInfoEntity.DeptNo}' and OpenLessonMajorNo='{classInfoEntity.MajorNo}' and LessonNo='{LessonNo}' and LessonSortNo='1' and ClassNo='{ClassNo}' "); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassroomInfoEntity>(x => x.ClassroomNo == ClassRoomNo); |
|
|
|
if (classInfoEntity != null) |
|
|
|
{ |
|
|
|
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuScore set IsEditable='1',EditUserId=null,BeginModifyDate=null where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and ClassRoomNo='" + classInfoEntity.ClassroomNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='2' and LessonSection='" + LessonSection + "' "); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|