/// <summary> /// //////////////////////////////////////////////////////////////////////////// /// </summary> private void FormAnos_Turmas_Load() { if (!BDconnection.verifySGBDConnection()) { return; } int number; bool success = Int32.TryParse(textBoxAnos.Text, out number); if (success) { SqlCommand cmd = new SqlCommand("select * from SAA.ALUNOS_TURMA_DE_HA_X_ANOS (" + number + ") ", BDconnection.getConnection()); SqlDataReader reader = cmd.ExecuteReader(); listBox2.Items.Clear(); while (reader.Read()) { anosTurma B = new anosTurma(); B.ID_turma = (int)reader["ID_turma"]; B.NNMEC = (int)reader["NMEC"]; B.nome = reader["Nome"].ToString(); B.Email = reader["Email"].ToString(); B.resEstudo = reader["RegimeEstudo"].ToString(); B.idade = (int)reader["Idade"]; B.anoLect = (int)reader["AnoLectivo"]; listBox2.Items.Add(B); } } else { return; } BDconnection.getConnection().Close(); currentAnos = 0; ShowTurma_Anos(); }