///////////////////////////////////////////// private void FormProf_Turmas_Load() { if (!BDconnection.verifySGBDConnection()) { return; } if (comboBoxT.Items.Count == 0) { return; } String turmaSelected = (String)comboBoxT.SelectedItem; //MessageBox.Show(depSelected); //TROCAR AQU!!! SqlCommand cmd = new SqlCommand("select * from SAA.PROFESSORES_TURMA_Y (" + Int32.Parse(turmaSelected) + ") ", BDconnection.getConnection()); SqlDataReader reader = cmd.ExecuteReader(); listBox1.Items.Clear(); while (reader.Read()) { turmaAluno B = new turmaAluno(); B.ID_turma = (int)reader["ID_turma"]; B.TNMEC = (int)reader["TNEMC"]; B.nome_Prof = reader["Nome_Prof"].ToString(); B.numGab = (int)reader["Num_Gabinete"]; B.Email = reader["Email"].ToString(); listBox1.Items.Add(B); } BDconnection.getConnection().Close(); currentA = 0; ShowTurma_Prof(); }
public void ShowTurma_Professor() { if (listBox1.Items.Count == 0 | currentT < 0) { return; } turmaAluno p = new turmaAluno(); p = (turmaAluno)listBox1.Items[currentA]; }