private void Form3_Load(object sender, EventArgs e) // R { ShowEventBar(); studentNameLabel.Text = studentController.SetFirstLastName(egnPass); // Add subjects collection to subjectComboBox { studentController.InitializeStudent(egnPass); for (int i = 0; i < studentController.SubjectsToInsert().Count; i++) { StudentSubjectsComboBox.Items.Add(studentController.SubjectsToInsert()[i]); } } // Loads all the contact info (except his own) of the class the student is in and orders it and its' respective head teacher { studentController.ContactInfo().ForEach(w => ContactInfoListBox.Items.Add(w)); HeadTeacherText = studentController.HTeacherContactInfo(); } // Orders The ContactInfoListBoxItems { List <string> tempList = new List <string>(); foreach (var item in ContactInfoListBox.Items) { tempList.Add(item.ToString()); } tempList = tempList.OrderBy(w => w).ToList(); ContactInfoListBox.Items.Clear(); tempList.ForEach(w => ContactInfoListBox.Items.Add(w)); } }
public void TestForCorrectSetFirstAndLastNameInWelcomeStudentForm() { var register = new StudentFormController(); string egnPass = "******"; string result = register.SetFirstLastName(egnPass); string actions = "Julia James"; Assert.AreEqual(result, actions, "Correct set first and last name on Student"); }
private void Form3_Load(object sender, EventArgs e) // R { parentNameLabel.Text = parentController.SetFirstLastName(egnParentPass); studentNameLabel.Text = studentController.SetFirstLastName(egnStudentPass); // Add subjects collection to subjectComboBox { studentController.InitializeStudent(egnStudentPass); for (int i = 0; i < studentController.SubjectsToInsert().Count; i++) { StudentSubjectsComboBox.Items.Add(studentController.SubjectsToInsert()[i]); } } // Loads all the contact info (except his own) of the class the student is in and orders it and its' respective head teacher ShowEventBar(); }