void _bgWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     _data = null;
     foreach (UDTSingleRecordDef data in UDTTransfer.ABUDTSingleRecordSelectByStudentIDList(_StudentIDList))
     {
         if (data.Key.Contains(GroupName) || data.Key.Contains((NewKey)))
         {
             _data = data;
         }
     }
 }
 void _bgWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     _dataDict.Clear();
     foreach (UDTSingleRecordDef data in UDTTransfer.ABUDTSingleRecordSelectByStudentIDList(_StudentIDList))
     {
         if (data.Key.Contains(GroupName))
         {
             if (!_dataDict.ContainsKey(data.Key))
             {
                 _dataDict.Add(data.Key, data);
             }
         }
     }
 }
        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);
        }
示例#4
0
        /// <summary>
        /// 載入答案
        /// </summary>
        private void LoadAnswerData()
        {
            _udtMrFlp01Dict.Clear();
            _udtMrFlp02Dict.Clear();
            _udtSdDg01  = _udtSdDg02 = null;
            _udtSrFlp01 = _udtSrFlp02 = null;
            _udtSrFlp05 = null;

            List <UDTSingleRecordDef> SingleRecordList = UDTTransfer.ABUDTSingleRecordSelectByStudentIDList(_StudenIDList);

            foreach (UDTSingleRecordDef data in SingleRecordList)
            {
                if (data.Key == enumKey.本人概況_血型.ToString())
                {
                    _udtSrFlp01 = data;
                }

                if (data.Key == enumKey.本人概況_宗教.ToString())
                {
                    _udtSrFlp02 = data;
                }

                if (data.Key == enumKey.本人概況_原住民血統.ToString())
                {
                    _udtSrFlp05 = data;
                }
            }
            List <UDTSemesterDataDef> SemesterDataList = UDTTransfer.ABUDTSemesterDataSelectByStudentIDList(_StudenIDList);

            foreach (UDTSemesterDataDef data in SemesterDataList)
            {
                if (data.Key == enumKey.本人概況_身高.ToString())
                {
                    _udtSdDg01 = data;
                }

                if (data.Key == enumKey.本人概況_體重.ToString())
                {
                    _udtSdDg02 = data;
                }
            }

            List <UDTMultipleRecordDef> MultipleRecordList = UDTTransfer.ABUDTMultipleRecordSelectByStudentIDList(_StudenIDList);

            foreach (UDTMultipleRecordDef data in MultipleRecordList)
            {
                if (data.Key == enumKey.本人概況_生理缺陷.ToString())
                {
                    if (!_udtMrFlp01Dict.ContainsKey(data.Data))
                    {
                        _udtMrFlp01Dict.Add(data.Data, data);
                    }
                }

                if (data.Key == enumKey.本人概況_曾患特殊疾病.ToString())
                {
                    if (!_udtMrFlp02Dict.ContainsKey(data.Data))
                    {
                        _udtMrFlp02Dict.Add(data.Data, data);
                    }
                }
            }
        }