}//FIN DEL METODO CREAR LISTA

        public nodoLibro buscar(string mar, string mod)
        {
            nodoLibro aux = cabeza;

            while (aux != null)
            {
                if (aux.get_titulo() == mar && aux.get_autor() == mod)
                {
                    return(aux);
                }
                aux = aux.get_sig();
            }
            return(null);
        }
Ejemplo n.º 2
0
        private void bto_buscar_Click(object sender, EventArgs e)
        {
            //BUSCAR POR MARCA Y MODELO
            string    mar = txt_titulo.Text;
            string    mod = txt_autor.Text;
            nodoLibro aux = lis_libro.buscar(mar, mod);

            if (aux == null)
            {
                MessageBox.Show("NO TENEMOS EL LIBRO");
            }
            else
            {
                txt_titulo.Text = aux.get_titulo().ToString();
                txt_autor.Text  = aux.get_autor();

                /* CBO_MARCA_MOVIL.Text = aux.get_marca();
                 * TXT_MODELO_MOVIL.Text = aux.get_modelo();
                 * TXT_PRECIO_MOVIL.Text = aux.get_precio().ToString();
                 * TXT_CANTIDAD_MOVIL.Text = aux.get_cantidad().ToString();*/
            }
        }