コード例 #1
0
        static void Main(string[] args)
        {
            ClienteWeb wb = new ClienteWeb();
            /*bool conexionInternet = wb.Conexion();
            //var login = wb.login();
            if (conexionInternet == false)
            {
                Console.Write("Su equipo no tiene conexion a internet en este momento");
                return;
            }*/
            Console.Write( "1º) Paises" + "\n" + "2º) Observaciones"+ "\n" + "3º) Indicadores" + "\n");
            Console.Write("Seleccione una opción: ");
            int x = 0;
            x = Convert.ToInt16(Console.ReadLine());
            switch (x)
            {
                case 1:
                    menuCountry(wb);
                    break;
                case 2:
                    menuObservations(wb);
                    break;
                case 3:
                    menuIndicators(wb);
                    break;
                default:
                    Console.Write("Opcion incorrecta");
                    break;

            }
            Console.ReadKey();
        }
コード例 #2
0
 public static void menuIndicators(ClienteWeb cw)
 {
     Console.Write("1º) Mostrar todos" + "\n" +
         "2º) Mostrar indicador " + "\n");
     Console.Write("Seleccione una opción: ");
     int x = 0;
     x = Convert.ToInt16(Console.ReadLine());
     switch (x)
     {
         case 1: cw.showIndicator();
             break;
         case 2:
             String indicador = Console.ReadLine();
             cw.showIndicator(indicador);
             break;
         default:
             Console.WriteLine("Opcion erronea");
             break;
     }
     Console.ReadKey();
 }
コード例 #3
0
 public static void menuCountry(ClienteWeb cw)
 {
     Console.Write("1º) Mostrar todos" + "\n" +
         "2º) Mostrar pais " + "\n");
     Console.Write("Seleccione una opción: ");
     int x = 0;
     x = Convert.ToInt16(Console.ReadLine());
     switch (x)
     {
         case 1: cw.showCountry();
             break;
         case 2:
             String pais = Console.ReadLine();
             cw.showCountry(pais);
             break;
         default:
             Console.WriteLine("Opcion erronea");
             break;
     }
     Console.ReadKey();
 }
コード例 #4
0
        public static void menuObservations(ClienteWeb cw)
        {
            Console.Write("1º) Mostrar todos" + "\n" +
                "2º) Mostrar observacion " + "\n");
            Console.Write("Seleccione una opción: ");
            int x = 0;
            x = Convert.ToInt16(Console.ReadLine());
            switch (x)
            {
                case 1: cw.showObservation();
                    break;
                case 2:
                    String observacion = Console.ReadLine();
                    cw.showObservation(observacion);
                    break;
                default:
                    Console.WriteLine("Opcion erronea");
                    break;

            }
            Console.ReadKey();
        }