private Dictionary <ProjectReportDate, Dictionary <Report, int> > FillSecondDictionary() { SecondDictionary = new Dictionary <ProjectReportDate, Dictionary <Report, int> >(); foreach (var v in project.GetProjectReportDate(project.GetProject(this.studentNumber, projectId).FirstOrDefault().id)) { SecondDictionary.Add(v, FillThirdDictionary()); } foreach (KeyValuePair <ProjectReportDate, Dictionary <Report, int> > s in SecondDictionary) { for (int i = 0; i < ThirdDictionary.Count; i++) { Debug.WriteLine(s.Key.week_label + " " + s.Value.Keys.ElementAt(i).grade); } } return(SecondDictionary); }
private void FillGrades(Project p) { project = DatabaseFactory.getInstance().getDAOProject(); Grades = new Dictionary <BaroAspect, Dictionary <ProjectReportDate, Dictionary <Report, int> > >(); foreach (var v in project.GetBaroAspect(project.GetProject(this.studentNumber, projectId).FirstOrDefault().id)) { Grades.Add(v, FillSecondDictionary()); } }
public UserProjectWrapper(int studentNumber, int project_id) { this.projectId = project_id; this.studentNumber = studentNumber; StudentNumber = studentNumber; student = DatabaseFactory.getInstance().getDAOStudent(); project = DatabaseFactory.getInstance().getDAOProject(); FillProjectMembers(student.getStudentGroup(studentNumber).First()); FillTutors(student.getStudentGroup(studentNumber).First()); FillProjectOwners(project.GetProject(this.studentNumber, projectId).FirstOrDefault()); FillProjectDetails(project.GetProject(this.studentNumber, projectId).FirstOrDefault(), student.getStudentGroup(studentNumber).First()); FillMyGrades(project.GetProject(this.studentNumber, projectId).FirstOrDefault()); FillGrades(project.GetProject(this.studentNumber, projectId).FirstOrDefault()); FillSubAspects(project.GetProject(this.studentNumber, projectId).FirstOrDefault()); FillSubSubAspects(project.GetProject(this.studentNumber, projectId).FirstOrDefault()); }