private void btnEditar_Click(object sender, EventArgs e) { string nomeAluno,codAluno,dataNasc; dt = ClsAlunos.listar(); nomeAluno = dt.Rows[dgvAlunos.CurrentRow.Index]["nome"].ToString(); codAluno = dt.Rows[dgvAlunos.CurrentRow.Index]["id_aluno"].ToString(); dataNasc = dt.Rows[dgvAlunos.CurrentRow.Index]["data_nasc"].ToString(); frmAlunosCadastro telaEditar = new frmAlunosCadastro(nomeAluno,codAluno,dataNasc); telaEditar.ShowDialog(); }
//teclando F9 abre o form de alunos para matricular um aluno private void cbxAluno_KeyDown(object sender, KeyEventArgs e) { if (e.KeyData == Keys.F9) { frmAlunosCadastro telaCadastro = new frmAlunosCadastro(frmAlunosCadastro.eStatusForm.search); telaCadastro.ShowDialog(); } else if (e.KeyCode == Keys.Delete) { e.Handled = true; } }
private void btnEditar_Click(object sender, EventArgs e) { string nomeAluno, codAluno, dataNasc; dt = ClsAlunos.listar(); nomeAluno = dt.Rows[dgvAlunos.CurrentRow.Index]["nome"].ToString(); codAluno = dt.Rows[dgvAlunos.CurrentRow.Index]["id_aluno"].ToString(); dataNasc = dt.Rows[dgvAlunos.CurrentRow.Index]["data_nasc"].ToString(); frmAlunosCadastro telaEditar = new frmAlunosCadastro(nomeAluno, codAluno, dataNasc); telaEditar.ShowDialog(); }