private void WriteDomain(Cell cell, DomainRow domain)
        {
            Row row    = cell.ParentRow;
            int shift  = row.IndexOf(cell) + 1;
            int fields = 3;

            foreach (SemesterData sems in domain.Scores.Keys)
            {
                ScoreData data  = domain.Scores[sems];
                int       index = -1;
                if (_map.SemesterMapping.ContainsKey(sems))
                {
                    index = _map.SemesterMapping[sems];
                }

                if (index < 0)
                {
                    continue;
                }

                index = index * fields + shift;
                Write(row.Cells[index], GetPeriodCredit(data.GetPeriodCredit()));
                Write(row.Cells[index + 1], data.Score);
                Write(row.Cells[index + 2], data.GetDegree());
            }
        }
        public void Add(JHSemesterScoreRecord record)
        {
            foreach (K12.Data.DomainScore domain in record.Domains.Values)
            {
                if (!_config.PrintSubjects.ContainsKey(domain.Domain))
                {
                    continue;
                }

                if (!_domains.ContainsKey(domain.Domain))
                {
                    _domains.Add(domain.Domain, new DomainRow(domain.Domain));
                }

                DomainRow row = _domains[domain.Domain];

                row.Add(new SemesterData("" + record.SchoolYear, "" + record.Semester), domain);
            }

            foreach (K12.Data.SubjectScore subject in record.Subjects.Values)
            {
                if (!_config.PrintSubjects.ContainsKey(subject.Domain))
                {
                    continue;
                }
                if (!_config.PrintSubjects[subject.Domain].Contains(subject.Subject))
                {
                    continue;
                }

                if (!_domains.ContainsKey(subject.Domain))
                {
                    _domains.Add(subject.Domain, new DomainRow(subject.Domain));
                }

                DomainRow row = _domains[subject.Domain];
                row.Add(new SemesterData("" + record.SchoolYear, "" + record.Semester), subject);
            }
        }