Пример #1
0
        static void Main(string[] args)
        {
            lPresentadorTexto presentadorTexto = new PresentadorTexto();
            ILimpiarArchivos  limpiarArchivos  = new LimpiarArchivos();

            limpiarArchivos.vaciarArchivos();
            lPresentador      presentador = new PresentadorDatos();
            lLeerArchivoTexto Lector      = new LeerArchivoTexto();
            lLeerArchivoTexto LectorJSON  = new LeerArchivoJSON();
            List <string>     lines       = new List <string>();

            if (args[0] == "-f")
            {
                if (args[1] == "CSV")
                {
                    lines = Lector.LeerArchivo("Pedidos.txt");
                }
                else
                {
                    lines = LectorJSON.LeerArchivo("Pedidos.json");
                }
            }

            foreach (string line in lines)
            {
                presentador.PresentadorInformacion(line);
                Console.WriteLine();
            }
            Console.ReadLine();
            presentadorTexto.CambiarEstiloTexto(ConsoleColor.White);
        }
Пример #2
0
        public decimal TiempoTraslado(State.State _entPedido)
        {
            lPresentadorTexto presentadorTexto = new PresentadorTexto();
            decimal           TiempoTraslado   = 0;

            if (lstEnvios.Contains(_entPedido.cMedioTransporte))
            {
                TiempoTraslado = _entPedido.dDistancia / _entPedido.cMedioTransporte.dVelocidadEntrega;
            }
            return(TiempoTraslado);
        }