void _bgWorker_DoWork(object sender, DoWorkEventArgs e) { if (_reloadQuestion) { _QuestionDataDict = _QDMang.GetQuestionDataByGroupName(GroupName); } _YearlyDataDict.Clear(); foreach (UDTYearlyDataDef data in UDTTransfer.ABUDTYearlyDataSelectByStudentIDList(_StudentIDList)) { if (_ColumIndexDict.ContainsKey(data.Key)) { if (!_YearlyDataDict.ContainsKey(data.Key)) { _YearlyDataDict.Add(data.Key, data); } } } // 檢查資料是否完整,沒有資料補資料 foreach (string str in _ColumIndexDict.Keys) { if (!_YearlyDataDict.ContainsKey(str)) { UDTYearlyDataDef data = new UDTYearlyDataDef(); data.Key = str; data.StudentID = _intStudentID; data.G1 = data.G2 = data.G3 = data.G4 = data.G5 = data.G6 = ""; _YearlyDataDict.Add(str, data); } } // 社團與班級幹部 _SemesterDataDict.Clear(); foreach (UDTSemesterDataDef data in UDTTransfer.ABUDTSemesterDataSelectByStudentIDList(_StudentIDList)) { if (_SemesterDataKeyList.Contains(data.Key)) { if (!_SemesterDataDict.ContainsKey(data.Key)) { _SemesterDataDict.Add(data.Key, data); } } } // 初始值檢查,沒有建立初始值 foreach (string str in _SemesterDataKeyList) { if (!_SemesterDataDict.ContainsKey(str)) { UDTSemesterDataDef data1 = new UDTSemesterDataDef(); data1.Key = str; data1.StudentID = _intStudentID; data1.S1a = data1.S1b = data1.S2a = data1.S2b = data1.S3a = data1.S3b = data1.S4a = data1.S4b = data1.S5a = data1.S5b = data1.S6a = data1.S6b = ""; _SemesterDataDict.Add(str, data1); } } }
void _bgWorker_DoWork(object sender, DoWorkEventArgs e) { LoadQuestion(); _UDTSingleRecordDict.Clear(); string key = GroupName + "_監護人_"; // 讀取資料 foreach (UDTSingleRecordDef data in UDTTransfer.ABUDTSingleRecordSelectByStudentIDList(_StudentIDList)) { // 監護人 if (data.Key.Contains(key)) { string newkey = data.Key.Replace(key, ""); if (!_UDTSingleRecordDict.ContainsKey(newkey)) { _UDTSingleRecordDict.Add(newkey, data); } } // 兄弟姊妹排行 if (data.Key.Contains(KeySiblingNoStr)) { if (!_UDTSingleRecordDict.ContainsKey(KeySiblingNoStr)) { _UDTSingleRecordDict.Add(KeySiblingNoStr, data); } } } _UDTYearlyDataDict.Clear(); string key1 = GroupName + "_"; foreach (UDTYearlyDataDef data in UDTTransfer.ABUDTYearlyDataSelectByStudentIDList(_StudentIDList)) { if (data.Key.Contains(key1)) { if (!_UDTYearlyDataDict.ContainsKey(data.Key)) { _UDTYearlyDataDict.Add(data.Key, data); } } } _UDTSiblingList = UDTTransfer.ABUDTSiblingSelectByStudentIDList(_StudentIDList); _UDTRelativeList = UDTTransfer.ABUDTRelativeSelectByStudentIDList(_StudentIDList); }
void _bgWorker_DoWork(object sender, DoWorkEventArgs e) { if (_reloadQuestion) { _QuestionDataDict = _QDMang.GetQuestionDataByGroupName(GroupName); } _UDTYearlyDataDict.Clear(); foreach (UDTYearlyDataDef data in UDTTransfer.ABUDTYearlyDataSelectByStudentIDList(_StudentIDList)) { if (data.Key.Contains(GroupName)) { if (!_UDTYearlyDataDict.ContainsKey(data.Key)) { _UDTYearlyDataDict.Add(data.Key, data); } } } }