Пример #1
0
        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));
            }
        }
Пример #2
0
 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();
 }