public void Deserialize(XmlReader reader, IContext context) { reader.ReadToFollowing(FirstYearTag); this.FirstYear = reader.ReadElementContentAsInt(); this.SecondYear = reader.ReadElementContentAsInt(); this.Period = (SemesterPeriod)Enum.Parse(typeof(SemesterPeriod), reader.ReadElementContentAsString()); }
public Semester(string semester) { // 201320142 -> 2013/2014 tavasz this.FirstYear = int.Parse(semester.Substring(0, 4)); this.SecondYear = int.Parse(semester.Substring(4, 4)); this.Period = (SemesterPeriod)int.Parse(semester.Substring(8, 1)); }
public void AddSection(SemesterPeriod semester, string id, string name) { Section section = new Section(this, 30, semester) { SectionId = id, Name = name, }; sections.Add(section); }
public Section(Course course, int maxNoOfStudents, SemesterPeriod semester) // course name { enrollments = new List <Enrollment>(); ACourse = course; MaxNumberOfStudents = maxNoOfStudents; Semester = semester; SectionId = null; Name = null; Faculty = new Teacher(); Faculty.Sections.Add(this); }
public void AddSection(SemesterPeriod semesterPeriod, string sectionId, string sectionName) // Add creating a new section I have to add it to the course !! { // This will take the section information and it is mandatory to take the information for this specific method Section newSection = new Section(this, 30, semesterPeriod); //public Section(Course aCourse, int MaxNumberOfStudents, SemesterPeriod semester) { Sections.Add(newSection); // This is to add the section in this course canUpdate = false; // This is to make sure that once the section is assigned number of evaluations for it cannot be changed } }
public void Section_Semester_GetsAndSets() { // Arrange SemesterPeriod expected = SemesterPeriod.SUMMER; // Act Section sec = new Section() { Semester = SemesterPeriod.SUMMER }; // Assert SemesterPeriod actual = sec.Semester; Assert.AreEqual(expected, actual); }
public void AddSection(string sectionID, SemesterPeriod semesterPeriod, string sectionName) { Section aSec = new Section() { Name = sectionName, MaxNumberOfStudents = 30, SectionId = sectionID, Semester = semesterPeriod }; Sections.Add(aSec); noOfSections++; aSec.Course = this; }
public Section(Course courseCode, int maxNoOfEnrollments, SemesterPeriod semester) { this.course = courseCode; this.maxNumberOfStudents = maxNoOfEnrollments; this.semester = semester; }
public Semester(int firstYear, int secondYear, SemesterPeriod period) { this.FirstYear = firstYear; this.SecondYear = secondYear; this.Period = period; }
private void UpdateSemesters(StudentDashboardViewModel viewModel) { foreach (var semester in viewModel.Semesters) { var semesterPeriod = new SemesterPeriod(viewModel.DateOfEnactment, semester.Sequential); var compareResult = semesterPeriod.Compare(DateTime.Now); if (compareResult < 0) { semester.IsReadOnly = true; } else if (compareResult == 0) { semester.IsCurrent = true; // current semester } } }
public LectiveSemester(SemesterPeriod semester, LectiveYear lectiveYear) : this() { Semester = semester; LectiveYear = lectiveYear; }
public Section(Course course, SemesterPeriod semester) : this() { this.course = course; this.semester = semester; }
public Section(Course course, int maxNoOfEnrollments, SemesterPeriod semester) : this(course, semester) { this.maxNoOfEnrollments = maxNoOfEnrollments; }