|
@@ -755,13 +755,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
{ |
|
|
{ |
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
|
|
|
|
string DeptNo = ""; |
|
|
|
|
|
var CdMajorList = this.BaseRepository("CollegeMIS").FindEntity<CdMajorEntity>(x => x.CheckMark == true && x.MajorNo == MajorNo); |
|
|
|
|
|
if (CdMajorList != null) |
|
|
|
|
|
{ |
|
|
|
|
|
DeptNo = CdMajorList.DeptNo; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var Majorinfo = this.BaseRepository("CollegeMIS").FindEntity<CdMajorEntity>(x => x.MajorNo == MajorNo); |
|
|
var Majorinfo = this.BaseRepository("CollegeMIS").FindEntity<CdMajorEntity>(x => x.MajorNo == MajorNo); |
|
|
if (Majorinfo != null) |
|
|
if (Majorinfo != null) |
|
|
{ |
|
|
{ |
|
|
var arr = keyValue.Split(',').ToList(); |
|
|
var arr = keyValue.Split(',').ToList(); |
|
|
foreach (var id in arr) |
|
|
foreach (var id in arr) |
|
|
{ |
|
|
{ |
|
|
string sql = $"update StuVolunteer set MajorNo = '{MajorNo}',ClassNo = '', MajorStatus = 0 ,ClassStatus = 0 where ID='{id}' and (StuNo is null or len(StuNo)=0); update StuVolunteer set MajorNo='{MajorNo}', ClassNo = '', MajorStatus =0,ClassStatus=0 where ID='{id}' and (StuNo is not null or len(StuNo)>0)"; |
|
|
|
|
|
|
|
|
string sql = $"update StuVolunteer set MajorNo = '{MajorNo}',ClassNo = '',DeptNo = '{DeptNo}', MajorStatus = 0 ,ClassStatus = 0 where ID='{id}' and (StuNo is null or len(StuNo)=0); update StuVolunteer set MajorNo='{MajorNo}', ClassNo = '',DeptNo = '{DeptNo}', MajorStatus =0,ClassStatus=0 where ID='{id}' and (StuNo is not null or len(StuNo)>0)"; |
|
|
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); |
|
|
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|