private void väljLabbcomboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Laboration selectedLab = (Laboration)väljLabbcomboBox.SelectedItem;

            väljStudentcomboBox.DataSource    = selectedLab.ListaAllaDeltagandeStudenter();
            väljStudentcomboBox.DisplayMember = "StudentFullName";
            väljStudentcomboBox.ValueMember   = "StudentID";


            studenterBetygdataGridView.DataSource = selectedLab.ListaAllaDeltagandeStudenter();
            //studenterBetygdataGridView.Columns
        }
Esempio n. 2
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";
        }