Beispiel #1
0
        public static string MostrarGalletita(Galletita galleta)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Peso: " + galleta._peso);

            return(Producto.MostrarProducto(galleta) + sb.ToString());
        }
Beispiel #2
0
        public string MostrarGaseosa()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Litros: " + this._litros);

            return(Producto.MostrarProducto(this) + sb.ToString());
        }
Beispiel #3
0
        public string MostrarJugo()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(Producto.MostrarProducto(this));
            sb.Append("-");
            sb.Append(this._sabor);
            return(sb.ToString());
        }
Beispiel #4
0
        public string MostrarGaseosa()
        {
            StringBuilder SB = new StringBuilder();

            SB.AppendLine(Producto.MostrarProducto(this));
            SB.AppendLine("Litros: " + this._litros);

            return(SB.ToString());
        }
        public string MostrarJugo()
        {
            StringBuilder SB = new StringBuilder();

            SB.AppendLine(Producto.MostrarProducto(this));
            SB.AppendLine("Sabor: " + this._sabor);

            return(SB.ToString());
        }
        public static string MostrarGalletita(Galletita galletita)
        {
            StringBuilder SB = new StringBuilder();

            SB.AppendLine(Producto.MostrarProducto(galletita));
            SB.AppendLine("Peso: " + galletita._peso);

            return(SB.ToString());
        }
Beispiel #7
0
        public static string MostrarEstante(Estante e)
        {
            string ret = string.Format("Ubicacion del estante: {0}\nProductos:\n", e.ubicacionEstante);

            foreach (Producto p in e.GetProductos())
            {
                ret += Producto.MostrarProducto(p);
            }
            return(ret);
        }
Beispiel #8
0
        public string MostrarJugo()
        {
            StringBuilder sb = new StringBuilder();

            //sb.Append("" + base._codigoBarra);
            //sb.Append("" + base.Marca);
            //sb.Append("" + base.Precio);
            sb.Append("" + this._sabor); //AppendLine ??

            return(Producto.MostrarProducto(this) + sb.ToString());
        }
Beispiel #9
0
        public string MostrarEstante(Estante e)
        {
            string retorno = string.Empty;

            for (int i = 0; i < e.productos.Length; i++)
            {
                //Para mostrar los productos
                retorno += Producto.MostrarProducto(e.productos[i]);
            }
            return(retorno);
        }
Beispiel #10
0
        public static string MostrarEstante(Estante estante)
        {
            StringBuilder retorno = new StringBuilder();

            retorno.AppendFormat("Estante n°: {0}\n", estante.ubicacionEstante);
            retorno.AppendLine("Productos en el estante:");
            for (int i = 0; i < estante.productos.Length; i++)
            {
                retorno.AppendLine(Producto.MostrarProducto(estante.productos[i]));
            }
            return(retorno.ToString());
        }
        public static string MostrarEstante(Estante e)
        {
            string ret = e.ubicacionEstante.ToString() + " ";

            foreach (Producto p in e.producto)
            {
                if (!(p is null))
                {
                    ret += Producto.MostrarProducto(p) + " ";
                }
            }
            return(ret);
        }
Beispiel #12
0
        public static string MostrarEstante(Estante e)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine(string.Format("Ubicacion estante: {0}", e.ubicacionEstante));
            sb.AppendLine("Productos del estante:");
            foreach (Producto auxProducto in e.productos)
            {
                sb.AppendLine(Producto.MostrarProducto(auxProducto));
            }

            return(sb.ToString());
        }
Beispiel #13
0
        public static string MostrarEstante(Estante e)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("Ubicacion: " + e.ubicacionEstante);
            sb.AppendLine("Productos: ");

            foreach (Producto auxProducto in e.GetProductos())//o e.arrayProductos;
            {
                if (!(auxProducto is null))
                {
                    sb.AppendLine(Producto.MostrarProducto(auxProducto));
                }
            }
            return(sb.ToString());
        }
        /// <summary>
        /// Muestra los datos de un estante, incluyendo sus productos.
        /// </summary>
        /// <param name="estante">Estante.</param>
        /// <returns>String con los datos del estante.</returns>
        public static string MostrarEstante(Estante estante)
        {
            string retorno = string.Empty;

            retorno += String.Format("Estante. Ubicación: {0}\n", estante.ubicacionEstante);
            retorno += "\nProductos: \n";

            foreach (Producto producto in estante.GetProductos())
            {
                if (!(producto is null))
                {
                    retorno += Producto.MostrarProducto(producto) + "\n";
                }
            }

            return(retorno);
        }
Beispiel #15
0
 public string MostrarJugo()
 {
     return(Producto.MostrarProducto(this) + " " + _sabor.ToString());
 }
Beispiel #16
0
 public static string MostrarGalletita(Galletita galleta)
 {
     return(Producto.MostrarProducto(galleta) + " " + galleta._peso);
 }
Beispiel #17
0
 public string MostrarGaseosa()
 {
     return(Producto.MostrarProducto(this) + " " + this._litros);
 }