コード例 #1
0
        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);
        }