Esempio n. 1
0
        private void allaLaborationerlistBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Laboration selectedLab = (Laboration)allaLaborationerlistBox.SelectedItem;

            labNamntextBox.Text = selectedLab.LabNamn;
            labInfotextBox.Text = selectedLab.LabInfo;

            List <Student> selectedLabStudents = selectedLab.ListaAllaDeltagandeStudenter();

            studenterPåLablistBox.DataSource    = selectedLabStudents;
            studenterPåLablistBox.DisplayMember = "StudentFullName";
            studenterPåLablistBox.ValueMember   = "StudentID";
            lärarePåLablistBox.DataSource       = selectedLab.ListaAllaDeltagandeLärare();
            lärarePåLablistBox.DisplayMember    = "LärareFullName";
            lärarePåLablistBox.ValueMember      = "LärarID";
        }