|
@@ -212,10 +212,10 @@ namespace TEAMModelOS.Controllers
|
|
|
}
|
|
|
|
|
|
//有給classNo才會紀錄className,classNo屬於實體教室門牌號,全校理當只會有一個。
|
|
|
- string year = "";
|
|
|
- if (student.TryGetProperty("classYear", out var tmpClassYear) && !string.IsNullOrWhiteSpace(tmpClassYear.GetString()))
|
|
|
+ int year =0;
|
|
|
+ if (student.TryGetProperty("classYear", out var tmpClassYear) && tmpClassYear.TryGetInt32(out int syear))
|
|
|
{
|
|
|
- year = tmpClassYear.GetString();
|
|
|
+ year = syear;
|
|
|
}
|
|
|
if (student.TryGetProperty("className", out var tmpClassName) && !string.IsNullOrWhiteSpace(tmpClassName.GetString()))
|
|
|
{
|
|
@@ -280,8 +280,8 @@ namespace TEAMModelOS.Controllers
|
|
|
foreach (var item in nonexistentClassNo)
|
|
|
{
|
|
|
string gradeId = string.Empty;
|
|
|
- string periodId = string.Empty;
|
|
|
- string year = string.Empty;
|
|
|
+ string periodId = periodId = sortedImpData.classInfo[item].periodId;
|
|
|
+ int year = sortedImpData.classInfo[item].year;
|
|
|
//確認該學段存在及輸入的年級index正確(-1後大於等於0)
|
|
|
//if (gradesInfo.ContainsKey(sortedImpData.classInfo[item].periodId) && sortedImpData.classInfo[item].gradeIndex - 1>=0)
|
|
|
// {
|