Beispiel #1
0
        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);
                }
            }
        }
Beispiel #2
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);
                    }
                }
            }
        }