ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Trbaajooo


Enviado por   •  23 de Octubre de 2017  •  Apuntes  •  19.349 Palabras (78 Páginas)  •  222 Visitas

Página 1 de 78

import java.sql.SQLException;

import java.util.Scanner;

public class Administrador {

        SqlProductos sql= new SqlProductos();

        SqlVenta sql1=new SqlVenta();

        SqlReserva sql2=new SqlReserva();

        SqlCaja sql3 = new SqlCaja();

        SqlClientes sql4=new SqlClientes();

        SqlRecepcion sql5 = new SqlRecepcion();

        public void ejecucion() throws SQLException {

                int respuesta = 0;

                String respuesta2="";

                

                Scanner esc = new Scanner(System.in);

                

                

                        

                do {

                        System.out.println("BIENVENIDO A LA BOUTIQUE");

                        System.out.println("------------------------");

                        System.out.println("MENU PRINCIPAL");

                        System.out.println();

                        System.out.println("1. Ver listado de productos'");

                        System.out.println("2. Consultar algun producto en especifico");

                        System.out.println("3. Realizar venta del producto");

                        System.out.println("4. Realizar Reserva del producto");

                        System.out.println("5. Cancelar Reserva de Producto");

                        System.out.println("6. Ver Todas las Reservas");

                        System.out.println("7. Verificar Estado de Caja");

                        System.out.println("8. Registrar Nuevo Cliente");

                        System.out.println("9. Realizar Recepcion de Producto");

                        

                        System.out.println("10. para salir");

                        

                        respuesta2=esc.next();

                        

                                if(isNumeric(respuesta2)){

                                        respuesta=Integer.parseInt(respuesta2);

                        switch(respuesta){

                        

                        case 2:

                                respuesta=0;                        

                                respuesta2="";

                                System.out.println("------------------------");

                                System.out.println("OPCION NUMERO 2 SELECCIONADA");

                                System.out.println("Ingrese el cod Producto");

                                

                                String res=esc.next();

                                

                                if(isNumeric(res)){

                                int ress=Integer.parseInt(res);

                                String[] vect=sql.PDatos(ress);

                                

                                 System.out.println("Nombre: "+vect[0]+" /Marca: "+vect[1]+" /Precio $: "+vect[2]+" /Cantidad: "+vect[3]);

                                }

                                else{

                                        System.out.println("Usted ingreso un cod incorrecto");

                        

                                }

                                System.out.println("------------------------");

                                break;

        case 1:

        respuesta=0;

        respuesta2="";

        System.out.println("------------------------");

        System.out.println("OPCION NUMERO 1 SELECCIONADA");

        sql.iniciar();

                                sql.Inventario();

                                System.out.println("------------------------");

break;

case 3:

        sql1.iniciar();

        System.out.println("------------------------");

        System.out.println("OPCION NUMERO 3 SELECCIONADA");

        System.out.println("Ingrese el cod venta");

        String  ve1=esc.next();

        System.out.println("Ingrese el codigo de cliente");

        

        String  ve2=esc.next();

        

        

        System.out.println("Ingrese el codigo del producto");

...

Descargar como (para miembros actualizados)  txt (35.9 Kb)   pdf (126.9 Kb)   docx (15.7 Kb)  
Leer 77 páginas más »
Disponible sólo en Clubensayos.com