示例#1
0
            public int GetStudentCount(string className)
            {
                ReportGroupByStudent groupByStudent = null;
                int count = 0;

                if (groupByClassName.TryGetValue(className, out groupByStudent))
                {
                    count = groupByStudent.GetCollection().Count();
                }
                return(count);
            }
示例#2
0
            public void AddReport(Report report)
            {
                ReportGroupByStudent  reports     = null;
                ReportGroupByCategory reportStats = null;

                if (!groupByClassName.TryGetValue(report.ClassName, out reports))
                {
                    reports = new ReportGroupByStudent();
                    groupByClassName[report.ClassName] = reports;
                }
                if (!groupByClassNameStats.TryGetValue(report.ClassName, out reportStats))
                {
                    reportStats = new ReportGroupByCategory();
                    groupByClassNameStats[report.ClassName] = reportStats;
                }
                reportStats.AddReport(report);
                reports.AddReport(report);
            }
示例#3
0
 public void AddReport(Report report)
 {
     ReportGroupByStudent reports = null;
     ReportGroupByCategory reportStats = null;
     if (!groupByClassName.TryGetValue(report.ClassName, out reports))
     {
         reports = new ReportGroupByStudent();
         groupByClassName[report.ClassName] = reports;
     }
     if (!groupByClassNameStats.TryGetValue(report.ClassName, out reportStats))
     {
         reportStats = new ReportGroupByCategory();
         groupByClassNameStats[report.ClassName] = reportStats;
     }
     reportStats.AddReport(report);
     reports.AddReport(report);
 }