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_41_getEndGradeGroup_invalid_input()
        {
            String exception = "";

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

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

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