private void alunoaToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmConsultaAluno aluno = new frmConsultaAluno();

            aluno.ShowDialog();
            aluno.Dispose();
        }
Example #2
0
        private void btPesquisar_Click(object sender, EventArgs e)
        {
            frmConsultaAluno f = new frmConsultaAluno();

            f.ShowDialog();
            if (f.codigo != 0)
            {
                AlunoDTO dto = bll.Pesquisar(f.codigo);
                txtMatricula.Text      = Convert.ToString(dto.Id);
                txtAluno.Text          = dto.Nome;
                txtResponsavel.Text    = dto.Responsavel;
                cbbSala.SelectedIndex  = dto.Cod_Sala - 1;
                cbbSerie.SelectedIndex = dto.Cod_Serie - 1;
                cbbTurma.SelectedIndex = dto.Cod_Turma - 1;
            }
            AlteraBotoes(3);
            f.Dispose();
        }