private void btnAgregarDeporte_Click(object sender, EventArgs e) { FormMantenimientoDeporte formMantenimientoDeporte = new FormMantenimientoDeporte(); formMantenimientoDeporte.ShowDialog(); formMantenimientoDeporte.editar = false; ListarDeporte(); }
private void btnEditarDeporte_Click(object sender, EventArgs e) { if (tablaDeporte.SelectedRows.Count > 0) { FormMantenimientoDeporte form = new FormMantenimientoDeporte(); form.editar = true; form.txtBoxIdDeporte.Text = tablaDeporte.CurrentRow.Cells[0].Value.ToString(); form.txtBoxIdProfesor.Text = tablaDeporte.CurrentRow.Cells[1].Value.ToString(); form.txtBoxNombreDeporte.Text = tablaDeporte.CurrentRow.Cells[3].Value.ToString(); form.comboBoxDiasDeporte.Text = tablaDeporte.CurrentRow.Cells[6].Value.ToString(); form.comboBoxHorarios.Text = tablaDeporte.CurrentRow.Cells[7].Value.ToString(); form.ShowDialog(); ListarDeporte(); } else { FormNotificacion.VerificarForm("Seleccione una fila para editar"); } }