private void frmTeacherProfile_Load(object sender, EventArgs e)
        {
            //Goes through all courses and adds onto the list box
            for (int i = 0; i < t.getTeacherCourses().Length; i++)
            {
                //If the course exist
                if (t.getTeacherCourse(i) != null)
                {
                    //Add the course to the listbox
                    lsb_Courses.Items.Add(t.getTeacherCourse(i).getCourseID().ToString());//A course is added to the list box
                }
            }

            //Teacher related information

            lbl_tID.Text = "Teacher ID: " + t.getTeacherNumber().ToString();
            //Displays the teacher's number

            lbl_tName.Text = "Teacher Name: " + t.getTeacherName();
            //Displays the teacher's name
        }
Пример #2
0
 /// <summary>
 /// This method books the equipment for rental
 /// </summary>
 /// <param name="d">Day</param>
 /// <param name="h">Hour</param>
 /// <param name="t">Teacher object</param>
 public void bookEquipment(int d, int h, Teacher t)
 {
     // sets the the teacher name for the equipment rented at the time and day
     this.equipmentSchedule[d, h] = t.getTeacherName();
 }