|
@@ -1834,17 +1834,19 @@ namespace TEAMModelOS.Controllers
|
|
|
{
|
|
|
stulistId = listId.GetString();
|
|
|
}
|
|
|
- if (!stulistidsTea.ContainsKey(courseCode))
|
|
|
- {
|
|
|
- Dictionary<string, string> pCourseIdDic = new Dictionary<string, string>();
|
|
|
- pCourseIdDic.Add(courseId, stulistId);
|
|
|
- stulistidsTea.Add(courseCode, pCourseIdDic);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if(!stulistidsTea[courseCode].ContainsKey(courseId))
|
|
|
+ if (!string.IsNullOrEmpty(courseCode)) {
|
|
|
+ if (!stulistidsTea.ContainsKey(courseCode))
|
|
|
{
|
|
|
- stulistidsTea[courseCode].Add(courseId, stulistId);
|
|
|
+ Dictionary<string, string> pCourseIdDic = new Dictionary<string, string>();
|
|
|
+ pCourseIdDic.Add(courseId, stulistId);
|
|
|
+ stulistidsTea.Add(courseCode, pCourseIdDic);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (!stulistidsTea[courseCode].ContainsKey(courseId))
|
|
|
+ {
|
|
|
+ stulistidsTea[courseCode].Add(courseId, stulistId);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|