private void btnEditarF2_Click(object sender, EventArgs e) { if (dataGridView2.SelectedRows.Count > 0) { FormMantEstudiantes frm = new FormMantEstudiantes(); //EDITAR //frm.Editar = true; frm.Operacion = "Editar"; frm.MostrarCarreras(); frm.Materias(); frm.idEstudiante = dataGridView2.CurrentRow.Cells["Id_Estudiante"].Value.ToString(); frm.maskedtxtMatricula.Text = dataGridView2.CurrentRow.Cells["Matricula_Estudiante"].Value.ToString(); frm.txtNombre.Text = dataGridView2.CurrentRow.Cells["Nombre_Estudiante"].Value.ToString(); frm.txtApellido.Text = dataGridView2.CurrentRow.Cells["Apellido_Estudiante"].Value.ToString(); frm.cbmCarrera.Text = dataGridView2.CurrentRow.Cells["Nombre_Carrera"].Value.ToString(); frm.maskedTxtTelefono.Text = dataGridView2.CurrentRow.Cells["TELEFONO"].Value.ToString(); frm.ShowDialog(); MostrarEstudiantes(); } else { MessageBox.Show("Seleccione una fila por favor"); } }
private void button1_Click(object sender, EventArgs e) { FormMantEstudiantes frm = new FormMantEstudiantes(); frm.Operacion = "Insertar"; frm.MostrarCarreras(); frm.Materias(); frm.ShowDialog(); MostrarEstudiantes(); }