Exemplo n.º 1
0
        private void BgLoadData_DoWork(object sender, DoWorkEventArgs e)
        {
            bgLoadData.ReportProgress(1);
            AccessHelper accessHelper = new AccessHelper();

            // 取得群對照
            RegistrationDeptDict.Clear();
            List <udtRegistrationDept> RegistrationDeptList = accessHelper.Select <udtRegistrationDept>();

            foreach (udtRegistrationDept data in RegistrationDeptList)
            {
                if (!RegistrationDeptDict.ContainsKey(data.DeptName))
                {
                    RegistrationDeptDict.Add(data.DeptName, data);
                }
            }
            // 取得學生資料
            StudentList = qd.GetStudentList();
            bgLoadData.ReportProgress(50);
            // 取得學生固定排名資料
            StudentScoreDict = qd.GetStudentScoreDict(selectItemName);
            bgLoadData.ReportProgress(100);
        }