Ejemplo n.º 1
0
        private void FormAlun_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.ALUNOS_TURMA_Y (" + Int32.Parse(turmaSelected) + ") ", BDconnection.getConnection());
            SqlDataReader reader = cmd.ExecuteReader();

            listBox2.Items.Clear();
            while (reader.Read())
            {
                relAlunosTurma B = new relAlunosTurma();

                B.ID_turma  = (int)reader["ID_turma"];
                B.TNMEC     = (int)reader["NMEC"];
                B.Idade     = (int)reader["Idade"];
                B.nome_Prof = reader["Nome"].ToString();
                B.Email     = reader["Email"].ToString();
                B.RegEstudo = reader["RegimeEstudo"].ToString();

                listBox2.Items.Add(B);
            }
            BDconnection.getConnection().Close();
            currentT = 0;
            ShowTurma_Prof();
        }
Ejemplo n.º 2
0
        public void ShowTurma_Prof()
        {
            if (listBox2.Items.Count == 0 | currentT < 0)
            {
                return;
            }
            relAlunosTurma p = new relAlunosTurma();

            p = (relAlunosTurma)listBox2.Items[currentT];
        }