Ejemplo n.º 1
0
        private void LstCoursesList_SelectedIndexChanged(object sender, EventArgs e)
        {
            lstAssignments.Items.Clear();
            lstGrades.Items.Clear();
            StudentCourse selectedCourse = (StudentCourse)_allCourses[lstCoursesList.SelectedIndex];

            _allAssignments   = selectedCourse.GetAllAssignmentsAsAList();
            lblProfessor.Text = @"Professor: " + selectedCourse.GetProfessorName();

            foreach (var t in _allAssignments)
            {
                Assignment assign = (Assignment)t;
                lstAssignments.Items.Add(assign.GetName() + "\t\t");
                lstGrades.Items.Add(assign.GetGrade());
            }
        }
Ejemplo n.º 2
0
        private void Frm_UserDetail_Load(object sender, EventArgs e)
        {
            if (UserId != null)
            {
                _user             = Data.GetUserInformation(UserId);
                lblName.Text      = _user.GetTypeOfUser() + @": " + _user.GetName();
                lblStudentID.Text = @"ID: " + _user.GetId();
                _allCourses       = _user.GetAllCourseAsAList();

                foreach (var t in _allCourses)
                {
                    StudentCourse stu = (StudentCourse)t;
                    lstCoursesList.Items.Add(stu.GetCourseName());
                }
            }
        }
Ejemplo n.º 3
0
 public void AddCourse(StudentCourse course)
 {
     _dictCourses.Add(course.GetCourseName(), course);
 }