|
|
@@ -1632,26 +1632,29 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad |
|
|
|
var AcademicYearNo = queryParam["AcademicYearNo"].ToString(); |
|
|
|
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 ClassNo = queryParam["ClassNo"]; |
|
|
|
var LessonSection = queryParam["LessonSection"]; |
|
|
|
var ClassRoomNo = queryParam["ClassRoomNo"]; |
|
|
|
|
|
|
|
var now = DateTime.Now; |
|
|
|
var loginUserInfo = LoginUserInfo.Get(); |
|
|
|
if (!string.IsNullOrEmpty(ClassNo)) |
|
|
|
if (!ClassNo.IsEmpty()) |
|
|
|
{ |
|
|
|
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == ClassNo); |
|
|
|
string classno = ClassNo.ToString(); |
|
|
|
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 + "' "); |
|
|
|
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 |
|
|
|
{ |
|
|
|
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassroomInfoEntity>(x => x.ClassroomNo == ClassRoomNo); |
|
|
|
string classroomno = ClassRoomNo.ToString(); |
|
|
|
string lessonsection = LessonSection.ToString(); |
|
|
|
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 + "' "); |
|
|
|
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 + "' "); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@@ -1725,26 +1728,29 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad |
|
|
|
var AcademicYearNo = queryParam["AcademicYearNo"].ToString(); |
|
|
|
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 ClassNo = queryParam["ClassNo"]; |
|
|
|
var LessonSection = queryParam["LessonSection"]; |
|
|
|
var ClassRoomNo = queryParam["ClassRoomNo"]; |
|
|
|
|
|
|
|
var now = DateTime.Now; |
|
|
|
var loginUserInfo = LoginUserInfo.Get(); |
|
|
|
if (!string.IsNullOrEmpty(ClassNo)) |
|
|
|
if (!ClassNo.IsEmpty()) |
|
|
|
{ |
|
|
|
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == ClassNo); |
|
|
|
string classno = ClassNo.ToString(); |
|
|
|
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}' "); |
|
|
|
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); |
|
|
|
string classroomno = ClassRoomNo.ToString(); |
|
|
|
string lessonsection = LessonSection.ToString(); |
|
|
|
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 + "' "); |
|
|
|
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 + "' "); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@@ -1819,23 +1825,51 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad |
|
|
|
var AcademicYearNo = queryParam["AcademicYearNo"].ToString(); |
|
|
|
var Semester = queryParam["Semester"].ToString(); |
|
|
|
var LessonNo = queryParam["LessonNo"].ToString(); |
|
|
|
var ClassNo = queryParam["ClassNo"].ToString(); |
|
|
|
var ClassNo = queryParam["ClassNo"]; |
|
|
|
var LessonSection = queryParam["LessonSection"]; |
|
|
|
var ClassRoomNo = queryParam["ClassRoomNo"]; |
|
|
|
|
|
|
|
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == ClassNo); |
|
|
|
if (classInfoEntity != null) |
|
|
|
if (!ClassNo.IsEmpty()) |
|
|
|
{ |
|
|
|
db.ExecuteBySql($"update StuScore set CheckMark='{checkMark}' 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 + "' "); |
|
|
|
//教师电子成绩单 |
|
|
|
if (checkMark == 0)//撤销 |
|
|
|
string classno = ClassNo.ToString(); |
|
|
|
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == classno); |
|
|
|
if (classInfoEntity != null) |
|
|
|
{ |
|
|
|
db.ExecuteBySql("update EmpReportCard set ElectronicStatus=0,ElectronicTime=null where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and ClassNo='" + ClassNo + "' and LessonSortNo='1' "); |
|
|
|
db.ExecuteBySql($"update StuScore set CheckMark='{checkMark}' 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 + "' "); |
|
|
|
//教师电子成绩单 |
|
|
|
if (checkMark == 0)//撤销 |
|
|
|
{ |
|
|
|
db.ExecuteBySql("update EmpReportCard set ElectronicStatus=0,ElectronicTime=null where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and ClassNo='" + classno + "' and LessonSortNo='1' "); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
db.ExecuteBySql("update EmpReportCard set ElectronicStatus=1,ElectronicTime='" + DateTime.Now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and ClassNo='" + classno + "' and LessonSortNo='1' "); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
db.Commit(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
string classroomno = ClassRoomNo.ToString(); |
|
|
|
string lessonsection = LessonSection.ToString(); |
|
|
|
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassroomInfoEntity>(x => x.ClassroomNo == classroomno); |
|
|
|
if (classInfoEntity != null) |
|
|
|
{ |
|
|
|
db.ExecuteBySql("update EmpReportCard set ElectronicStatus=1,ElectronicTime='" + DateTime.Now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and ClassNo='" + ClassNo + "' and LessonSortNo='1' "); |
|
|
|
db.ExecuteBySql($"update StuScore set CheckMark='{checkMark}' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and ClassRoomNo='" + classInfoEntity.ClassroomNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='2' and LessonSection='" + lessonsection + "' "); |
|
|
|
//教师电子成绩单 |
|
|
|
if (checkMark == 0)//撤销 |
|
|
|
{ |
|
|
|
db.ExecuteBySql("update EmpReportCard set ElectronicStatus=0,ElectronicTime=null where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and ClassRoomNo='" + classroomno + "' and LessonSortNo='2' and LessonSection='"+ lessonsection + "'"); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
db.ExecuteBySql("update EmpReportCard set ElectronicStatus=1,ElectronicTime='" + DateTime.Now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and classroomno='" + classroomno + "' and LessonSortNo='2' and LessonSection='"+ lessonsection + "'"); |
|
|
|
} |
|
|
|
} |
|
|
|
db.Commit(); |
|
|
|
} |
|
|
|
db.Commit(); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|