public AssignSubjectToProfessorControl() { InitializeComponent(); List <Professor> professorsList = usersData.GetAllProfessors(); foreach (Professor professor in professorsList) { professorsBox.Items.Add(professor.degree + " " + professor.Name + " " + professor.Surname); } List <Subject> subjectsList = otherData.GetAllUnassignedSubjects(); foreach (Subject subject in subjectsList) { subjectsListBox.Items.Add(subject.Title); } }