@@ -1959,8 +1959,7 @@ where ID='{ParentID}'
var DeptNo = deptList.Where(x => x.DeptName == dr["系部"].ToString().Trim()).FirstOrDefault()?.DeptNo;
var MajorNo = majorList.Where(x => x.MajorName == dr["专业"].ToString().Trim() && x.DeptNo == DeptNo)
.FirstOrDefault()?.MajorNo;
var ClassNo = classList.Where(x =>
x.ClassName == dr["班级"].ToString() && x.DeptNo == DeptNo && x.MajorNo == MajorNo).FirstOrDefault()?.ClassNo;
var ClassNo = classList.Where(x => x.ClassName == dr["班级"].ToString()).FirstOrDefault()?.ClassNo;
if (string.IsNullOrEmpty(DeptNo))
{
fnum++;
@@ -1984,21 +1983,21 @@ where ID='{ParentID}'
}
var leaderno = stuinfobasic.Where(x => x.StuNo == dr["舍长学号"].ToString() && x.ClassNo == ClassNo).FirstOrDefault()?.StuNo;
var stuno = stuinfobasic.Where(x => x.StuNo == dr["学生学号"].ToString() && x.ClassNo == ClassNo).FirstOrDefault()?.StuNo;
if (string.IsNullOrEmpty(stuno))
{
fnum++;
dr["导入错误"] = dr["学生学号"] + "导入错误";
failDt.Rows.Add(dr.ItemArray);
continue;
}
if (string.IsNullOrEmpty(leaderno))
{
fnum++;
dr["导入错误"] = dr["舍长学号"] + "导入错误";
failDt.Rows.Add(dr.ItemArray);
continue;
}
// if (string.IsNullOrEmpty(stuno))
// {
// fnum++;
// dr["导入错误"] = dr["学生学号"] + "导入错误";
// failDt.Rows.Add(dr.ItemArray);
// continue;
// }
// if (string.IsNullOrEmpty(leaderno))
// {
// fnum++;
// dr["导入错误"] = dr["舍长学号"] + "导入错误";
// failDt.Rows.Add(dr.ItemArray);
// continue;
// }
var parent = dormitoryBuildList.Where(x => x.Name == "数字化智慧校园").FirstOrDefault();
if (parent == null)
{