private void btnConsultar_Click(object sender, EventArgs e) { if (gridViewProfesor.SelectedRows.Count >= 1) { string id = gridViewProfesor.SelectedRows[0].Cells[0].Value.ToString(); Profesor form = new Profesor(tipo, id); form.Text = tipo + " Profesor"; form.Show(); btnSalir.PerformClick(); } else { MessageBox.Show("No se ha seleccionado un profesor.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); txtBusqueda.Clear(); } }
private void registrarToolStripMenuItem2_Click(object sender, EventArgs e) { Profesor.Profesor p = new Profesor.Profesor("registro", ""); p.Show(); }