Esempio n. 1
0
        private void buttonBuscarSuc_Click(object sender, EventArgs e)
        {
            int patente = int.Parse(this.textBoxPtente.Text);

            vehi = adm.buscarVehiculo(patente);
            if (vehi == null) // Mostrar el otro formulario
            {
                DialogResult result = MessageBox.Show("El vehículo ingresado no está registrado. ¿Desea registrarlo?", "Vehiculo inexistente", MessageBoxButtons.YesNo);
                if (result == DialogResult.Yes)
                {
                    FormCrearVehi fVehi = new FormCrearVehi(patente, adm);
                    fVehi.ShowDialog();
                }
            }
            else
            {
                this.labelModelo.Text = vehi.Modelo.ToString();
            }
        }