Example #1
0
        /*
         * public bool Insertar(EntradaInv ent, int pos)
         * {
         *  if (pos == 1)
         *  {
         *      ent.Siguiente = Primero;
         *      Primero = ent;
         *      return true;
         *  }
         *  EntradaInv temp = Primero;
         *  int i = 1;
         *  while (temp != null && temp.Siguiente != null && i < pos - 1)
         *  {
         *      temp = temp.Siguiente;
         *      i++;
         *  }
         *  if (temp == null)
         *      return false;
         *  ent.Siguiente = temp.Siguiente;
         *  temp.Siguiente = ent;
         *  return true;
         *  // a -> b -> c -> d
         *  //
         * }
         */
        public override string ToString()
        {
            string     Reporte = "Comenza Reporte de inventario:" + Environment.NewLine;
            EntradaInv temp    = Primero;
            int        i       = 1;

            while (temp != null)
            {
                Reporte += "Registro " + i.ToString() + ": " + Environment.NewLine;
                Reporte += temp.ToString() + Environment.NewLine;
                temp     = temp.Siguiente;
                i++;
            }
            Reporte += "Fin Reporte de Inventario.";
            return(Reporte);
        }
Example #2
0
        public string ReporteInverso()
        {
            string Reporte = "Comienza Reporte inverso de inventario:" + Environment.NewLine;

            if (Ultimo == null)
            {
                Reporte += "No hay datos.";
                return(Reporte);
            }
            EntradaInv temp = Ultimo;

            while (temp != null)
            {
                Reporte += temp.ToString() + Environment.NewLine;
                temp     = temp.Anterior;
            }
            Reporte += "Termina Reporte Inverso de Inventario.";
            return(Reporte);
        }
Example #3
0
        public override string ToString()
        {
            string Reporte = "Comenza Reporte de inventario:" + Environment.NewLine;

            if (Primero == null)
            {
                Reporte += "No hay datos.";
                return(Reporte);
            }
            EntradaInv temp = Primero;

            while (temp != null)
            {
                Reporte += temp.ToString() + Environment.NewLine;
                temp     = temp.Siguiente;
            }
            Reporte += "Fin Reporte de Inventario.";
            return(Reporte);
        }