public CourseRecord(String g, Section sect, Student stud)
 {
     grade = GetGradeEnum(g);
     section = sect;
     student = stud;
 }
 public void AddSection(Section s)
 {
 }
 public void DropSection(Section s)
 {
 }
 private bool LoadSubtractiveResult(Section sect)
 {
     return student.GetTranscript().RemoveCourseRecord(new CourseRecord("None", sect, student));
 }
 private bool LoadAdditiveResult(Section sect)
 {
     return student.GetTranscript().AddCourseRecord(new CourseRecord("None", sect, student));
 }
 public bool CheckWithdrawalDeadline(Section s)
 {
     return true;
 }
        public List<Section> GetSections(Course c)
        {
            List<Section> sections = new List<Section>();
            DataRowCollection rows = _studentRecords.Sections.Rows;
            foreach (DataRow r in rows)
            {
                StudentRecordsDataSet.SectionsRow row = (StudentRecordsDataSet.SectionsRow)r;
                if (row.CourseID == c.GetID())
                {
                    Semester semTemp = University.Instance.GetSemesterByID(row.SemesterID);
                    Section s = new Section(row.ID, row.Number, c, semTemp);

                    List<User> instrs = new List<User>();
                    short uID = GetUserIDbyEmployeeID(row.Instructor1_EmployeeID);
                    User u = GetUserByID(uID);
                    instrs.Add(u);
                    s.SetInstructors(instrs);

                    if (row.TA_EmployeeID != -1)
                    {
                        short uID2 = GetUserIDbyEmployeeID(row.TA_EmployeeID);
                        User u2 = GetUserByID(uID2);
                        s.setTA(u2);
                    }

                    s.SetGeoSpatialData(row.Building, row.RoomNumber, row.DaysOfWeek, row.TimeOfDay);
                    sections.Add(s);
                }
            }
            return sections;
        }
 public bool CheckRegistrationDeadline(Section s)
 {
     return true;
 }
 public bool CheckDropDeadline(Section s)
 {
     return true;
 }
 public bool CheckCoAndPreRequisites(Section s)
 {
     return true;
 }
        private void Sections_listBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Students_listBox.Items.Clear();
            Grades_listBox.Items.Clear();
            this.errMsg_textBox.Text = "Select Student and Grade";
            Grade_comboBox.SelectedItem = Grade_comboBox.Items[0];
            cr = null;

            section = sections[Sections_listBox.SelectedIndex];
            students = section.GetStudents();

            LoadStudentsAndGrades();
        }
        private void Semesters_listBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Sections_listBox.Items.Clear();
            Students_listBox.Items.Clear();
            Grades_listBox.Items.Clear();
            this.errMsg_textBox.Text = "Select Student and Grade";
            Grade_comboBox.SelectedItem = Grade_comboBox.Items[0];
            students = null; section = null; cr = null;

            Semester sem = semesters[Semesters_listBox.SelectedIndex];
            sections = University.Instance.GetSectionsByEmployeeUserIDAndSemester(employee.GetID(), sem);
            foreach (Section s in sections)
            {
                String sectionString = s.GetCourse().GetDepartment() + " ";
                sectionString += s.GetCourse().GetNumber() + " - ";
                sectionString += s.GetNumber().ToString().PadLeft(3, '0');
                Sections_listBox.Items.Add(sectionString);
            }
        }