private void FillProjectDetails(Project p, ProjectGroup pg)
 {
     CurrentProjectId              = p.id;
     CurrentProjectSummary         = p.description;
     CurrentProjectName            = p.name;
     CurrentProjectDate            = (Convert.ToDateTime(p.start_date).Date.ToString() + " tot " + Convert.ToDateTime(p.end_date).Date.ToString());
     CurrentProjectGroupGrade      = student.getEndGradeGroup(studentNumber, pg.id);
     CurrentProjectIndividualGrade = student.getEndGradeIndividual(studentNumber, p.id);
 }
Example #2
0
        public void test_31_getEndGradeIndividual_invalid_input()
        {
            String exception = "";

            try
            {
                int i = d.getEndGradeIndividual(-1, -1);
            }
            catch (Exception e)
            {
                exception = e.ToString();
            }
            Assert.IsTrue(exception.Contains("ArgumentOutOfRange"));

            exception = "";
            try
            {
                int i = d.getEndGradeIndividual(3000000, -1);
            }
            catch (Exception e)
            {
                exception = e.ToString();
            }
            Assert.IsTrue(exception.Contains("ArgumentOutOfRange"));

            exception = "";
            try
            {
                int i = d.getEndGradeIndividual(-1, 1);
            }
            catch (Exception e)
            {
                exception = e.ToString();
            }
            Assert.IsTrue(exception.Contains("ArgumentOutOfRange"));
        }
Example #3
0
        private void FillAllIndividualGrades()
        {
            Grades = new Dictionary <string, int[]>();

            foreach (Project p in AllProjects)
            {
                if (student.getReportResults(p.id).Count() > 0)
                {
                    int pid;
                    pid = p.id;
                    string pnaam;
                    pnaam = p.name;
                    int pcijfer;
                    pcijfer = (int)student.getReportResults(pid).First().group_end_grade;
                    int icijfer;
                    icijfer = student.getEndGradeIndividual(StudentNumber, pid);
                    Grades.Add(pnaam, new int[2] {
                        pcijfer, icijfer
                    });
                }
            }
            int i = 0;
        }