Пример #1
0
        public ClassSemsScoreAvgCmpReporter(Dictionary <string, DAL.ClassEntity> ClassEntityDic, List <string> SubjList, List <string> DomainList, string SchoolName, string SchoolYear, string Semester)
        {
            shi = new ScoreHeaderIndexer();
            foreach (string str in SubjList)
            {
                shi.Add(str, false, 0);
            }

            foreach (string str in DomainList)
            {
                shi.Add(str, true, 0);
            }

            shi.Sort(DAL.DALTransfer.GetDomainMapping());

            int ColIdx = 1;

            foreach (Header h in shi)
            {
                h.ColumnIndex = ColIdx;
                ColIdx       += 2;
            }

            // 建立 ColIdx

            _ClassEntityDic = ClassEntityDic;

            _ClassNameList = new List <string>();

            foreach (string str in _ClassEntityDic.Keys)
            {
                _ClassNameList.Add(str);
            }

            _ClassNameList.Sort();

            _SchoolName = SchoolName;
            _SchoolYear = SchoolYear;
            _Semester   = Semester;

            _BGWorker                     = new BackgroundWorker();
            _BGWorker.DoWork             += new DoWorkEventHandler(_BGWorker_DoWork);
            _BGWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_BGWorker_RunWorkerCompleted);
            _BGWorker.RunWorkerAsync();
        }
Пример #2
0
        private void LoadSubjectDomainNameToForm()
        {
            lstSubj.Items.Clear();
            lstDomain.Items.Clear();

            List <string> SubjNameList   = DAL.DALTransfer.GetSubjectName();
            List <string> DoaminNameList = DAL.DALTransfer.GetDoaminName();

            ScoreHeaderIndexer shtSubj   = new ScoreHeaderIndexer();
            ScoreHeaderIndexer shtDomain = new ScoreHeaderIndexer();

            foreach (string str in SubjNameList)
            {
                shtSubj.Add(str, false, 0);
            }
            shtSubj.Sort(DAL.DALTransfer.GetDomainMapping());

            foreach (Header h in shtSubj)
            {
                lstSubj.Items.Add(h.Name);
            }

            foreach (string str in DoaminNameList)
            {
                shtDomain.Add(str, true, 0);
            }
            shtDomain.Sort(DAL.DALTransfer.GetDomainMapping());

            foreach (Header h in shtDomain)
            {
                lstDomain.Items.Add(h.Name);
            }

            pictureBox1.Visible = false;
            pictureBox2.Visible = false;
        }