Exemplo n.º 1
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            if (tipoSeleccionado != null)
            {
                fachada.eliminarTipoCombustible(tipoSeleccionado.nombre);
                MessageBox.Show("Se ha eliminado el elemento seleccionado de forma correcta!");
                listaTiposCombustible.Items.Clear();
                foreach (TipoCombustible t2 in fachada.getListaTiposCombustible())
                {
                    listaTiposCombustible.Items.Add(t2);
                }

                listaTiposCombustible.Show();
                tipoSeleccionado = null;
                borrarDatos();
            }

            else
            {
                MessageBox.Show("Debe seleccionar un tipo de combustible");
            }
        }