protected void botonModificacion_Click_1(object sender, EventArgs e) { if (tablaListado.SelectedRows.Count == 1) { int index = tablaListado.SelectedRows[0].Index; AutomovilDTO automovil = (AutomovilDTO)automoviles.ElementAt(index); AltaAutomovil crearAutomovilForm = new AltaAutomovil(automovil, this); crearAutomovilForm.ShowDialog(); } else { MessageBox.Show("Debe seleccionar el automovil a modificar"); } }
protected void botonAlta_Click_1(object sender, EventArgs e) { AltaAutomovil altaAutomovilForm = new AltaAutomovil(this); altaAutomovilForm.ShowDialog(); }