diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..38f04f6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/HotelAdmin/dist \ No newline at end of file diff --git a/HotelAdmin/Facturas/Factura Num. 1.txt b/HotelAdmin/Facturas/Factura Num. 1.txt new file mode 100644 index 0000000..65ee3c6 --- /dev/null +++ b/HotelAdmin/Facturas/Factura Num. 1.txt @@ -0,0 +1,18 @@ +--------------ADMIN H S.A.S---------------- +Factura de hospedaje Numero: 1 +Fecha: 2020-05-21 05:06:19.163 +------------------------------------------- +C.C. empleado: 123 +C.C. cliente: 2 +Habitación: 203 +Fecha de ingreso: 2020-05-21 14:00:00.0 +Fecha de salida: 2020-05-29 12:00:00.0 + +------------------------------------------- +Servicios consumidos: +1. Habitacion DOBLE 8 días +Valor por día: 200000$ +Valor de estadía: 1600000$ +------------------------------------------- +Total a pagar: 1600000$ +Medio de pago: Debito diff --git a/HotelAdmin/Facturas/f.txt b/HotelAdmin/Facturas/f.txt new file mode 100644 index 0000000..ce01362 --- /dev/null +++ b/HotelAdmin/Facturas/f.txt @@ -0,0 +1 @@ +hello diff --git a/HotelAdmin/build/build.xml b/HotelAdmin/build/build.xml deleted file mode 100644 index 42c2684..0000000 --- a/HotelAdmin/build/build.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - Builds, tests, and runs the project HotelAdmin. - - - diff --git a/HotelAdmin/build/build/built-jar.properties b/HotelAdmin/build/build/built-jar.properties deleted file mode 100644 index 7edbfd1..0000000 --- a/HotelAdmin/build/build/built-jar.properties +++ /dev/null @@ -1,4 +0,0 @@ -#Fri, 27 Mar 2020 15:15:14 -0500 - - -C\:\\Users\\crist\\Documents\\NetBeansProjects\\Desarrolo\ backup\\MiRama\\Desarrollo\\HotelAdmin= diff --git a/HotelAdmin/build/build/classes/.netbeans_update_resources b/HotelAdmin/build/build/classes/.netbeans_update_resources deleted file mode 100644 index e69de29..0000000 diff --git a/HotelAdmin/build/build/classes/Controladores/Como hacer un crud b/HotelAdmin/build/build/classes/Controladores/Como hacer un crud deleted file mode 100644 index 695642c..0000000 --- a/HotelAdmin/build/build/classes/Controladores/Como hacer un crud +++ /dev/null @@ -1,28 +0,0 @@ -public class ControladorActor { - public static int grabarActor(Actor c) - { - ActorDAO actorDAO = new ActorDAO(); - int resultado = actorDAO.grabarActor(c); - return resultado; - } - public static ArrayList listadoActor(int id) - { - ArrayList listado; - listado = new ArrayList(); - ActorDAO actores = new ActorDAO(); - listado = actores.listadoActores(id); - return listado; - } - public static int borrarActor(int id) - { - ActorDAO actorDAO = new ActorDAO(); - int resultado = actorDAO.borrarActor(id); - return resultado; - } - public static int modificarActor(Actor c) - { - ActorDAO actorDAO = new ActorDAO(); - int resultado =actorDAO.modificarActor(c); - return resultado; - } -} diff --git a/HotelAdmin/build/build/classes/Imagenes/BotonSinSelect.png b/HotelAdmin/build/build/classes/Imagenes/BotonSinSelect.png deleted file mode 100644 index 856527d..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/BotonSinSelect.png and /dev/null differ diff --git "a/HotelAdmin/build/build/classes/Imagenes/Componente 1 \342\200\223 8.png" "b/HotelAdmin/build/build/classes/Imagenes/Componente 1 \342\200\223 8.png" deleted file mode 100644 index 0f377ad..0000000 Binary files "a/HotelAdmin/build/build/classes/Imagenes/Componente 1 \342\200\223 8.png" and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Fondo-login.png b/HotelAdmin/build/build/classes/Imagenes/Fondo-login.png deleted file mode 100644 index b098531..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Fondo-login.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Fondo-registro.png b/HotelAdmin/build/build/classes/Imagenes/Fondo-registro.png deleted file mode 100644 index 9e3f8a8..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Fondo-registro.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Iniciar-select.png b/HotelAdmin/build/build/classes/Imagenes/Iniciar-select.png deleted file mode 100644 index b04bf85..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Iniciar-select.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Iniciar-sinselect.png b/HotelAdmin/build/build/classes/Imagenes/Iniciar-sinselect.png deleted file mode 100644 index bff68f8..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Iniciar-sinselect.png and /dev/null differ diff --git "a/HotelAdmin/build/build/classes/Imagenes/IniciarSesi\303\263n-select.png" "b/HotelAdmin/build/build/classes/Imagenes/IniciarSesi\303\263n-select.png" deleted file mode 100644 index a25b511..0000000 Binary files "a/HotelAdmin/build/build/classes/Imagenes/IniciarSesi\303\263n-select.png" and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Input.png b/HotelAdmin/build/build/classes/Imagenes/Input.png deleted file mode 100644 index 4ee127c..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Input.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Logo.png b/HotelAdmin/build/build/classes/Imagenes/Logo.png deleted file mode 100644 index 21d08e1..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Logo.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Menu-Inicio.png b/HotelAdmin/build/build/classes/Imagenes/Menu-Inicio.png deleted file mode 100644 index 29461a5..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Menu-Inicio.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Menu-crud.png b/HotelAdmin/build/build/classes/Imagenes/Menu-crud.png deleted file mode 100644 index 7da6c1b..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Menu-crud.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Registrar-select.png b/HotelAdmin/build/build/classes/Imagenes/Registrar-select.png deleted file mode 100644 index 6e22081..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Registrar-select.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Registrar-sinselect.png b/HotelAdmin/build/build/classes/Imagenes/Registrar-sinselect.png deleted file mode 100644 index 56ec510..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Registrar-sinselect.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Registro-select.png b/HotelAdmin/build/build/classes/Imagenes/Registro-select.png deleted file mode 100644 index 5a1dd76..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Registro-select.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Seleccion-agregar.png b/HotelAdmin/build/build/classes/Imagenes/Seleccion-agregar.png deleted file mode 100644 index a2896e7..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Seleccion-agregar.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Seleccion-agregarGris.png b/HotelAdmin/build/build/classes/Imagenes/Seleccion-agregarGris.png deleted file mode 100644 index 2bb72bd..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Seleccion-agregarGris.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Seleccion-cli.png b/HotelAdmin/build/build/classes/Imagenes/Seleccion-cli.png deleted file mode 100644 index 13d2df6..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Seleccion-cli.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Seleccion-eliminarGris.png b/HotelAdmin/build/build/classes/Imagenes/Seleccion-eliminarGris.png deleted file mode 100644 index 8ec9e48..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Seleccion-eliminarGris.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Seleccion-empl_1.png b/HotelAdmin/build/build/classes/Imagenes/Seleccion-empl_1.png deleted file mode 100644 index b9cce24..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Seleccion-empl_1.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Seleccion-habi.png b/HotelAdmin/build/build/classes/Imagenes/Seleccion-habi.png deleted file mode 100644 index fe31aa4..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Seleccion-habi.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Seleccion-modificar.png b/HotelAdmin/build/build/classes/Imagenes/Seleccion-modificar.png deleted file mode 100644 index 55aa765..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Seleccion-modificar.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Seleccion-modificarGris.png b/HotelAdmin/build/build/classes/Imagenes/Seleccion-modificarGris.png deleted file mode 100644 index 7f964bb..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Seleccion-modificarGris.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/SinSeleccionar-emp.png b/HotelAdmin/build/build/classes/Imagenes/SinSeleccionar-emp.png deleted file mode 100644 index 0287ae8..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/SinSeleccionar-emp.png and /dev/null differ diff --git "a/HotelAdmin/build/build/classes/Imagenes/SinSelecci\303\263n-habi.png" "b/HotelAdmin/build/build/classes/Imagenes/SinSelecci\303\263n-habi.png" deleted file mode 100644 index 2b220fa..0000000 Binary files "a/HotelAdmin/build/build/classes/Imagenes/SinSelecci\303\263n-habi.png" and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Sinseleccion-cli.png b/HotelAdmin/build/build/classes/Imagenes/Sinseleccion-cli.png deleted file mode 100644 index ddc3f15..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/Sinseleccion-cli.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/botonSalida.png b/HotelAdmin/build/build/classes/Imagenes/botonSalida.png deleted file mode 100644 index 8225937..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/botonSalida.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/fondo-principal.png b/HotelAdmin/build/build/classes/Imagenes/fondo-principal.png deleted file mode 100644 index b726a31..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/fondo-principal.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/fondoBlanco.png b/HotelAdmin/build/build/classes/Imagenes/fondoBlanco.png deleted file mode 100644 index 6f85512..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/fondoBlanco.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/inputText.png b/HotelAdmin/build/build/classes/Imagenes/inputText.png deleted file mode 100644 index 1e17011..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/inputText.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/panel-azul.png b/HotelAdmin/build/build/classes/Imagenes/panel-azul.png deleted file mode 100644 index a1ff3ff..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/panel-azul.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Imagenes/seleccion-eliminar.png b/HotelAdmin/build/build/classes/Imagenes/seleccion-eliminar.png deleted file mode 100644 index 5bdd7c3..0000000 Binary files a/HotelAdmin/build/build/classes/Imagenes/seleccion-eliminar.png and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Modelo/Cliente.class b/HotelAdmin/build/build/classes/Modelo/Cliente.class deleted file mode 100644 index 0e7851d..0000000 Binary files a/HotelAdmin/build/build/classes/Modelo/Cliente.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Modelo/Empleado.class b/HotelAdmin/build/build/classes/Modelo/Empleado.class deleted file mode 100644 index d19990a..0000000 Binary files a/HotelAdmin/build/build/classes/Modelo/Empleado.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Modelo/Habitacion.class b/HotelAdmin/build/build/classes/Modelo/Habitacion.class deleted file mode 100644 index 864a379..0000000 Binary files a/HotelAdmin/build/build/classes/Modelo/Habitacion.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Modelo/Ingreso.class b/HotelAdmin/build/build/classes/Modelo/Ingreso.class deleted file mode 100644 index 6b23361..0000000 Binary files a/HotelAdmin/build/build/classes/Modelo/Ingreso.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Modelo/Pago.class b/HotelAdmin/build/build/classes/Modelo/Pago.class deleted file mode 100644 index 11e30c4..0000000 Binary files a/HotelAdmin/build/build/classes/Modelo/Pago.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Modelo/Persona.class b/HotelAdmin/build/build/classes/Modelo/Persona.class deleted file mode 100644 index d0fbd59..0000000 Binary files a/HotelAdmin/build/build/classes/Modelo/Persona.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Modelo/Reserva.class b/HotelAdmin/build/build/classes/Modelo/Reserva.class deleted file mode 100644 index 55c9fae..0000000 Binary files a/HotelAdmin/build/build/classes/Modelo/Reserva.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Servicios/hello b/HotelAdmin/build/build/classes/Servicios/hello deleted file mode 100644 index f2aa86d..0000000 --- a/HotelAdmin/build/build/classes/Servicios/hello +++ /dev/null @@ -1 +0,0 @@ -hello diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$1.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$1.class deleted file mode 100644 index 3902583..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$1.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$2.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$2.class deleted file mode 100644 index 6bff154..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$2.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$3.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$3.class deleted file mode 100644 index ef2a978..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$3.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$4.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$4.class deleted file mode 100644 index fdbc23c..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$4.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$5.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$5.class deleted file mode 100644 index a7dafb8..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$5.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$6.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$6.class deleted file mode 100644 index 2613999..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion$6.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion.class deleted file mode 100644 index 05b3d0b..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion.form b/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion.form deleted file mode 100644 index 39a48a3..0000000 --- a/HotelAdmin/build/build/classes/Vistas/Jframe/Habitacion.form +++ /dev/null @@ -1,309 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$1.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$1.class deleted file mode 100644 index 67f8e63..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$1.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$10.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$10.class deleted file mode 100644 index 207f770..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$10.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$11.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$11.class deleted file mode 100644 index 598b3ae..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$11.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$12.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$12.class deleted file mode 100644 index 04e98aa..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$12.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$13.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$13.class deleted file mode 100644 index 447b678..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$13.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$14.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$14.class deleted file mode 100644 index 8770c45..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$14.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$15.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$15.class deleted file mode 100644 index 30baba5..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$15.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$16.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$16.class deleted file mode 100644 index 8e60949..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$16.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$17.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$17.class deleted file mode 100644 index 66bf4bf..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$17.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$18.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$18.class deleted file mode 100644 index 83bcfff..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$18.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$19.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$19.class deleted file mode 100644 index 65ea985..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$19.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$2.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$2.class deleted file mode 100644 index ec84b02..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$2.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$20.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$20.class deleted file mode 100644 index 41562a6..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$20.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$21.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$21.class deleted file mode 100644 index 41892b5..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$21.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$22.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$22.class deleted file mode 100644 index 2494f4e..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$22.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$23.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$23.class deleted file mode 100644 index 476a5dd..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$23.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$24.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$24.class deleted file mode 100644 index 4a57a8a..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$24.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$25.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$25.class deleted file mode 100644 index 89e28bc..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$25.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$26.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$26.class deleted file mode 100644 index c98ab6e..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$26.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$3.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$3.class deleted file mode 100644 index 1799ebb..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$3.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$4.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$4.class deleted file mode 100644 index d362e71..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$4.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$5.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$5.class deleted file mode 100644 index e9abfd7..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$5.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$6.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$6.class deleted file mode 100644 index 2d11faa..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$6.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$7.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$7.class deleted file mode 100644 index 557865a..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$7.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$8.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$8.class deleted file mode 100644 index 599956a..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$8.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$9.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login$9.class deleted file mode 100644 index 973f6d4..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login$9.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login.class b/HotelAdmin/build/build/classes/Vistas/Jframe/Login.class deleted file mode 100644 index ee1c1a8..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jframe/Login.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/Login.form b/HotelAdmin/build/build/classes/Vistas/Jframe/Login.form deleted file mode 100644 index 829a567..0000000 --- a/HotelAdmin/build/build/classes/Vistas/Jframe/Login.form +++ /dev/null @@ -1,609 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/HotelAdmin/build/build/classes/Vistas/Jframe/hello b/HotelAdmin/build/build/classes/Vistas/Jframe/hello deleted file mode 100644 index f2aa86d..0000000 --- a/HotelAdmin/build/build/classes/Vistas/Jframe/hello +++ /dev/null @@ -1 +0,0 @@ -hello diff --git a/HotelAdmin/build/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI.class b/HotelAdmin/build/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI.class deleted file mode 100644 index aaaeae1..0000000 Binary files a/HotelAdmin/build/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI.class and /dev/null differ diff --git a/HotelAdmin/build/build/classes/Vistas/hello b/HotelAdmin/build/build/classes/Vistas/hello deleted file mode 100644 index f2aa86d..0000000 --- a/HotelAdmin/build/build/classes/Vistas/hello +++ /dev/null @@ -1 +0,0 @@ -hello diff --git a/HotelAdmin/build/build/classes/hoteladmin/HotelAdmin.class b/HotelAdmin/build/build/classes/hoteladmin/HotelAdmin.class deleted file mode 100644 index 01ce861..0000000 Binary files a/HotelAdmin/build/build/classes/hoteladmin/HotelAdmin.class and /dev/null differ diff --git a/HotelAdmin/build/built-jar.properties b/HotelAdmin/build/built-jar.properties index 7edbfd1..e5a6817 100644 --- a/HotelAdmin/build/built-jar.properties +++ b/HotelAdmin/build/built-jar.properties @@ -1,4 +1,4 @@ -#Fri, 27 Mar 2020 15:15:14 -0500 +#Fri, 22 May 2020 01:52:46 -0500 -C\:\\Users\\crist\\Documents\\NetBeansProjects\\Desarrolo\ backup\\MiRama\\Desarrollo\\HotelAdmin= +C\:\\Users\\vanes\\Desktop\\PROYECTO\ DESARROLLO\\Master\\Desarrollo\\HotelAdmin= diff --git a/HotelAdmin/build/classes/Controladores/ControladorCheckout.class b/HotelAdmin/build/classes/Controladores/ControladorCheckout.class new file mode 100644 index 0000000..dc4aefa Binary files /dev/null and b/HotelAdmin/build/classes/Controladores/ControladorCheckout.class differ diff --git a/HotelAdmin/build/classes/Controladores/ControladorCliente.class b/HotelAdmin/build/classes/Controladores/ControladorCliente.class new file mode 100644 index 0000000..c8baa72 Binary files /dev/null and b/HotelAdmin/build/classes/Controladores/ControladorCliente.class differ diff --git a/HotelAdmin/build/classes/Controladores/ControladorEmpleado.class b/HotelAdmin/build/classes/Controladores/ControladorEmpleado.class new file mode 100644 index 0000000..eb65fc5 Binary files /dev/null and b/HotelAdmin/build/classes/Controladores/ControladorEmpleado.class differ diff --git a/HotelAdmin/build/classes/Controladores/ControladorHospedaje.class b/HotelAdmin/build/classes/Controladores/ControladorHospedaje.class new file mode 100644 index 0000000..2412ede Binary files /dev/null and b/HotelAdmin/build/classes/Controladores/ControladorHospedaje.class differ diff --git a/HotelAdmin/build/classes/Controladores/ControladorServiciosAdicionado.class b/HotelAdmin/build/classes/Controladores/ControladorServiciosAdicionado.class new file mode 100644 index 0000000..e66124c Binary files /dev/null and b/HotelAdmin/build/classes/Controladores/ControladorServiciosAdicionado.class differ diff --git a/HotelAdmin/build/classes/Controladores/ControllerHabitacion$HabitacionListener.class b/HotelAdmin/build/classes/Controladores/ControllerHabitacion$HabitacionListener.class new file mode 100644 index 0000000..5ba5783 Binary files /dev/null and b/HotelAdmin/build/classes/Controladores/ControllerHabitacion$HabitacionListener.class differ diff --git a/HotelAdmin/build/classes/Controladores/ControllerHabitacion.class b/HotelAdmin/build/classes/Controladores/ControllerHabitacion.class new file mode 100644 index 0000000..bda9efb Binary files /dev/null and b/HotelAdmin/build/classes/Controladores/ControllerHabitacion.class differ diff --git a/HotelAdmin/build/classes/Controladores/ControllerReserva.class b/HotelAdmin/build/classes/Controladores/ControllerReserva.class new file mode 100644 index 0000000..ef11e46 Binary files /dev/null and b/HotelAdmin/build/classes/Controladores/ControllerReserva.class differ diff --git a/HotelAdmin/build/classes/Controladores/ControllerServicios.class b/HotelAdmin/build/classes/Controladores/ControllerServicios.class new file mode 100644 index 0000000..5ea3f41 Binary files /dev/null and b/HotelAdmin/build/classes/Controladores/ControllerServicios.class differ diff --git a/HotelAdmin/build/classes/Controladores/HospedajeControllador.class b/HotelAdmin/build/classes/Controladores/HospedajeControllador.class new file mode 100644 index 0000000..3dd4ab4 Binary files /dev/null and b/HotelAdmin/build/classes/Controladores/HospedajeControllador.class differ diff --git a/HotelAdmin/build/classes/Controladores/LoginControlador.class b/HotelAdmin/build/classes/Controladores/LoginControlador.class new file mode 100644 index 0000000..ed6050c Binary files /dev/null and b/HotelAdmin/build/classes/Controladores/LoginControlador.class differ diff --git a/HotelAdmin/build/classes/Imagenes/BotonAgregarSele.png b/HotelAdmin/build/classes/Imagenes/BotonAgregarSele.png new file mode 100644 index 0000000..a229c4c Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/BotonAgregarSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/BotonAgregarSinSele.png b/HotelAdmin/build/classes/Imagenes/BotonAgregarSinSele.png new file mode 100644 index 0000000..061e776 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/BotonAgregarSinSele.png differ diff --git "a/HotelAdmin/build/classes/Imagenes/BotonA\303\261adir.png" "b/HotelAdmin/build/classes/Imagenes/BotonA\303\261adir.png" new file mode 100644 index 0000000..065409f Binary files /dev/null and "b/HotelAdmin/build/classes/Imagenes/BotonA\303\261adir.png" differ diff --git a/HotelAdmin/build/classes/Imagenes/BotonEliminarSele.png b/HotelAdmin/build/classes/Imagenes/BotonEliminarSele.png new file mode 100644 index 0000000..5f5bb88 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/BotonEliminarSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/BotonEliminarSinSele.png b/HotelAdmin/build/classes/Imagenes/BotonEliminarSinSele.png new file mode 100644 index 0000000..45e2f4f Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/BotonEliminarSinSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/BotonModificarSele.png b/HotelAdmin/build/classes/Imagenes/BotonModificarSele.png new file mode 100644 index 0000000..0b98ecd Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/BotonModificarSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/BotonModificarSinSele.png b/HotelAdmin/build/classes/Imagenes/BotonModificarSinSele.png new file mode 100644 index 0000000..fa4fe03 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/BotonModificarSinSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/BotonRegistradosSele.png b/HotelAdmin/build/classes/Imagenes/BotonRegistradosSele.png new file mode 100644 index 0000000..a482d01 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/BotonRegistradosSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/BotonRegistradosSinSele.png b/HotelAdmin/build/classes/Imagenes/BotonRegistradosSinSele.png new file mode 100644 index 0000000..95dad76 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/BotonRegistradosSinSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/Check-in-seleccionado.png b/HotelAdmin/build/classes/Imagenes/Check-in-seleccionado.png new file mode 100644 index 0000000..7d705e6 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/Check-in-seleccionado.png differ diff --git a/HotelAdmin/build/classes/Imagenes/Check-inBoton.png b/HotelAdmin/build/classes/Imagenes/Check-inBoton.png new file mode 100644 index 0000000..04e5404 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/Check-inBoton.png differ diff --git a/HotelAdmin/build/classes/Imagenes/CheckInBoton.png b/HotelAdmin/build/classes/Imagenes/CheckInBoton.png new file mode 100644 index 0000000..371b708 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/CheckInBoton.png differ diff --git a/HotelAdmin/build/classes/Imagenes/CheckInBotonSele.png b/HotelAdmin/build/classes/Imagenes/CheckInBotonSele.png new file mode 100644 index 0000000..f4a8d30 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/CheckInBotonSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/CheckInSinReserva.png b/HotelAdmin/build/classes/Imagenes/CheckInSinReserva.png new file mode 100644 index 0000000..d2ab55d Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/CheckInSinReserva.png differ diff --git a/HotelAdmin/build/classes/Imagenes/CheckoutBoton.png b/HotelAdmin/build/classes/Imagenes/CheckoutBoton.png new file mode 100644 index 0000000..a483470 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/CheckoutBoton.png differ diff --git a/HotelAdmin/build/classes/Imagenes/CheckoutBotonSele.png b/HotelAdmin/build/classes/Imagenes/CheckoutBotonSele.png new file mode 100644 index 0000000..abc4ba5 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/CheckoutBotonSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/CliSele.png b/HotelAdmin/build/classes/Imagenes/CliSele.png new file mode 100644 index 0000000..f5c649b Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/CliSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/CliSinSele.png b/HotelAdmin/build/classes/Imagenes/CliSinSele.png new file mode 100644 index 0000000..d8121ae Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/CliSinSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/ClienteBoton.png b/HotelAdmin/build/classes/Imagenes/ClienteBoton.png new file mode 100644 index 0000000..a77c7df Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/ClienteBoton.png differ diff --git a/HotelAdmin/build/classes/Imagenes/ClienteBotonSele.png b/HotelAdmin/build/classes/Imagenes/ClienteBotonSele.png new file mode 100644 index 0000000..96d8496 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/ClienteBotonSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/ContornoHabitacion.png b/HotelAdmin/build/classes/Imagenes/ContornoHabitacion.png new file mode 100644 index 0000000..9d654ff Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/ContornoHabitacion.png differ diff --git a/HotelAdmin/build/classes/Imagenes/EmpleadosBotonSele.png b/HotelAdmin/build/classes/Imagenes/EmpleadosBotonSele.png new file mode 100644 index 0000000..20a7be1 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/EmpleadosBotonSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/EmpleadosBotonSinSele.png b/HotelAdmin/build/classes/Imagenes/EmpleadosBotonSinSele.png new file mode 100644 index 0000000..7260a22 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/EmpleadosBotonSinSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/Factura.png b/HotelAdmin/build/classes/Imagenes/Factura.png new file mode 100644 index 0000000..824501c Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/Factura.png differ diff --git a/HotelAdmin/build/classes/Imagenes/Guardar-SinSele.png b/HotelAdmin/build/classes/Imagenes/Guardar-SinSele.png new file mode 100644 index 0000000..78775ab Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/Guardar-SinSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/GuardarSele.png b/HotelAdmin/build/classes/Imagenes/GuardarSele.png new file mode 100644 index 0000000..c41a7ee Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/GuardarSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/HabitacionBotonSele.png b/HotelAdmin/build/classes/Imagenes/HabitacionBotonSele.png new file mode 100644 index 0000000..91d140b Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/HabitacionBotonSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/HabitacionBotonSinSele.png b/HotelAdmin/build/classes/Imagenes/HabitacionBotonSinSele.png new file mode 100644 index 0000000..634946a Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/HabitacionBotonSinSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/HabitacionChe.png b/HotelAdmin/build/classes/Imagenes/HabitacionChe.png new file mode 100644 index 0000000..135bef7 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/HabitacionChe.png differ diff --git a/HotelAdmin/build/classes/Imagenes/HabitacionSeleccion.png b/HotelAdmin/build/classes/Imagenes/HabitacionSeleccion.png new file mode 100644 index 0000000..14209c0 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/HabitacionSeleccion.png differ diff --git a/HotelAdmin/build/build/classes/Imagenes/L3.png b/HotelAdmin/build/classes/Imagenes/L3.png similarity index 100% rename from HotelAdmin/build/build/classes/Imagenes/L3.png rename to HotelAdmin/build/classes/Imagenes/L3.png diff --git a/HotelAdmin/build/classes/Imagenes/ListaReserva.png b/HotelAdmin/build/classes/Imagenes/ListaReserva.png new file mode 100644 index 0000000..1997c46 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/ListaReserva.png differ diff --git a/HotelAdmin/build/classes/Imagenes/ListaReservaSele.png b/HotelAdmin/build/classes/Imagenes/ListaReservaSele.png new file mode 100644 index 0000000..9973d6e Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/ListaReservaSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/ListaServicios2.png b/HotelAdmin/build/classes/Imagenes/ListaServicios2.png new file mode 100644 index 0000000..058678c Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/ListaServicios2.png differ diff --git a/HotelAdmin/build/classes/Imagenes/ListaServiciosAgregar.png b/HotelAdmin/build/classes/Imagenes/ListaServiciosAgregar.png new file mode 100644 index 0000000..d4505ad Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/ListaServiciosAgregar.png differ diff --git a/HotelAdmin/build/build/classes/Imagenes/Logocm.png b/HotelAdmin/build/classes/Imagenes/Logocm.png similarity index 100% rename from HotelAdmin/build/build/classes/Imagenes/Logocm.png rename to HotelAdmin/build/classes/Imagenes/Logocm.png diff --git a/HotelAdmin/build/classes/Imagenes/Marco.png b/HotelAdmin/build/classes/Imagenes/Marco.png new file mode 100644 index 0000000..6b88aec Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/Marco.png differ diff --git a/HotelAdmin/build/classes/Imagenes/MarcoCheckin.png b/HotelAdmin/build/classes/Imagenes/MarcoCheckin.png new file mode 100644 index 0000000..1a8ab84 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/MarcoCheckin.png differ diff --git a/HotelAdmin/build/classes/Imagenes/MarcoListaCli.png b/HotelAdmin/build/classes/Imagenes/MarcoListaCli.png new file mode 100644 index 0000000..cfd3be2 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/MarcoListaCli.png differ diff --git a/HotelAdmin/build/classes/Imagenes/MarcoListaHospe.png b/HotelAdmin/build/classes/Imagenes/MarcoListaHospe.png new file mode 100644 index 0000000..b580e38 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/MarcoListaHospe.png differ diff --git a/HotelAdmin/build/classes/Imagenes/MarcoReserva.png b/HotelAdmin/build/classes/Imagenes/MarcoReserva.png new file mode 100644 index 0000000..63aaeaf Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/MarcoReserva.png differ diff --git a/HotelAdmin/build/classes/Imagenes/MarcoServicio.png b/HotelAdmin/build/classes/Imagenes/MarcoServicio.png new file mode 100644 index 0000000..b3dae67 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/MarcoServicio.png differ diff --git a/HotelAdmin/build/classes/Imagenes/MarcoServicioAgregar.png b/HotelAdmin/build/classes/Imagenes/MarcoServicioAgregar.png new file mode 100644 index 0000000..1d7e996 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/MarcoServicioAgregar.png differ diff --git a/HotelAdmin/build/classes/Imagenes/MostrarReserva.png b/HotelAdmin/build/classes/Imagenes/MostrarReserva.png new file mode 100644 index 0000000..9b345b6 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/MostrarReserva.png differ diff --git a/HotelAdmin/build/classes/Imagenes/RealizarReserva.png b/HotelAdmin/build/classes/Imagenes/RealizarReserva.png new file mode 100644 index 0000000..500d38a Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/RealizarReserva.png differ diff --git a/HotelAdmin/build/classes/Imagenes/RealizarReservaSele.png b/HotelAdmin/build/classes/Imagenes/RealizarReservaSele.png new file mode 100644 index 0000000..888f341 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/RealizarReservaSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/ReservSele.png b/HotelAdmin/build/classes/Imagenes/ReservSele.png new file mode 100644 index 0000000..199b9bd Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/ReservSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/ReservSinSele.png b/HotelAdmin/build/classes/Imagenes/ReservSinSele.png new file mode 100644 index 0000000..ec03fff Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/ReservSinSele.png differ diff --git "a/HotelAdmin/build/classes/Imagenes/ReservaPrevia-Selecci\303\263n.png" "b/HotelAdmin/build/classes/Imagenes/ReservaPrevia-Selecci\303\263n.png" new file mode 100644 index 0000000..6388bbc Binary files /dev/null and "b/HotelAdmin/build/classes/Imagenes/ReservaPrevia-Selecci\303\263n.png" differ diff --git a/HotelAdmin/build/classes/Imagenes/ReservaPrevia.png b/HotelAdmin/build/classes/Imagenes/ReservaPrevia.png new file mode 100644 index 0000000..5f6fcc1 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/ReservaPrevia.png differ diff --git a/HotelAdmin/build/classes/Imagenes/SinReserva.png b/HotelAdmin/build/classes/Imagenes/SinReserva.png new file mode 100644 index 0000000..8290df0 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/SinReserva.png differ diff --git a/HotelAdmin/build/classes/Imagenes/SinReservaSelec.png b/HotelAdmin/build/classes/Imagenes/SinReservaSelec.png new file mode 100644 index 0000000..d4f268e Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/SinReservaSelec.png differ diff --git a/HotelAdmin/build/classes/Imagenes/botonAregarServicio.png b/HotelAdmin/build/classes/Imagenes/botonAregarServicio.png new file mode 100644 index 0000000..b47ec13 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/botonAregarServicio.png differ diff --git a/HotelAdmin/build/classes/Imagenes/botonAregarServicioSinSele.png b/HotelAdmin/build/classes/Imagenes/botonAregarServicioSinSele.png new file mode 100644 index 0000000..d468e2e Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/botonAregarServicioSinSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/botonCheckOutSele.png b/HotelAdmin/build/classes/Imagenes/botonCheckOutSele.png new file mode 100644 index 0000000..cf9fc9c Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/botonCheckOutSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/botonCheckOutSinSele.png b/HotelAdmin/build/classes/Imagenes/botonCheckOutSinSele.png new file mode 100644 index 0000000..2bfa01f Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/botonCheckOutSinSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/botonHospedajesSele.png b/HotelAdmin/build/classes/Imagenes/botonHospedajesSele.png new file mode 100644 index 0000000..a95f2b9 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/botonHospedajesSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/botonHospedajesSinSele.png b/HotelAdmin/build/classes/Imagenes/botonHospedajesSinSele.png new file mode 100644 index 0000000..7f6c4f6 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/botonHospedajesSinSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/botonRegistrarSalidaSele.png b/HotelAdmin/build/classes/Imagenes/botonRegistrarSalidaSele.png new file mode 100644 index 0000000..0f7bb9a Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/botonRegistrarSalidaSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/botonRegistrarSalidaSinSele.png b/HotelAdmin/build/classes/Imagenes/botonRegistrarSalidaSinSele.png new file mode 100644 index 0000000..a593daf Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/botonRegistrarSalidaSinSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/botonRegistrarSele.png b/HotelAdmin/build/classes/Imagenes/botonRegistrarSele.png new file mode 100644 index 0000000..198b025 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/botonRegistrarSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/botonRegistrarSinsele.png b/HotelAdmin/build/classes/Imagenes/botonRegistrarSinsele.png new file mode 100644 index 0000000..9a9963b Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/botonRegistrarSinsele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/botonSalida.png b/HotelAdmin/build/classes/Imagenes/botonSalida.png index 8225937..557a772 100644 Binary files a/HotelAdmin/build/classes/Imagenes/botonSalida.png and b/HotelAdmin/build/classes/Imagenes/botonSalida.png differ diff --git a/HotelAdmin/build/build/classes/Imagenes/btnIN.png b/HotelAdmin/build/classes/Imagenes/btnIN.png similarity index 100% rename from HotelAdmin/build/build/classes/Imagenes/btnIN.png rename to HotelAdmin/build/classes/Imagenes/btnIN.png diff --git a/HotelAdmin/build/classes/Imagenes/buscar-azul.png b/HotelAdmin/build/classes/Imagenes/buscar-azul.png new file mode 100644 index 0000000..3de9173 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/buscar-azul.png differ diff --git a/HotelAdmin/build/classes/Imagenes/hospedajeSele.png b/HotelAdmin/build/classes/Imagenes/hospedajeSele.png new file mode 100644 index 0000000..443300e Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/hospedajeSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/hospedajeSinSele.png b/HotelAdmin/build/classes/Imagenes/hospedajeSinSele.png new file mode 100644 index 0000000..b131f94 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/hospedajeSinSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/iconEditar.png b/HotelAdmin/build/classes/Imagenes/iconEditar.png new file mode 100644 index 0000000..7d998e7 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/iconEditar.png differ diff --git a/HotelAdmin/build/classes/Imagenes/iconEliminar.png b/HotelAdmin/build/classes/Imagenes/iconEliminar.png new file mode 100644 index 0000000..6393bd3 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/iconEliminar.png differ diff --git a/HotelAdmin/build/classes/Imagenes/jPnumeroH.png b/HotelAdmin/build/classes/Imagenes/jPnumeroH.png new file mode 100644 index 0000000..63b3001 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/jPnumeroH.png differ diff --git a/HotelAdmin/build/build/classes/Imagenes/logo1.png b/HotelAdmin/build/classes/Imagenes/logo1.png similarity index 100% rename from HotelAdmin/build/build/classes/Imagenes/logo1.png rename to HotelAdmin/build/classes/Imagenes/logo1.png diff --git a/HotelAdmin/build/build/classes/Imagenes/logopq.png b/HotelAdmin/build/classes/Imagenes/logopq.png similarity index 100% rename from HotelAdmin/build/build/classes/Imagenes/logopq.png rename to HotelAdmin/build/classes/Imagenes/logopq.png diff --git a/HotelAdmin/build/classes/Imagenes/marcoEmpleado.png b/HotelAdmin/build/classes/Imagenes/marcoEmpleado.png new file mode 100644 index 0000000..1d84654 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/marcoEmpleado.png differ diff --git a/HotelAdmin/build/classes/Imagenes/marcoServiciosLista.png b/HotelAdmin/build/classes/Imagenes/marcoServiciosLista.png new file mode 100644 index 0000000..2b445ed Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/marcoServiciosLista.png differ diff --git a/HotelAdmin/build/classes/Imagenes/reservarBoton.png b/HotelAdmin/build/classes/Imagenes/reservarBoton.png new file mode 100644 index 0000000..1430bf8 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/reservarBoton.png differ diff --git a/HotelAdmin/build/classes/Imagenes/reservarBotonSele.png b/HotelAdmin/build/classes/Imagenes/reservarBotonSele.png new file mode 100644 index 0000000..570d2e7 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/reservarBotonSele.png differ diff --git a/HotelAdmin/build/classes/Imagenes/serviciosBoton.png b/HotelAdmin/build/classes/Imagenes/serviciosBoton.png new file mode 100644 index 0000000..08dd2f6 Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/serviciosBoton.png differ diff --git a/HotelAdmin/build/classes/Imagenes/serviciosBotonSele.png b/HotelAdmin/build/classes/Imagenes/serviciosBotonSele.png new file mode 100644 index 0000000..6de233a Binary files /dev/null and b/HotelAdmin/build/classes/Imagenes/serviciosBotonSele.png differ diff --git a/HotelAdmin/build/classes/MiShDwnHook.class b/HotelAdmin/build/classes/MiShDwnHook.class new file mode 100644 index 0000000..f47839d Binary files /dev/null and b/HotelAdmin/build/classes/MiShDwnHook.class differ diff --git a/HotelAdmin/build/classes/Modelo/Checkout.class b/HotelAdmin/build/classes/Modelo/Checkout.class new file mode 100644 index 0000000..9cdb668 Binary files /dev/null and b/HotelAdmin/build/classes/Modelo/Checkout.class differ diff --git a/HotelAdmin/build/classes/Modelo/CheckoutDAO.class b/HotelAdmin/build/classes/Modelo/CheckoutDAO.class new file mode 100644 index 0000000..c0aabfc Binary files /dev/null and b/HotelAdmin/build/classes/Modelo/CheckoutDAO.class differ diff --git a/HotelAdmin/build/classes/Modelo/ClientDAO.class b/HotelAdmin/build/classes/Modelo/ClientDAO.class new file mode 100644 index 0000000..f094bfd Binary files /dev/null and b/HotelAdmin/build/classes/Modelo/ClientDAO.class differ diff --git a/HotelAdmin/build/classes/Modelo/Cliente.class b/HotelAdmin/build/classes/Modelo/Cliente.class index 0e7851d..288b409 100644 Binary files a/HotelAdmin/build/classes/Modelo/Cliente.class and b/HotelAdmin/build/classes/Modelo/Cliente.class differ diff --git a/HotelAdmin/build/classes/Modelo/Empleado.class b/HotelAdmin/build/classes/Modelo/Empleado.class index d19990a..a9ced80 100644 Binary files a/HotelAdmin/build/classes/Modelo/Empleado.class and b/HotelAdmin/build/classes/Modelo/Empleado.class differ diff --git a/HotelAdmin/build/classes/Modelo/EmpleadoDAO.class b/HotelAdmin/build/classes/Modelo/EmpleadoDAO.class new file mode 100644 index 0000000..eefff44 Binary files /dev/null and b/HotelAdmin/build/classes/Modelo/EmpleadoDAO.class differ diff --git a/HotelAdmin/build/classes/Modelo/Habitacion.class b/HotelAdmin/build/classes/Modelo/Habitacion.class index 864a379..5848b7a 100644 Binary files a/HotelAdmin/build/classes/Modelo/Habitacion.class and b/HotelAdmin/build/classes/Modelo/Habitacion.class differ diff --git a/HotelAdmin/build/classes/Modelo/HabitacionDAO.class b/HotelAdmin/build/classes/Modelo/HabitacionDAO.class new file mode 100644 index 0000000..5954f77 Binary files /dev/null and b/HotelAdmin/build/classes/Modelo/HabitacionDAO.class differ diff --git a/HotelAdmin/build/classes/Modelo/HabitacionesDAO.class b/HotelAdmin/build/classes/Modelo/HabitacionesDAO.class new file mode 100644 index 0000000..60ef486 Binary files /dev/null and b/HotelAdmin/build/classes/Modelo/HabitacionesDAO.class differ diff --git a/HotelAdmin/build/classes/Modelo/Hospedaje.class b/HotelAdmin/build/classes/Modelo/Hospedaje.class new file mode 100644 index 0000000..2e60043 Binary files /dev/null and b/HotelAdmin/build/classes/Modelo/Hospedaje.class differ diff --git a/HotelAdmin/build/classes/Modelo/HospedajeDAO.class b/HotelAdmin/build/classes/Modelo/HospedajeDAO.class new file mode 100644 index 0000000..c35b4db Binary files /dev/null and b/HotelAdmin/build/classes/Modelo/HospedajeDAO.class differ diff --git a/HotelAdmin/build/classes/Modelo/LoginDAO.class b/HotelAdmin/build/classes/Modelo/LoginDAO.class new file mode 100644 index 0000000..294cc42 Binary files /dev/null and b/HotelAdmin/build/classes/Modelo/LoginDAO.class differ diff --git a/HotelAdmin/build/classes/Modelo/LoginModelo.class b/HotelAdmin/build/classes/Modelo/LoginModelo.class new file mode 100644 index 0000000..ca0bd03 Binary files /dev/null and b/HotelAdmin/build/classes/Modelo/LoginModelo.class differ diff --git a/HotelAdmin/build/classes/Modelo/Persona.class b/HotelAdmin/build/classes/Modelo/Persona.class index d0fbd59..57dd852 100644 Binary files a/HotelAdmin/build/classes/Modelo/Persona.class and b/HotelAdmin/build/classes/Modelo/Persona.class differ diff --git a/HotelAdmin/build/classes/Modelo/Reserva.class b/HotelAdmin/build/classes/Modelo/Reserva.class index 55c9fae..1bd47f6 100644 Binary files a/HotelAdmin/build/classes/Modelo/Reserva.class and b/HotelAdmin/build/classes/Modelo/Reserva.class differ diff --git a/HotelAdmin/build/classes/Modelo/ReservaDAO.class b/HotelAdmin/build/classes/Modelo/ReservaDAO.class new file mode 100644 index 0000000..02777d0 Binary files /dev/null and b/HotelAdmin/build/classes/Modelo/ReservaDAO.class differ diff --git a/HotelAdmin/build/classes/Modelo/RoomServices.class b/HotelAdmin/build/classes/Modelo/RoomServices.class new file mode 100644 index 0000000..e83b769 Binary files /dev/null and b/HotelAdmin/build/classes/Modelo/RoomServices.class differ diff --git a/HotelAdmin/build/classes/Modelo/RoomServicesDAO.class b/HotelAdmin/build/classes/Modelo/RoomServicesDAO.class new file mode 100644 index 0000000..8efb0a0 Binary files /dev/null and b/HotelAdmin/build/classes/Modelo/RoomServicesDAO.class differ diff --git a/HotelAdmin/build/classes/Modelo/ServiciosAdicionado.class b/HotelAdmin/build/classes/Modelo/ServiciosAdicionado.class new file mode 100644 index 0000000..7574fae Binary files /dev/null and b/HotelAdmin/build/classes/Modelo/ServiciosAdicionado.class differ diff --git a/HotelAdmin/build/classes/Modelo/ServiciosAdicionadoDAO.class b/HotelAdmin/build/classes/Modelo/ServiciosAdicionadoDAO.class new file mode 100644 index 0000000..67aebf3 Binary files /dev/null and b/HotelAdmin/build/classes/Modelo/ServiciosAdicionadoDAO.class differ diff --git a/HotelAdmin/build/dist/lib/AbsoluteLayout.jar b/HotelAdmin/build/classes/Servicios/AbsoluteLayout.jar similarity index 100% rename from HotelAdmin/build/dist/lib/AbsoluteLayout.jar rename to HotelAdmin/build/classes/Servicios/AbsoluteLayout.jar diff --git a/HotelAdmin/build/classes/Servicios/Fachada$MiShDwnHook.class b/HotelAdmin/build/classes/Servicios/Fachada$MiShDwnHook.class new file mode 100644 index 0000000..702e9da Binary files /dev/null and b/HotelAdmin/build/classes/Servicios/Fachada$MiShDwnHook.class differ diff --git a/HotelAdmin/build/classes/Servicios/Fachada.class b/HotelAdmin/build/classes/Servicios/Fachada.class new file mode 100644 index 0000000..06f379b Binary files /dev/null and b/HotelAdmin/build/classes/Servicios/Fachada.class differ diff --git a/HotelAdmin/build/classes/Servicios/Fecha.class b/HotelAdmin/build/classes/Servicios/Fecha.class new file mode 100644 index 0000000..27eae41 Binary files /dev/null and b/HotelAdmin/build/classes/Servicios/Fecha.class differ diff --git a/HotelAdmin/build/classes/Servicios/JFopciones$1.class b/HotelAdmin/build/classes/Servicios/JFopciones$1.class new file mode 100644 index 0000000..dd33a43 Binary files /dev/null and b/HotelAdmin/build/classes/Servicios/JFopciones$1.class differ diff --git a/HotelAdmin/build/classes/Servicios/JFopciones$2.class b/HotelAdmin/build/classes/Servicios/JFopciones$2.class new file mode 100644 index 0000000..c1ec9b8 Binary files /dev/null and b/HotelAdmin/build/classes/Servicios/JFopciones$2.class differ diff --git a/HotelAdmin/build/classes/Servicios/JFopciones$3.class b/HotelAdmin/build/classes/Servicios/JFopciones$3.class new file mode 100644 index 0000000..e10723e Binary files /dev/null and b/HotelAdmin/build/classes/Servicios/JFopciones$3.class differ diff --git a/HotelAdmin/build/classes/Servicios/JFopciones$4.class b/HotelAdmin/build/classes/Servicios/JFopciones$4.class new file mode 100644 index 0000000..469aac4 Binary files /dev/null and b/HotelAdmin/build/classes/Servicios/JFopciones$4.class differ diff --git a/HotelAdmin/build/classes/Servicios/JFopciones.class b/HotelAdmin/build/classes/Servicios/JFopciones.class new file mode 100644 index 0000000..8627ee6 Binary files /dev/null and b/HotelAdmin/build/classes/Servicios/JFopciones.class differ diff --git a/HotelAdmin/build/classes/Servicios/JFopciones.form b/HotelAdmin/build/classes/Servicios/JFopciones.form new file mode 100644 index 0000000..cf84b52 --- /dev/null +++ b/HotelAdmin/build/classes/Servicios/JFopciones.form @@ -0,0 +1,207 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Servicios/jcalendar-1.4.jar b/HotelAdmin/build/classes/Servicios/jcalendar-1.4.jar new file mode 100644 index 0000000..617a335 Binary files /dev/null and b/HotelAdmin/build/classes/Servicios/jcalendar-1.4.jar differ diff --git a/HotelAdmin/build/classes/Servicios/jdbc.properties b/HotelAdmin/build/classes/Servicios/jdbc.properties new file mode 100644 index 0000000..574eb17 --- /dev/null +++ b/HotelAdmin/build/classes/Servicios/jdbc.properties @@ -0,0 +1,8 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +usr = postgres +pwd = 1234 +driver = org.postgresql.Driver +url = jdbc:postgresql://localhost:5432/adminh \ No newline at end of file diff --git a/HotelAdmin/build/classes/Vistas/Jframe/CheckIn$1.class b/HotelAdmin/build/classes/Vistas/Jframe/CheckIn$1.class new file mode 100644 index 0000000..b64f3dc Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/CheckIn$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/CheckIn$2.class b/HotelAdmin/build/classes/Vistas/Jframe/CheckIn$2.class new file mode 100644 index 0000000..fbd4103 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/CheckIn$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/CheckIn$3.class b/HotelAdmin/build/classes/Vistas/Jframe/CheckIn$3.class new file mode 100644 index 0000000..97e54b4 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/CheckIn$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/CheckIn.class b/HotelAdmin/build/classes/Vistas/Jframe/CheckIn.class new file mode 100644 index 0000000..8dca10a Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/CheckIn.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/CheckIn.form b/HotelAdmin/build/classes/Vistas/Jframe/CheckIn.form new file mode 100644 index 0000000..b180ca7 --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jframe/CheckIn.form @@ -0,0 +1,133 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jframe/CheckOut.class b/HotelAdmin/build/classes/Vistas/Jframe/CheckOut.class new file mode 100644 index 0000000..fcdc202 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/CheckOut.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/CheckOut.form b/HotelAdmin/build/classes/Vistas/Jframe/CheckOut.form new file mode 100644 index 0000000..ce52b2e --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jframe/CheckOut.form @@ -0,0 +1,80 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jframe/ClienteRecepcionista$1.class b/HotelAdmin/build/classes/Vistas/Jframe/ClienteRecepcionista$1.class new file mode 100644 index 0000000..07087d4 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/ClienteRecepcionista$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/ClienteRecepcionista$2.class b/HotelAdmin/build/classes/Vistas/Jframe/ClienteRecepcionista$2.class new file mode 100644 index 0000000..92abe50 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/ClienteRecepcionista$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/ClienteRecepcionista.class b/HotelAdmin/build/classes/Vistas/Jframe/ClienteRecepcionista.class new file mode 100644 index 0000000..125a799 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/ClienteRecepcionista.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/ClienteRecepcionista.form b/HotelAdmin/build/classes/Vistas/Jframe/ClienteRecepcionista.form new file mode 100644 index 0000000..a6af58f --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jframe/ClienteRecepcionista.form @@ -0,0 +1,109 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Clientes$1.class b/HotelAdmin/build/classes/Vistas/Jframe/Clientes$1.class index f91ba9d..590f060 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Clientes$1.class and b/HotelAdmin/build/classes/Vistas/Jframe/Clientes$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Clientes$2.class b/HotelAdmin/build/classes/Vistas/Jframe/Clientes$2.class index c4ecc72..5a7ae2e 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Clientes$2.class and b/HotelAdmin/build/classes/Vistas/Jframe/Clientes$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Clientes$3.class b/HotelAdmin/build/classes/Vistas/Jframe/Clientes$3.class deleted file mode 100644 index 524860a..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Clientes$3.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Clientes.class b/HotelAdmin/build/classes/Vistas/Jframe/Clientes.class index 94e72cb..7eed576 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Clientes.class and b/HotelAdmin/build/classes/Vistas/Jframe/Clientes.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Clientes.form b/HotelAdmin/build/classes/Vistas/Jframe/Clientes.form index 548dcea..7b9b0b8 100644 --- a/HotelAdmin/build/classes/Vistas/Jframe/Clientes.form +++ b/HotelAdmin/build/classes/Vistas/Jframe/Clientes.form @@ -2,7 +2,9 @@
- + + + @@ -14,7 +16,7 @@ - + @@ -24,7 +26,7 @@ - + @@ -35,7 +37,7 @@ - + @@ -43,40 +45,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -87,7 +63,7 @@ - + @@ -95,33 +71,39 @@ - + - + - - + + - + - - + + + + - + + + + + + + - + - - - + diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Empleados$1.class b/HotelAdmin/build/classes/Vistas/Jframe/Empleados$1.class index c5da834..9679137 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Empleados$1.class and b/HotelAdmin/build/classes/Vistas/Jframe/Empleados$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Empleados$2.class b/HotelAdmin/build/classes/Vistas/Jframe/Empleados$2.class index 4b60263..2b88189 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Empleados$2.class and b/HotelAdmin/build/classes/Vistas/Jframe/Empleados$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Empleados$3.class b/HotelAdmin/build/classes/Vistas/Jframe/Empleados$3.class deleted file mode 100644 index 890f787..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Empleados$3.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Empleados.class b/HotelAdmin/build/classes/Vistas/Jframe/Empleados.class index 34839f5..6777f32 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Empleados.class and b/HotelAdmin/build/classes/Vistas/Jframe/Empleados.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Empleados.form b/HotelAdmin/build/classes/Vistas/Jframe/Empleados.form index 548dcea..9f188ac 100644 --- a/HotelAdmin/build/classes/Vistas/Jframe/Empleados.form +++ b/HotelAdmin/build/classes/Vistas/Jframe/Empleados.form @@ -2,7 +2,9 @@
- + + + @@ -14,7 +16,7 @@ - + @@ -24,7 +26,7 @@ - + @@ -35,7 +37,7 @@ - + @@ -43,40 +45,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -87,7 +63,7 @@ - + @@ -95,33 +71,39 @@ - + - + - - + + - + - - + + + + - + + + + + + + - + - - - + diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$1.class b/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$1.class deleted file mode 100644 index 3902583..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$1.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$2.class b/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$2.class deleted file mode 100644 index 6bff154..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$2.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$3.class b/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$3.class deleted file mode 100644 index ef2a978..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$3.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$4.class b/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$4.class deleted file mode 100644 index fdbc23c..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$4.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$5.class b/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$5.class deleted file mode 100644 index a7dafb8..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$5.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$6.class b/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$6.class deleted file mode 100644 index 2613999..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion$6.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion.class b/HotelAdmin/build/classes/Vistas/Jframe/Habitacion.class deleted file mode 100644 index ee70a8c..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion.form b/HotelAdmin/build/classes/Vistas/Jframe/Habitacion.form deleted file mode 100644 index 39a48a3..0000000 --- a/HotelAdmin/build/classes/Vistas/Jframe/Habitacion.form +++ /dev/null @@ -1,309 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones$1.class b/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones$1.class index a36ba7b..a5c289e 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones$1.class and b/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones$2.class b/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones$2.class index b5afc7c..434ae0e 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones$2.class and b/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones$3.class b/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones$3.class index 873cfa3..077448e 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones$3.class and b/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones.class b/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones.class index 5af11c6..efbce86 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones.class and b/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones.form b/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones.form index 548dcea..b0fbb6b 100644 --- a/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones.form +++ b/HotelAdmin/build/classes/Vistas/Jframe/Habitaciones.form @@ -2,7 +2,9 @@
- + + + @@ -14,7 +16,7 @@ - + @@ -24,7 +26,7 @@ - + @@ -35,7 +37,7 @@ - + @@ -43,14 +45,14 @@ - + - + @@ -61,7 +63,7 @@ - + @@ -69,14 +71,14 @@ - + - + @@ -87,7 +89,7 @@ - + @@ -95,33 +97,39 @@ - + - + - - + + - + - - + + + + - + + + + + + + - + - - - + diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$1.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$1.class index d074436..9311611 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$1.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$10.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$10.class index 25b1252..b1e1562 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$10.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$10.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$11.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$11.class index 8538ee0..e03d65e 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$11.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$11.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$12.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$12.class index 24a97bb..c9a0d0b 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$12.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$12.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$13.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$13.class index 743ebb3..0e4b2f5 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$13.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$13.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$14.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$14.class index 2b38896..ce1255b 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$14.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$14.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$15.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$15.class index d8c9d4c..4f83451 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$15.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$15.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$16.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$16.class index 5cb5a79..8e7dbe7 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$16.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$16.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$17.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$17.class index 5d3ffe7..7118772 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$17.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$17.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$18.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$18.class index 3ceb4a8..f9e0b30 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$18.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$18.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$19.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$19.class index 9092c34..5ead27c 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$19.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$19.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$2.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$2.class index 2044f3a..d174492 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$2.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$20.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$20.class index fb27fae..b7f15a6 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$20.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$20.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$21.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$21.class index 7942b94..96b40f4 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$21.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$21.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$22.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$22.class deleted file mode 100644 index b59770d..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$22.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$23.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$23.class deleted file mode 100644 index 2e45dcd..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$23.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$3.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$3.class index 7f670b6..f07c87d 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$3.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$4.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$4.class index c292525..94898c3 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$4.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$4.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$5.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$5.class index 4c94b88..03bc99c 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$5.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$5.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$6.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$6.class index 704612f..eeda1f6 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$6.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$6.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$7.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$7.class index 970c40f..930d4d6 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$7.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$7.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$8.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$8.class index 59fe4c2..edf0be3 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$8.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$8.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login$9.class b/HotelAdmin/build/classes/Vistas/Jframe/Login$9.class index abbc2e8..aec5198 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login$9.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login$9.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login.class b/HotelAdmin/build/classes/Vistas/Jframe/Login.class index 7c11798..6d6ddad 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login.class and b/HotelAdmin/build/classes/Vistas/Jframe/Login.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login.form b/HotelAdmin/build/classes/Vistas/Jframe/Login.form index 94fb699..0d528f8 100644 --- a/HotelAdmin/build/classes/Vistas/Jframe/Login.form +++ b/HotelAdmin/build/classes/Vistas/Jframe/Login.form @@ -3,9 +3,6 @@
- - - @@ -137,7 +134,7 @@ - + @@ -145,32 +142,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -180,34 +152,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -215,31 +162,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -247,41 +170,16 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -297,7 +195,7 @@ - + @@ -306,10 +204,12 @@ + + - + @@ -321,7 +221,7 @@ - + @@ -335,7 +235,7 @@ - + @@ -361,24 +261,15 @@ - - - - - - - - - - - - + + + @@ -397,18 +288,6 @@ - - - - - - - - - - - - @@ -433,30 +312,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -501,7 +356,7 @@ - + @@ -513,6 +368,7 @@ + @@ -536,6 +392,7 @@ + diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$1.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$1.class deleted file mode 100644 index 7911ef1..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$1.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$10.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$10.class deleted file mode 100644 index 7c09ad9..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$10.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$11.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$11.class deleted file mode 100644 index 4ee5418..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$11.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$12.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$12.class deleted file mode 100644 index 04c0e61..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$12.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$13.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$13.class deleted file mode 100644 index 048a061..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$13.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$14.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$14.class deleted file mode 100644 index 30c2151..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$14.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$15.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$15.class deleted file mode 100644 index 9f6fed7..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$15.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$16.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$16.class deleted file mode 100644 index 6538c3a..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$16.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$17.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$17.class deleted file mode 100644 index 384fe70..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$17.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$18.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$18.class deleted file mode 100644 index 2470839..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$18.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$19.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$19.class deleted file mode 100644 index 6bd5443..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$19.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$2.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$2.class deleted file mode 100644 index 58583bc..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$2.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$20.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$20.class deleted file mode 100644 index 51396bf..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$20.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$21.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$21.class deleted file mode 100644 index bac7431..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$21.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$22.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$22.class deleted file mode 100644 index 8f775de..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$22.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$23.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$23.class deleted file mode 100644 index eb6168d..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$23.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$24.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$24.class deleted file mode 100644 index cf32c5e..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$24.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$25.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$25.class deleted file mode 100644 index 8b75228..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$25.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$26.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$26.class deleted file mode 100644 index f99674d..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$26.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$3.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$3.class deleted file mode 100644 index b5648c0..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$3.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$4.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$4.class deleted file mode 100644 index b5d95a2..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$4.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$5.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$5.class deleted file mode 100644 index 44f081a..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$5.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$6.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$6.class deleted file mode 100644 index 31b7333..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$6.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$7.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$7.class deleted file mode 100644 index b9af3b8..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$7.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$8.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$8.class deleted file mode 100644 index d52460e..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$8.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_$9.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_$9.class deleted file mode 100644 index 07f83c9..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_$9.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_.class b/HotelAdmin/build/classes/Vistas/Jframe/Login_.class deleted file mode 100644 index df967c3..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Login_.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Login_.form b/HotelAdmin/build/classes/Vistas/Jframe/Login_.form deleted file mode 100644 index 829a567..0000000 --- a/HotelAdmin/build/classes/Vistas/Jframe/Login_.form +++ /dev/null @@ -1,609 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Principal$1.class b/HotelAdmin/build/classes/Vistas/Jframe/Principal$1.class index 4bef59d..7b0ded4 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Principal$1.class and b/HotelAdmin/build/classes/Vistas/Jframe/Principal$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Principal$2.class b/HotelAdmin/build/classes/Vistas/Jframe/Principal$2.class index d345319..cce036d 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Principal$2.class and b/HotelAdmin/build/classes/Vistas/Jframe/Principal$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Principal$3.class b/HotelAdmin/build/classes/Vistas/Jframe/Principal$3.class index d49e4f9..0b444f1 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Principal$3.class and b/HotelAdmin/build/classes/Vistas/Jframe/Principal$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Principal$4.class b/HotelAdmin/build/classes/Vistas/Jframe/Principal$4.class index c41b277..c4e20be 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Principal$4.class and b/HotelAdmin/build/classes/Vistas/Jframe/Principal$4.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Principal$5.class b/HotelAdmin/build/classes/Vistas/Jframe/Principal$5.class index 21f2fde..88bea9b 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Principal$5.class and b/HotelAdmin/build/classes/Vistas/Jframe/Principal$5.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Principal$6.class b/HotelAdmin/build/classes/Vistas/Jframe/Principal$6.class index 9aba410..9c00747 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Principal$6.class and b/HotelAdmin/build/classes/Vistas/Jframe/Principal$6.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Principal.class b/HotelAdmin/build/classes/Vistas/Jframe/Principal.class index 6e36f14..0adf6de 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Principal.class and b/HotelAdmin/build/classes/Vistas/Jframe/Principal.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Principal.form b/HotelAdmin/build/classes/Vistas/Jframe/Principal.form index a88757e..1828a5d 100644 --- a/HotelAdmin/build/classes/Vistas/Jframe/Principal.form +++ b/HotelAdmin/build/classes/Vistas/Jframe/Principal.form @@ -3,6 +3,12 @@
+ + + + + + @@ -18,53 +24,33 @@ + - - - - - - - - - - - + + - + + + + + + - - - - - - - - - - - - - - - - - - + - + @@ -87,22 +73,22 @@ - + - + - + - + - + @@ -125,22 +111,22 @@ - + - + - + - + @@ -163,7 +149,7 @@ - + @@ -171,14 +157,14 @@ - + - + - + @@ -201,15 +187,15 @@ - + - + - + @@ -232,57 +218,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$1.class b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$1.class new file mode 100644 index 0000000..6e0ee20 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$2.class b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$2.class new file mode 100644 index 0000000..5ca9afa Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$3.class b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$3.class new file mode 100644 index 0000000..797a6db Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$4.class b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$4.class new file mode 100644 index 0000000..dfbc5a5 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$4.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$5.class b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$5.class new file mode 100644 index 0000000..457ba4a Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$5.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$6.class b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$6.class new file mode 100644 index 0000000..9a002e4 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$6.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$7.class b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$7.class new file mode 100644 index 0000000..325bfeb Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista$7.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista.class b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista.class new file mode 100644 index 0000000..ab04bd9 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista.form b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista.form new file mode 100644 index 0000000..23ab82f --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jframe/Recepcionista.form @@ -0,0 +1,229 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Reservas$1.class b/HotelAdmin/build/classes/Vistas/Jframe/Reservas$1.class new file mode 100644 index 0000000..6928b51 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/Reservas$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Reservas$2.class b/HotelAdmin/build/classes/Vistas/Jframe/Reservas$2.class new file mode 100644 index 0000000..064d9af Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/Reservas$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Reservas.class b/HotelAdmin/build/classes/Vistas/Jframe/Reservas.class new file mode 100644 index 0000000..77a0c57 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/Reservas.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Reservas.form b/HotelAdmin/build/classes/Vistas/Jframe/Reservas.form new file mode 100644 index 0000000..6dde52e --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jframe/Reservas.form @@ -0,0 +1,112 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Services$1.class b/HotelAdmin/build/classes/Vistas/Jframe/Services$1.class new file mode 100644 index 0000000..c0945a3 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/Services$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Services$2.class b/HotelAdmin/build/classes/Vistas/Jframe/Services$2.class new file mode 100644 index 0000000..7f37a67 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/Services$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Services.class b/HotelAdmin/build/classes/Vistas/Jframe/Services.class new file mode 100644 index 0000000..3fca0e7 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/Services.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Services.form b/HotelAdmin/build/classes/Vistas/Jframe/Services.form new file mode 100644 index 0000000..f90786c --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jframe/Services.form @@ -0,0 +1,109 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jframe/Servicios.class b/HotelAdmin/build/classes/Vistas/Jframe/Servicios.class index ce3d299..f1c5ac2 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jframe/Servicios.class and b/HotelAdmin/build/classes/Vistas/Jframe/Servicios.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/ServiciosRecepcionista.class b/HotelAdmin/build/classes/Vistas/Jframe/ServiciosRecepcionista.class new file mode 100644 index 0000000..81a493e Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jframe/ServiciosRecepcionista.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jframe/ServiciosRecepcionista.form b/HotelAdmin/build/classes/Vistas/Jframe/ServiciosRecepcionista.form new file mode 100644 index 0000000..560ba0c --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jframe/ServiciosRecepcionista.form @@ -0,0 +1,81 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI$1.class new file mode 100644 index 0000000..01f7df6 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI$2.class b/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI$2.class new file mode 100644 index 0000000..2bb695c Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI$3.class b/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI$3.class new file mode 100644 index 0000000..1a872cb Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI$4.class b/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI$4.class new file mode 100644 index 0000000..9da75f9 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI$4.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI.class new file mode 100644 index 0000000..ee2ea57 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI.form new file mode 100644 index 0000000..a23d42f --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/AgregarServicioRecepGUI.form @@ -0,0 +1,270 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$1.class new file mode 100644 index 0000000..2595482 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$2.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$2.class new file mode 100644 index 0000000..77da1f7 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$3.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$3.class new file mode 100644 index 0000000..f3fa752 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$4.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$4.class new file mode 100644 index 0000000..352ef5a Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$4.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$5.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$5.class new file mode 100644 index 0000000..89894a6 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$5.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$6.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$6.class new file mode 100644 index 0000000..73763e0 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI$6.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI.class new file mode 100644 index 0000000..6cc43c7 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI.form new file mode 100644 index 0000000..af9a700 --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInReservaPreviaGUI.form @@ -0,0 +1,277 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$1.class new file mode 100644 index 0000000..19968d9 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$2.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$2.class new file mode 100644 index 0000000..d46d4ba Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$3.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$3.class new file mode 100644 index 0000000..9be3a18 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$4.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$4.class new file mode 100644 index 0000000..0e43433 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$4.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$5.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$5.class new file mode 100644 index 0000000..19e3099 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$5.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$6.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$6.class new file mode 100644 index 0000000..70ba186 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$6.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$7.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$7.class new file mode 100644 index 0000000..b024a58 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$7.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$8.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$8.class new file mode 100644 index 0000000..b3e2e3f Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$8.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$9.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$9.class new file mode 100644 index 0000000..ad772ae Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI$9.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI.class new file mode 100644 index 0000000..7ed0a41 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI.form new file mode 100644 index 0000000..a3c90c9 --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/CheckInSinReservaGUI.form @@ -0,0 +1,366 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClienteListaGUI$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClienteListaGUI$1.class index 0760aad..824d4ba 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/ClienteListaGUI$1.class and b/HotelAdmin/build/classes/Vistas/Jpanel/ClienteListaGUI$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClienteListaGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClienteListaGUI.class index bfb2d22..16a1eb8 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/ClienteListaGUI.class and b/HotelAdmin/build/classes/Vistas/Jpanel/ClienteListaGUI.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClienteListaGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/ClienteListaGUI.form index 34da0a7..a32097c 100644 --- a/HotelAdmin/build/classes/Vistas/Jpanel/ClienteListaGUI.form +++ b/HotelAdmin/build/classes/Vistas/Jpanel/ClienteListaGUI.form @@ -14,48 +14,37 @@ - + - + - - - - - - - - - + + - - - - + - + - + + + - - - - + @@ -76,22 +65,32 @@ - + - - + + + + + + + + + + + + - + - + @@ -104,7 +103,7 @@ - + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$1.class index 10447ec..8cbe96a 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$1.class and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$10.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$10.class new file mode 100644 index 0000000..5eaf4f1 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$10.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$11.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$11.class new file mode 100644 index 0000000..f5e0936 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$11.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$12.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$12.class new file mode 100644 index 0000000..b997b58 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$12.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$2.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$2.class index 9e0ad7c..280b1fc 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$2.class and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$3.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$3.class new file mode 100644 index 0000000..5d034a8 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$4.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$4.class new file mode 100644 index 0000000..4fd7998 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$4.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$5.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$5.class new file mode 100644 index 0000000..19e59d4 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$5.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$6.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$6.class new file mode 100644 index 0000000..ae28f9e Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$6.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$7.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$7.class new file mode 100644 index 0000000..e8bcbf6 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$7.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$8.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$8.class new file mode 100644 index 0000000..2c58a7a Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$8.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$9.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$9.class new file mode 100644 index 0000000..ce1ec55 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI$9.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI.class index e17feec..a4a04f9 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI.class and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI.form index e0ffb9a..65c2e0f 100644 --- a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI.form +++ b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesAgregarModificarGUI.form @@ -14,7 +14,7 @@ - + @@ -24,7 +24,7 @@ - + @@ -32,7 +32,7 @@ - + @@ -40,7 +40,7 @@ - + @@ -59,15 +59,12 @@ - + - - - @@ -82,17 +79,17 @@
+ + + - +
- - - @@ -107,23 +104,24 @@
+ + + - + - + - - - + @@ -132,17 +130,19 @@ + + + + + - + - - - @@ -157,17 +157,18 @@ + + + + - + - - - @@ -182,17 +183,18 @@ + + + + - + - + - - - @@ -207,16 +209,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -224,7 +341,7 @@ - + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI$1.class new file mode 100644 index 0000000..c658092 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI$2.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI$2.class new file mode 100644 index 0000000..229baa8 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI$3.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI$3.class new file mode 100644 index 0000000..a652549 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI$4.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI$4.class new file mode 100644 index 0000000..0ad4f13 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI$4.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI$5.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI$5.class new file mode 100644 index 0000000..f973b0f Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI$5.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI.class new file mode 100644 index 0000000..c8cb069 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI.form new file mode 100644 index 0000000..28ba19b --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/ClientesRegistradosGUI.form @@ -0,0 +1,121 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI$1.class index 3329517..43b2eac 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI$1.class and b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI$2.class b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI$2.class index 10ed56d..c83529e 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI$2.class and b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI$3.class b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI$3.class index bb10af2..4fcf17b 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI$3.class and b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI.class index 14d12b0..73d2315 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI.class and b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI.form index f8a52ea..49f9111 100644 --- a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI.form +++ b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoAgregarModificarGUI.form @@ -40,31 +40,6 @@
- - - - - - - - - - - - - - - - - - - - - - - - - @@ -266,6 +241,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$1.class new file mode 100644 index 0000000..40239d9 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$2.class b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$2.class new file mode 100644 index 0000000..f37199c Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$3.class b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$3.class new file mode 100644 index 0000000..1a5dcda Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$4.class b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$4.class new file mode 100644 index 0000000..fea2fa0 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$4.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$5.class b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$5.class new file mode 100644 index 0000000..896a0f9 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$5.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$6.class b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$6.class new file mode 100644 index 0000000..b0836fe Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario$6.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario.class b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario.class new file mode 100644 index 0000000..c7dca2b Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario.form b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario.form new file mode 100644 index 0000000..579f437 --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoFormulario.form @@ -0,0 +1,343 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoListaGUI$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoListaGUI$1.class deleted file mode 100644 index 2753dc8..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoListaGUI$1.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoListaGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoListaGUI.class deleted file mode 100644 index f49f59f..0000000 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoListaGUI.class and /dev/null differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoPanelListar$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoPanelListar$1.class new file mode 100644 index 0000000..669eb80 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoPanelListar$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoPanelListar.class b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoPanelListar.class new file mode 100644 index 0000000..6b15117 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoPanelListar.class differ diff --git a/HotelAdmin/src/Vistas/Jpanel/EmpleadoListaGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoPanelListar.form similarity index 86% rename from HotelAdmin/src/Vistas/Jpanel/EmpleadoListaGUI.form rename to HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoPanelListar.form index 34da0a7..944066e 100644 --- a/HotelAdmin/src/Vistas/Jpanel/EmpleadoListaGUI.form +++ b/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoPanelListar.form @@ -14,48 +14,25 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - - - + @@ -76,22 +53,44 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -104,7 +103,7 @@ - + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$1.class index 46566d0..0a3b493 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$1.class and b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$10.class b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$10.class new file mode 100644 index 0000000..284d023 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$10.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$11.class b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$11.class new file mode 100644 index 0000000..f70794c Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$11.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$2.class b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$2.class index f3d6226..9196476 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$2.class and b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$3.class b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$3.class index fc7f044..24e0ca3 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$3.class and b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$4.class b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$4.class new file mode 100644 index 0000000..210f221 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$4.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$5.class b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$5.class new file mode 100644 index 0000000..fd099a3 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$5.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$6.class b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$6.class new file mode 100644 index 0000000..c7710f4 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$6.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$7.class b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$7.class new file mode 100644 index 0000000..f436bf7 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$7.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$8.class b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$8.class new file mode 100644 index 0000000..95bd0e9 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$8.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$9.class b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$9.class new file mode 100644 index 0000000..d305398 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI$9.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI.class index 8032f05..1f96943 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI.class and b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI.form index 6c50867..bce8524 100644 --- a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI.form +++ b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI.form @@ -5,6 +5,7 @@ + @@ -19,19 +20,135 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -41,15 +158,12 @@ - + - - - @@ -64,24 +178,31 @@
+ + + + - +
- + - + + + + - + @@ -89,7 +210,7 @@ - + @@ -107,9 +228,6 @@ - - - @@ -117,15 +235,12 @@ - +
- - - @@ -140,9 +255,13 @@ + + + + - + @@ -160,22 +279,16 @@ - - - - + - - - @@ -190,17 +303,18 @@ + + + + - + - - - @@ -215,16 +329,20 @@ + + + + - + - + @@ -232,7 +350,7 @@ - + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionListaGUI$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionListaGUI$1.class index e4be12d..536b4ca 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionListaGUI$1.class and b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionListaGUI$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionListaGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionListaGUI.class index 5088881..49a0f69 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionListaGUI.class and b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionListaGUI.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionListaGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionListaGUI.form index b2fcf23..743093e 100644 --- a/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionListaGUI.form +++ b/HotelAdmin/build/classes/Vistas/Jpanel/HabitacionListaGUI.form @@ -14,7 +14,7 @@ - + @@ -24,12 +24,12 @@ - + - + - + @@ -39,19 +39,22 @@ - + + + + - + @@ -72,22 +75,10 @@ - - - - - - - - - - - - - + @@ -100,7 +91,19 @@ - + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI$1.class new file mode 100644 index 0000000..a843bfb Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI$2.class b/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI$2.class new file mode 100644 index 0000000..d2905dc Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI$3.class b/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI$3.class new file mode 100644 index 0000000..a981010 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI$4.class b/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI$4.class new file mode 100644 index 0000000..0467525 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI$4.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI.class new file mode 100644 index 0000000..7312703 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI.form new file mode 100644 index 0000000..7057996 --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/ListaHospedajesGUI.form @@ -0,0 +1,119 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ListaReservasGUI$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/ListaReservasGUI$1.class new file mode 100644 index 0000000..d8ae748 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ListaReservasGUI$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ListaReservasGUI$2.class b/HotelAdmin/build/classes/Vistas/Jpanel/ListaReservasGUI$2.class new file mode 100644 index 0000000..841ee78 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ListaReservasGUI$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ListaReservasGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/ListaReservasGUI.class new file mode 100644 index 0000000..3b9790e Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/ListaReservasGUI.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ListaReservasGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/ListaReservasGUI.form new file mode 100644 index 0000000..129e5f1 --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/ListaReservasGUI.form @@ -0,0 +1,114 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$1.class new file mode 100644 index 0000000..b2ad837 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$10.class b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$10.class new file mode 100644 index 0000000..6885713 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$10.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$11.class b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$11.class new file mode 100644 index 0000000..99d4c57 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$11.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$12.class b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$12.class new file mode 100644 index 0000000..75b33dd Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$12.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$2.class b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$2.class new file mode 100644 index 0000000..14e4324 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$3.class b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$3.class new file mode 100644 index 0000000..9295ddc Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$4.class b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$4.class new file mode 100644 index 0000000..a8b97af Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$4.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$5.class b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$5.class new file mode 100644 index 0000000..9a52964 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$5.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$6.class b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$6.class new file mode 100644 index 0000000..7a18f64 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$6.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$7.class b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$7.class new file mode 100644 index 0000000..d76b39a Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$7.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$8.class b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$8.class new file mode 100644 index 0000000..1cc6b59 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$8.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$9.class b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$9.class new file mode 100644 index 0000000..f089f0c Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI$9.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI.class new file mode 100644 index 0000000..2836358 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI.form new file mode 100644 index 0000000..a7e7046 --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/RealizarReservaGUI.form @@ -0,0 +1,382 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI$1.class new file mode 100644 index 0000000..410880a Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI$2.class b/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI$2.class new file mode 100644 index 0000000..fd35a69 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI$3.class b/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI$3.class new file mode 100644 index 0000000..c6f7840 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI$4.class b/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI$4.class new file mode 100644 index 0000000..f0182d6 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI$4.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI$5.class b/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI$5.class new file mode 100644 index 0000000..05ada81 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI$5.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI.class new file mode 100644 index 0000000..082bd04 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI.form new file mode 100644 index 0000000..d5d0955 --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/RegistrarSalidaGUI.form @@ -0,0 +1,270 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosAgregarModificarGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosAgregarModificarGUI.class index 8b676f1..4597ecb 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosAgregarModificarGUI.class and b/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosAgregarModificarGUI.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosAgregarModificarGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosAgregarModificarGUI.form index f4f3f74..e41c05d 100644 --- a/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosAgregarModificarGUI.form +++ b/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosAgregarModificarGUI.form @@ -14,6 +14,7 @@ + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosListaGUI.class b/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosListaGUI.class index 0684b22..4527047 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosListaGUI.class and b/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosListaGUI.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosListaGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosListaGUI.form index 8221ab4..aa0a98a 100644 --- a/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosListaGUI.form +++ b/HotelAdmin/build/classes/Vistas/Jpanel/ServiciosListaGUI.form @@ -106,7 +106,7 @@ - + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPcliente$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPcliente$1.class new file mode 100644 index 0000000..bf2340b Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPcliente$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPcliente.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPcliente.class index 74d4212..56fd7b6 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/jPcliente.class and b/HotelAdmin/build/classes/Vistas/Jpanel/jPcliente.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPcliente.form b/HotelAdmin/build/classes/Vistas/Jpanel/jPcliente.form index 105b4a0..e776d88 100644 --- a/HotelAdmin/build/classes/Vistas/Jpanel/jPcliente.form +++ b/HotelAdmin/build/classes/Vistas/Jpanel/jPcliente.form @@ -3,7 +3,7 @@
- + @@ -78,6 +78,9 @@ + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPclienteRecepcionista$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPclienteRecepcionista$1.class new file mode 100644 index 0000000..aabf88c Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPclienteRecepcionista$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPclienteRecepcionista$2.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPclienteRecepcionista$2.class new file mode 100644 index 0000000..6a58002 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPclienteRecepcionista$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPclienteRecepcionista.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPclienteRecepcionista.class new file mode 100644 index 0000000..3178d89 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPclienteRecepcionista.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPclienteRecepcionista.form b/HotelAdmin/build/classes/Vistas/Jpanel/jPclienteRecepcionista.form new file mode 100644 index 0000000..bb7900a --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/jPclienteRecepcionista.form @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPempleado$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPempleado$1.class new file mode 100644 index 0000000..77c9d34 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPempleado$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPempleado.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPempleado.class index caad082..f05d9d8 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/jPempleado.class and b/HotelAdmin/build/classes/Vistas/Jpanel/jPempleado.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPempleado.form b/HotelAdmin/build/classes/Vistas/Jpanel/jPempleado.form index 5ddb246..49e4495 100644 --- a/HotelAdmin/build/classes/Vistas/Jpanel/jPempleado.form +++ b/HotelAdmin/build/classes/Vistas/Jpanel/jPempleado.form @@ -3,7 +3,7 @@
- + @@ -78,6 +78,9 @@ + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacion$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacion$1.class index 6d2c406..1a5bfd2 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacion$1.class and b/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacion$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacion.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacion.class index c96085a..ac1b264 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacion.class and b/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacion.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacionCheckIn$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacionCheckIn$1.class new file mode 100644 index 0000000..bc7f743 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacionCheckIn$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacionCheckIn.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacionCheckIn.class new file mode 100644 index 0000000..28f42a7 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacionCheckIn.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacionCheckIn.form b/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacionCheckIn.form new file mode 100644 index 0000000..ae06488 --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/jPhabitacionCheckIn.form @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPhospedaje$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPhospedaje$1.class new file mode 100644 index 0000000..7037783 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPhospedaje$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPhospedaje.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPhospedaje.class new file mode 100644 index 0000000..f43cdc7 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPhospedaje.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPhospedaje.form b/HotelAdmin/build/classes/Vistas/Jpanel/jPhospedaje.form new file mode 100644 index 0000000..9078439 --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/jPhospedaje.form @@ -0,0 +1,115 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPmensaje.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPmensaje.class new file mode 100644 index 0000000..b36abbf Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPmensaje.class differ diff --git a/HotelAdmin/build/src/Vistas/Jpanel/HabitacionAgregarModificarGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/jPmensaje.form similarity index 73% rename from HotelAdmin/build/src/Vistas/Jpanel/HabitacionAgregarModificarGUI.form rename to HotelAdmin/build/classes/Vistas/Jpanel/jPmensaje.form index 591d3d4..6d5fc0a 100644 --- a/HotelAdmin/build/src/Vistas/Jpanel/HabitacionAgregarModificarGUI.form +++ b/HotelAdmin/build/classes/Vistas/Jpanel/jPmensaje.form @@ -1,10 +1,20 @@
+ + + + + + + + + - - + + + @@ -16,22 +26,22 @@ - + - + - - + + - + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPnumeroHabitacion.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPnumeroHabitacion.class new file mode 100644 index 0000000..2f5c21b Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPnumeroHabitacion.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPnumeroHabitacion.form b/HotelAdmin/build/classes/Vistas/Jpanel/jPnumeroHabitacion.form new file mode 100644 index 0000000..27c5ba6 --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/jPnumeroHabitacion.form @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPreservasHospedaje$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPreservasHospedaje$1.class new file mode 100644 index 0000000..9ea612c Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPreservasHospedaje$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPreservasHospedaje$2.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPreservasHospedaje$2.class new file mode 100644 index 0000000..f6e8def Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPreservasHospedaje$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPreservasHospedaje$3.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPreservasHospedaje$3.class new file mode 100644 index 0000000..04fdc70 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPreservasHospedaje$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPreservasHospedaje.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPreservasHospedaje.class new file mode 100644 index 0000000..81430c4 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPreservasHospedaje.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPreservasHospedaje.form b/HotelAdmin/build/classes/Vistas/Jpanel/jPreservasHospedaje.form new file mode 100644 index 0000000..44c99ea --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/jPreservasHospedaje.form @@ -0,0 +1,199 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPservicio$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPservicio$1.class new file mode 100644 index 0000000..54f0f29 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPservicio$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPservicio.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPservicio.class index bd33f1c..a61e8bc 100644 Binary files a/HotelAdmin/build/classes/Vistas/Jpanel/jPservicio.class and b/HotelAdmin/build/classes/Vistas/Jpanel/jPservicio.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPservicio.form b/HotelAdmin/build/classes/Vistas/Jpanel/jPservicio.form index 5af7ed9..53b7cdc 100644 --- a/HotelAdmin/build/classes/Vistas/Jpanel/jPservicio.form +++ b/HotelAdmin/build/classes/Vistas/Jpanel/jPservicio.form @@ -32,7 +32,7 @@ - +
@@ -78,6 +78,9 @@
+ + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPserviciosRecepcionista.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPserviciosRecepcionista.class new file mode 100644 index 0000000..d33f4b8 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPserviciosRecepcionista.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPserviciosRecepcionista.form b/HotelAdmin/build/classes/Vistas/Jpanel/jPserviciosRecepcionista.form new file mode 100644 index 0000000..640b48f --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/jPserviciosRecepcionista.form @@ -0,0 +1,81 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPserviciosRecepcionista2$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPserviciosRecepcionista2$1.class new file mode 100644 index 0000000..144b1a0 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPserviciosRecepcionista2$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPserviciosRecepcionista2.class b/HotelAdmin/build/classes/Vistas/Jpanel/jPserviciosRecepcionista2.class new file mode 100644 index 0000000..87e34ed Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/jPserviciosRecepcionista2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/jPserviciosRecepcionista2.form b/HotelAdmin/build/classes/Vistas/Jpanel/jPserviciosRecepcionista2.form new file mode 100644 index 0000000..dabb9d3 --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/jPserviciosRecepcionista2.form @@ -0,0 +1,102 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$1.class new file mode 100644 index 0000000..7c49c00 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$2.class b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$2.class new file mode 100644 index 0000000..95ff902 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$2.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$3.class b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$3.class new file mode 100644 index 0000000..13f3ce6 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$3.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$4.class b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$4.class new file mode 100644 index 0000000..090314f Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$4.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$5.class b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$5.class new file mode 100644 index 0000000..0ace3d8 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$5.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$6.class b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$6.class new file mode 100644 index 0000000..95d9c4b Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$6.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$7.class b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$7.class new file mode 100644 index 0000000..7873a72 Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio$7.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio.class b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio.class new file mode 100644 index 0000000..e72eb0c Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio.form b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio.form new file mode 100644 index 0000000..e49c03b --- /dev/null +++ b/HotelAdmin/build/classes/Vistas/Jpanel/panelAgregarServicio.form @@ -0,0 +1,216 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/panelModificarServicio$1.class b/HotelAdmin/build/classes/Vistas/Jpanel/panelModificarServicio$1.class new file mode 100644 index 0000000..aacf3da Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/panelModificarServicio$1.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/panelModificarServicio.class b/HotelAdmin/build/classes/Vistas/Jpanel/panelModificarServicio.class new file mode 100644 index 0000000..63d9cdc Binary files /dev/null and b/HotelAdmin/build/classes/Vistas/Jpanel/panelModificarServicio.class differ diff --git a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoListaGUI.form b/HotelAdmin/build/classes/Vistas/Jpanel/panelModificarServicio.form similarity index 86% rename from HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoListaGUI.form rename to HotelAdmin/build/classes/Vistas/Jpanel/panelModificarServicio.form index 34da0a7..648c223 100644 --- a/HotelAdmin/build/classes/Vistas/Jpanel/EmpleadoListaGUI.form +++ b/HotelAdmin/build/classes/Vistas/Jpanel/panelModificarServicio.form @@ -14,48 +14,25 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - - - + @@ -76,22 +53,44 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -104,7 +103,7 @@ - + diff --git a/HotelAdmin/build/classes/Vistas/LoginGUI.class b/HotelAdmin/build/classes/Vistas/LoginGUI.class index ce4b3d9..9aff92c 100644 Binary files a/HotelAdmin/build/classes/Vistas/LoginGUI.class and b/HotelAdmin/build/classes/Vistas/LoginGUI.class differ diff --git a/HotelAdmin/build/dist/HotelAdmin.jar b/HotelAdmin/build/dist/HotelAdmin.jar deleted file mode 100644 index ef4ab9d..0000000 Binary files a/HotelAdmin/build/dist/HotelAdmin.jar and /dev/null differ diff --git a/HotelAdmin/build/dist/README.TXT b/HotelAdmin/build/dist/README.TXT deleted file mode 100644 index 8dabd15..0000000 --- a/HotelAdmin/build/dist/README.TXT +++ /dev/null @@ -1,32 +0,0 @@ -======================== -BUILD OUTPUT DESCRIPTION -======================== - -When you build an Java application project that has a main class, the IDE -automatically copies all of the JAR -files on the projects classpath to your projects dist/lib folder. The IDE -also adds each of the JAR files to the Class-Path element in the application -JAR files manifest file (MANIFEST.MF). - -To run the project from the command line, go to the dist folder and -type the following: - -java -jar "HotelAdmin.jar" - -To distribute this project, zip up the dist folder (including the lib folder) -and distribute the ZIP file. - -Notes: - -* If two JAR files on the project classpath have the same name, only the first -JAR file is copied to the lib folder. -* Only JAR files are copied to the lib folder. -If the classpath contains other types of files or folders, these files (folders) -are not copied. -* If a library on the projects classpath also has a Class-Path element -specified in the manifest,the content of the Class-Path element has to be on -the projects runtime path. -* To set a main class in a standard Java project, right-click the project node -in the Projects window and choose Properties. Then click Run and enter the -class name in the Main Class field. Alternatively, you can manually type the -class name in the manifest Main-Class element. diff --git a/HotelAdmin/build/manifest.mf b/HotelAdmin/build/manifest.mf deleted file mode 100644 index 328e8e5..0000000 --- a/HotelAdmin/build/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/HotelAdmin/build/nbproject/build-impl.xml b/HotelAdmin/build/nbproject/build-impl.xml deleted file mode 100644 index 92aa8c4..0000000 --- a/HotelAdmin/build/nbproject/build-impl.xml +++ /dev/null @@ -1,1768 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set src.dir - Must set test.src.dir - Must set build.dir - Must set dist.dir - Must set build.classes.dir - Must set dist.javadoc.dir - Must set build.test.classes.dir - Must set build.test.results.dir - Must set build.classes.excludes - Must set dist.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No tests executed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set JVM to use for profiling in profiler.info.jvm - Must set profiler agent JVM arguments in profiler.info.jvmargs.agent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - java -jar "${dist.jar.resolved}" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - Must select one file in the IDE or set debug.class - - - - - Must set fix.includes - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - Must select one file in the IDE or set profile.class - This target only works when run from inside the NetBeans IDE. - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - - - Must select some files in the IDE or set test.includes - - - - - Must select one file in the IDE or set run.class - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - - - - Must select some files in the IDE or set test.includes - - - - Some tests failed; see details above. - - - - Must select some files in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - Some tests failed; see details above. - - - - - Must select one file in the IDE or set test.class - - - - Must select one file in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - - - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/HotelAdmin/build/nbproject/genfiles.properties b/HotelAdmin/build/nbproject/genfiles.properties deleted file mode 100644 index 4b9c342..0000000 --- a/HotelAdmin/build/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=8d24a83a -build.xml.script.CRC32=83e1eeb6 -build.xml.stylesheet.CRC32=f85dc8f2@1.90.1.48 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=8d24a83a -nbproject/build-impl.xml.script.CRC32=fd68769a -nbproject/build-impl.xml.stylesheet.CRC32=3a2fa800@1.90.1.48 diff --git a/HotelAdmin/build/nbproject/private/private.properties b/HotelAdmin/build/nbproject/private/private.properties deleted file mode 100644 index 172ae17..0000000 --- a/HotelAdmin/build/nbproject/private/private.properties +++ /dev/null @@ -1,2 +0,0 @@ -compile.on.save=true -user.properties.file=C:\\Users\\crist\\AppData\\Roaming\\NetBeans\\8.2\\build.properties diff --git a/HotelAdmin/build/nbproject/private/private.xml b/HotelAdmin/build/nbproject/private/private.xml deleted file mode 100644 index ad89d04..0000000 --- a/HotelAdmin/build/nbproject/private/private.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - file:/C:/Users/crist/Documents/NetBeansProjects/Desarrolo%20backup/MiRama/Desarrollo/HotelAdmin/src/Vistas/Jframe/Login.java - - - diff --git a/HotelAdmin/build/nbproject/project.properties b/HotelAdmin/build/nbproject/project.properties deleted file mode 100644 index 15ef5c9..0000000 --- a/HotelAdmin/build/nbproject/project.properties +++ /dev/null @@ -1,87 +0,0 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processor.options= -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.modulepath=\ - ${run.modulepath} -debug.test.classpath=\ - ${run.test.classpath} -debug.test.modulepath=\ - ${run.test.modulepath} -# Files in build.classes.dir which should be excluded from distribution jar -dist.archive.excludes= -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/HotelAdmin.jar -dist.javadoc.dir=${dist.dir}/javadoc -excludes= -includes=** -jar.compress=false -javac.classpath=\ - ${libs.absolutelayout.classpath} -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.external.vm=true -javac.modulepath= -javac.processormodulepath= -javac.processorpath=\ - ${javac.classpath} -javac.source=1.8 -javac.target=1.8 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -javac.test.modulepath=\ - ${javac.modulepath} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -main.class=hoteladmin.HotelAdmin -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -mkdist.disabled=false -platform.active=default_platform -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# Space-separated list of JVM arguments used when running the project. -# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. -# To set system properties for unit tests define test-sys-prop.name=value: -run.jvmargs= -run.modulepath=\ - ${javac.modulepath} -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -run.test.modulepath=\ - ${javac.test.modulepath} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff --git a/HotelAdmin/build/nbproject/project.xml b/HotelAdmin/build/nbproject/project.xml deleted file mode 100644 index 594a317..0000000 --- a/HotelAdmin/build/nbproject/project.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - org.netbeans.modules.java.j2seproject - - - HotelAdmin - - - - - - - - - diff --git a/HotelAdmin/build/src/Controladores/Como hacer un crud b/HotelAdmin/build/src/Controladores/Como hacer un crud deleted file mode 100644 index 695642c..0000000 --- a/HotelAdmin/build/src/Controladores/Como hacer un crud +++ /dev/null @@ -1,28 +0,0 @@ -public class ControladorActor { - public static int grabarActor(Actor c) - { - ActorDAO actorDAO = new ActorDAO(); - int resultado = actorDAO.grabarActor(c); - return resultado; - } - public static ArrayList listadoActor(int id) - { - ArrayList listado; - listado = new ArrayList(); - ActorDAO actores = new ActorDAO(); - listado = actores.listadoActores(id); - return listado; - } - public static int borrarActor(int id) - { - ActorDAO actorDAO = new ActorDAO(); - int resultado = actorDAO.borrarActor(id); - return resultado; - } - public static int modificarActor(Actor c) - { - ActorDAO actorDAO = new ActorDAO(); - int resultado =actorDAO.modificarActor(c); - return resultado; - } -} diff --git a/HotelAdmin/build/src/Imagenes/BotonSinSelect.png b/HotelAdmin/build/src/Imagenes/BotonSinSelect.png deleted file mode 100644 index 856527d..0000000 Binary files a/HotelAdmin/build/src/Imagenes/BotonSinSelect.png and /dev/null differ diff --git "a/HotelAdmin/build/src/Imagenes/Componente 1 \342\200\223 8.png" "b/HotelAdmin/build/src/Imagenes/Componente 1 \342\200\223 8.png" deleted file mode 100644 index 0f377ad..0000000 Binary files "a/HotelAdmin/build/src/Imagenes/Componente 1 \342\200\223 8.png" and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Fondo-login.png b/HotelAdmin/build/src/Imagenes/Fondo-login.png deleted file mode 100644 index b098531..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Fondo-login.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Fondo-registro.png b/HotelAdmin/build/src/Imagenes/Fondo-registro.png deleted file mode 100644 index 9e3f8a8..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Fondo-registro.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Iniciar-select.png b/HotelAdmin/build/src/Imagenes/Iniciar-select.png deleted file mode 100644 index b04bf85..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Iniciar-select.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Iniciar-sinselect.png b/HotelAdmin/build/src/Imagenes/Iniciar-sinselect.png deleted file mode 100644 index bff68f8..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Iniciar-sinselect.png and /dev/null differ diff --git "a/HotelAdmin/build/src/Imagenes/IniciarSesi\303\263n-select.png" "b/HotelAdmin/build/src/Imagenes/IniciarSesi\303\263n-select.png" deleted file mode 100644 index a25b511..0000000 Binary files "a/HotelAdmin/build/src/Imagenes/IniciarSesi\303\263n-select.png" and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Input.png b/HotelAdmin/build/src/Imagenes/Input.png deleted file mode 100644 index 4ee127c..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Input.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Logo.png b/HotelAdmin/build/src/Imagenes/Logo.png deleted file mode 100644 index 21d08e1..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Logo.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Menu-Inicio.png b/HotelAdmin/build/src/Imagenes/Menu-Inicio.png deleted file mode 100644 index 29461a5..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Menu-Inicio.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Menu-crud.png b/HotelAdmin/build/src/Imagenes/Menu-crud.png deleted file mode 100644 index 7da6c1b..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Menu-crud.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Registrar-select.png b/HotelAdmin/build/src/Imagenes/Registrar-select.png deleted file mode 100644 index 6e22081..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Registrar-select.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Registrar-sinselect.png b/HotelAdmin/build/src/Imagenes/Registrar-sinselect.png deleted file mode 100644 index 56ec510..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Registrar-sinselect.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Registro-select.png b/HotelAdmin/build/src/Imagenes/Registro-select.png deleted file mode 100644 index 5a1dd76..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Registro-select.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Seleccion-agregar.png b/HotelAdmin/build/src/Imagenes/Seleccion-agregar.png deleted file mode 100644 index a2896e7..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Seleccion-agregar.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Seleccion-agregarGris.png b/HotelAdmin/build/src/Imagenes/Seleccion-agregarGris.png deleted file mode 100644 index 2bb72bd..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Seleccion-agregarGris.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Seleccion-cli.png b/HotelAdmin/build/src/Imagenes/Seleccion-cli.png deleted file mode 100644 index 13d2df6..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Seleccion-cli.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Seleccion-eliminarGris.png b/HotelAdmin/build/src/Imagenes/Seleccion-eliminarGris.png deleted file mode 100644 index 8ec9e48..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Seleccion-eliminarGris.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Seleccion-empl_1.png b/HotelAdmin/build/src/Imagenes/Seleccion-empl_1.png deleted file mode 100644 index b9cce24..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Seleccion-empl_1.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Seleccion-habi.png b/HotelAdmin/build/src/Imagenes/Seleccion-habi.png deleted file mode 100644 index fe31aa4..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Seleccion-habi.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Seleccion-modificar.png b/HotelAdmin/build/src/Imagenes/Seleccion-modificar.png deleted file mode 100644 index 55aa765..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Seleccion-modificar.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Seleccion-modificarGris.png b/HotelAdmin/build/src/Imagenes/Seleccion-modificarGris.png deleted file mode 100644 index 7f964bb..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Seleccion-modificarGris.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/SinSeleccionar-emp.png b/HotelAdmin/build/src/Imagenes/SinSeleccionar-emp.png deleted file mode 100644 index 0287ae8..0000000 Binary files a/HotelAdmin/build/src/Imagenes/SinSeleccionar-emp.png and /dev/null differ diff --git "a/HotelAdmin/build/src/Imagenes/SinSelecci\303\263n-habi.png" "b/HotelAdmin/build/src/Imagenes/SinSelecci\303\263n-habi.png" deleted file mode 100644 index 2b220fa..0000000 Binary files "a/HotelAdmin/build/src/Imagenes/SinSelecci\303\263n-habi.png" and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/Sinseleccion-cli.png b/HotelAdmin/build/src/Imagenes/Sinseleccion-cli.png deleted file mode 100644 index ddc3f15..0000000 Binary files a/HotelAdmin/build/src/Imagenes/Sinseleccion-cli.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/botonSalida.png b/HotelAdmin/build/src/Imagenes/botonSalida.png deleted file mode 100644 index 8225937..0000000 Binary files a/HotelAdmin/build/src/Imagenes/botonSalida.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/fondo-principal.png b/HotelAdmin/build/src/Imagenes/fondo-principal.png deleted file mode 100644 index b726a31..0000000 Binary files a/HotelAdmin/build/src/Imagenes/fondo-principal.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/fondoBlanco.png b/HotelAdmin/build/src/Imagenes/fondoBlanco.png deleted file mode 100644 index 6f85512..0000000 Binary files a/HotelAdmin/build/src/Imagenes/fondoBlanco.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/inputText.png b/HotelAdmin/build/src/Imagenes/inputText.png deleted file mode 100644 index 1e17011..0000000 Binary files a/HotelAdmin/build/src/Imagenes/inputText.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/panel-azul.png b/HotelAdmin/build/src/Imagenes/panel-azul.png deleted file mode 100644 index a1ff3ff..0000000 Binary files a/HotelAdmin/build/src/Imagenes/panel-azul.png and /dev/null differ diff --git a/HotelAdmin/build/src/Imagenes/seleccion-eliminar.png b/HotelAdmin/build/src/Imagenes/seleccion-eliminar.png deleted file mode 100644 index 5bdd7c3..0000000 Binary files a/HotelAdmin/build/src/Imagenes/seleccion-eliminar.png and /dev/null differ diff --git a/HotelAdmin/build/src/Modelo/Cliente.java b/HotelAdmin/build/src/Modelo/Cliente.java deleted file mode 100644 index 9d5d21f..0000000 --- a/HotelAdmin/build/src/Modelo/Cliente.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Modelo; - -/** - * - * @author Leonardo - */ -public class Cliente extends Persona{ - private String usuario, contraseña; -} diff --git a/HotelAdmin/build/src/Modelo/Empleado.java b/HotelAdmin/build/src/Modelo/Empleado.java deleted file mode 100644 index 172aaf1..0000000 --- a/HotelAdmin/build/src/Modelo/Empleado.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Modelo; - -/** - * * @author Leonardo - */ -public class Empleado extends Persona { - private int codigoEmpleado; - private String cargo; - -} diff --git a/HotelAdmin/build/src/Modelo/Habitacion.java b/HotelAdmin/build/src/Modelo/Habitacion.java deleted file mode 100644 index 95e7f4f..0000000 --- a/HotelAdmin/build/src/Modelo/Habitacion.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Modelo; - -/** - * - * @author Leonardo - */ -public class Habitacion { - private int numero_habitacion, precio, numero_camas, numero_piso; -} - diff --git a/HotelAdmin/build/src/Modelo/Ingreso.java b/HotelAdmin/build/src/Modelo/Ingreso.java deleted file mode 100644 index d341cbf..0000000 --- a/HotelAdmin/build/src/Modelo/Ingreso.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Modelo; - -/** - * - * @author Leonardo - */ -public class Ingreso { - private int codigo_ingreso, cantidad_personas; - private Habitacion unaHabitacion; - private Cliente unCliente; - private Reserva unaReserva; -} diff --git a/HotelAdmin/build/src/Modelo/Pago.java b/HotelAdmin/build/src/Modelo/Pago.java deleted file mode 100644 index a602136..0000000 --- a/HotelAdmin/build/src/Modelo/Pago.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Modelo; - -import java.sql.Timestamp; - -/** - * - * @author Leonardo - */ -public class Pago { - private String formaPago, concepto_pago; - private Timestamp fecha_pago; - private int numero_factura, valor_total; - private Cliente unCliente; - private Empleado unEmpleado; -} diff --git a/HotelAdmin/build/src/Modelo/Persona.java b/HotelAdmin/build/src/Modelo/Persona.java deleted file mode 100644 index 5641325..0000000 --- a/HotelAdmin/build/src/Modelo/Persona.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Modelo; - -/** - * - * @author Leonardo - */ -public class Persona { - protected int ID; - protected String nombre, correo, telefono, direccion; - -} diff --git a/HotelAdmin/build/src/Modelo/Reserva.java b/HotelAdmin/build/src/Modelo/Reserva.java deleted file mode 100644 index 5ddc0ca..0000000 --- a/HotelAdmin/build/src/Modelo/Reserva.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Modelo; - -import java.sql.Timestamp; - -/** - * - * @author Leonardo - */ -public class Reserva { - - private int numero_reserva, dias_estancia; - private Timestamp fecha_reserva, fecha_ingreso, fecha_salida; - private Habitacion unaHabitacion; - private Cliente unCliente; -} diff --git a/HotelAdmin/build/src/Servicios/hello b/HotelAdmin/build/src/Servicios/hello deleted file mode 100644 index f2aa86d..0000000 --- a/HotelAdmin/build/src/Servicios/hello +++ /dev/null @@ -1 +0,0 @@ -hello diff --git a/HotelAdmin/build/src/Vistas/Jframe/Habitacion.form b/HotelAdmin/build/src/Vistas/Jframe/Habitacion.form deleted file mode 100644 index 39a48a3..0000000 --- a/HotelAdmin/build/src/Vistas/Jframe/Habitacion.form +++ /dev/null @@ -1,309 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/HotelAdmin/build/src/Vistas/Jframe/Habitacion.java b/HotelAdmin/build/src/Vistas/Jframe/Habitacion.java deleted file mode 100644 index cb8309d..0000000 --- a/HotelAdmin/build/src/Vistas/Jframe/Habitacion.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Vistas.Jframe; - -import Vistas.Jpanel.HabitacionAgregarModificarGUI; -import java.awt.Toolkit; - -/** - * - * @author nicol - */ -public class Habitacion extends javax.swing.JFrame { - - /** - * Creates new form Habitación - */ - public Habitacion() { - super( "Administrador"); - initComponents(); - setResizable(false); - this.setLocationRelativeTo(null); - setIconImage(Toolkit.getDefaultToolkit().getImage(this.getClass() - .getResource("/imagenes/Logo.png"))); - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - jPanel1 = new javax.swing.JPanel(); - jPcontenedor = new javax.swing.JPanel(); - jBhabitaciones = new javax.swing.JButton(); - jBclientes = new javax.swing.JButton(); - jBempleados = new javax.swing.JButton(); - jBcerrarSesion = new javax.swing.JButton(); - jBagregar = new javax.swing.JButton(); - jBeliminar = new javax.swing.JButton(); - jBmodificar = new javax.swing.JButton(); - jLmenuCrud = new javax.swing.JLabel(); - jLfondoGris = new javax.swing.JLabel(); - jLfondoAzul = new javax.swing.JLabel(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - - jPanel1.setBackground(new java.awt.Color(241, 242, 246)); - jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - - jPcontenedor.setOpaque(false); - jPcontenedor.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - jPanel1.add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 180, 730, 420)); - - jBhabitaciones.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/SinSelección-habi.png"))); // NOI18N - jBhabitaciones.setBorder(null); - jBhabitaciones.setBorderPainted(false); - jBhabitaciones.setContentAreaFilled(false); - jBhabitaciones.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBhabitaciones.setMargin(new java.awt.Insets(0, 0, 0, 0)); - jBhabitaciones.setMaximumSize(new java.awt.Dimension(0, 0)); - jBhabitaciones.setMinimumSize(new java.awt.Dimension(0, 0)); - jBhabitaciones.setPreferredSize(new java.awt.Dimension(0, 129)); - jBhabitaciones.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-habi.png"))); // NOI18N - jBhabitaciones.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBhabitacionesActionPerformed(evt); - } - }); - jPanel1.add(jBhabitaciones, new org.netbeans.lib.awtextra.AbsoluteConstraints(24, 150, 260, -1)); - - jBclientes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Sinseleccion-cli.png"))); // NOI18N - jBclientes.setBorder(null); - jBclientes.setBorderPainted(false); - jBclientes.setContentAreaFilled(false); - jBclientes.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBclientes.setMargin(new java.awt.Insets(0, 0, 0, 0)); - jBclientes.setMaximumSize(new java.awt.Dimension(0, 0)); - jBclientes.setMinimumSize(new java.awt.Dimension(0, 0)); - jBclientes.setPreferredSize(new java.awt.Dimension(0, 129)); - jBclientes.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-cli.png"))); // NOI18N - jBclientes.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBclientesActionPerformed(evt); - } - }); - jPanel1.add(jBclientes, new org.netbeans.lib.awtextra.AbsoluteConstraints(24, 249, 260, 130)); - - jBempleados.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/SinSeleccionar-emp.png"))); // NOI18N - jBempleados.setBorder(null); - jBempleados.setBorderPainted(false); - jBempleados.setContentAreaFilled(false); - jBempleados.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBempleados.setMargin(new java.awt.Insets(0, 0, 0, 0)); - jBempleados.setMaximumSize(new java.awt.Dimension(0, 0)); - jBempleados.setMinimumSize(new java.awt.Dimension(0, 0)); - jBempleados.setPreferredSize(new java.awt.Dimension(0, 129)); - jBempleados.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-empl_1.png"))); // NOI18N - jBempleados.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBempleadosActionPerformed(evt); - } - }); - jPanel1.add(jBempleados, new org.netbeans.lib.awtextra.AbsoluteConstraints(24, 355, 260, -1)); - - jBcerrarSesion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/botonSalida.png"))); // NOI18N - jBcerrarSesion.setBorder(null); - jBcerrarSesion.setBorderPainted(false); - jBcerrarSesion.setContentAreaFilled(false); - jBcerrarSesion.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBcerrarSesion.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBcerrarSesionActionPerformed(evt); - } - }); - jPanel1.add(jBcerrarSesion, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 590, -1, -1)); - - jBagregar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-agregarGris.png"))); // NOI18N - jBagregar.setBorder(null); - jBagregar.setBorderPainted(false); - jBagregar.setContentAreaFilled(false); - jBagregar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBagregar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-agregar.png"))); // NOI18N - jBagregar.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBagregarActionPerformed(evt); - } - }); - jPanel1.add(jBagregar, new org.netbeans.lib.awtextra.AbsoluteConstraints(576, 97, -1, -1)); - - jBeliminar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-eliminarGris.png"))); // NOI18N - jBeliminar.setBorder(null); - jBeliminar.setBorderPainted(false); - jBeliminar.setContentAreaFilled(false); - jBeliminar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBeliminar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/seleccion-eliminar.png"))); // NOI18N - jPanel1.add(jBeliminar, new org.netbeans.lib.awtextra.AbsoluteConstraints(756, 97, 100, 40)); - - jBmodificar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-modificarGris.png"))); // NOI18N - jBmodificar.setBorder(null); - jBmodificar.setBorderPainted(false); - jBmodificar.setContentAreaFilled(false); - jBmodificar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBmodificar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-modificar.png"))); // NOI18N - jPanel1.add(jBmodificar, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 97, 90, -1)); - - jLmenuCrud.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Menu-crud.png"))); // NOI18N - jPanel1.add(jLmenuCrud, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 90, -1, -1)); - - jLfondoGris.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/fondo-principal.png"))); // NOI18N - jPanel1.add(jLfondoGris, new org.netbeans.lib.awtextra.AbsoluteConstraints(218, 0, 900, 690)); - - jLfondoAzul.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/panel-azul.png"))); // NOI18N - jPanel1.add(jLfondoAzul, new org.netbeans.lib.awtextra.AbsoluteConstraints(-10, 0, 290, 690)); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 680, Short.MAX_VALUE) - ); - - pack(); - }// //GEN-END:initComponents - - private void jBhabitacionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBhabitacionesActionPerformed - // TODO add your handling code here: - jBhabitaciones.setEnabled(true); - }//GEN-LAST:event_jBhabitacionesActionPerformed - - private void jBclientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBclientesActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_jBclientesActionPerformed - - private void jBempleadosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBempleadosActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_jBempleadosActionPerformed - - private void jBagregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBagregarActionPerformed - // TODO add your handling code here: - - /* HabitacionAgregarModificarGUI panelAM = new HabitacionAgregarModificarGUI(); - - jPcontenedor.setSize(735,429); - jPcontenedor.removeAll(); - jPcontenedor.add(panelAM); - jPcontenedor.revalidate(); - jPcontenedor.repaint();*/ - - }//GEN-LAST:event_jBagregarActionPerformed - - private void jBcerrarSesionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcerrarSesionActionPerformed - // TODO add your handling code here: - setVisible(false); - new Login().setVisible(true); - }//GEN-LAST:event_jBcerrarSesionActionPerformed - - /** - * @param args the command line arguments - */ - public static void main(String args[]) { - /* Set the Nimbus look and feel */ - // - /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. - * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html - */ - try { - for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { - if ("Nimbus".equals(info.getName())) { - javax.swing.UIManager.setLookAndFeel(info.getClassName()); - break; - } - } - } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(Habitacion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(Habitacion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(Habitacion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(Habitacion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } - // - // - - /* Create and display the form */ - java.awt.EventQueue.invokeLater(new Runnable() { - public void run() { - new Habitacion().setVisible(true); - } - }); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JButton jBagregar; - private javax.swing.JButton jBcerrarSesion; - private javax.swing.JButton jBclientes; - private javax.swing.JButton jBeliminar; - private javax.swing.JButton jBempleados; - private javax.swing.JButton jBhabitaciones; - private javax.swing.JButton jBmodificar; - private javax.swing.JLabel jLfondoAzul; - private javax.swing.JLabel jLfondoGris; - private javax.swing.JLabel jLmenuCrud; - private javax.swing.JPanel jPanel1; - private javax.swing.JPanel jPcontenedor; - // End of variables declaration//GEN-END:variables -} diff --git a/HotelAdmin/build/src/Vistas/Jframe/Login.form b/HotelAdmin/build/src/Vistas/Jframe/Login.form deleted file mode 100644 index 829a567..0000000 --- a/HotelAdmin/build/src/Vistas/Jframe/Login.form +++ /dev/null @@ -1,609 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/HotelAdmin/build/src/Vistas/Jframe/Login.java b/HotelAdmin/build/src/Vistas/Jframe/Login.java deleted file mode 100644 index 7c338ed..0000000 --- a/HotelAdmin/build/src/Vistas/Jframe/Login.java +++ /dev/null @@ -1,758 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Vistas.Jframe; - -import java.awt.Toolkit; -import java.awt.event.KeyEvent; -import javax.swing.JOptionPane; -import Vistas.Jframe.Habitacion; -/** - * - * @author nicol - */ -public class Login extends javax.swing.JFrame { - - /** - * Creates new form Login - */ - public Login() { - super( "Login" ); - initComponents(); - jPRegistro.setVisible(false); - this.setLocationRelativeTo(null); - setIconImage(Toolkit.getDefaultToolkit(). - getImage(this.getClass().getResource("/imagenes/Logo.png"))); - setResizable(false); - } - - public void ingresar(){ //-------------------------------------------- _Verifica los campos para procionar el acceso dependiendo del tipo de usuario - try{ - - - String usuario=jTusername .getText(); - String contraseña=jPcontraseña.getText(); - if(usuario.equalsIgnoreCase("") ||contraseña.equalsIgnoreCase("")){ - - JOptionPane.showMessageDialog(null, "Campos vacios"); - }else - if(usuario.equalsIgnoreCase("admin") && - contraseña.equalsIgnoreCase("admin")) - { - - Habitacion hab = new Habitacion(); - hab.setVisible(true); - dispose(); - } else { - JOptionPane.showMessageDialog(null, - "Usuario o contraseña incorrecta"); - //----------------------------------------------------------------------------------------- Aqui debe ir el codigo para validar una contraseña y acceder al menu de empleados - } - - - }catch(Exception ex){ - JOptionPane.showMessageDialog( - null,"Ah ocurrido un error durante la verificacion " - + "\nError :" + ex.getMessage()); - - } - } - public void registrar(){//----------------PERMITE REGISTRAR UN NUEVO USUARIO DE LA BASE DE DATOS - try{ - String usuario = jTusuario .getText(); - String contraseña = jPcontraseñaRe.getText(); - String telefono = jTtelefono.getText(); - String nombre = jTnombre.getText(); - String direccion = jTdireccion.getText(); - String correo = jTcorreo.getText(); - String cedula = jTcedula.getText(); - String cargo = jTcargo.getText(); - - if(usuario.equalsIgnoreCase("Usuario") - ||contraseña.equalsIgnoreCase("Contraseña") - ||telefono.equalsIgnoreCase("Telefono") - ||nombre.equalsIgnoreCase("Nombre") - ||direccion.equalsIgnoreCase("Direccion") - ||correo.equalsIgnoreCase("Correo") - ||cedula.equalsIgnoreCase("Cedula") - ||cargo.equalsIgnoreCase("Cargo")){ - - JOptionPane.showMessageDialog(null,"Hay campos vacios!"); - }else { - JOptionPane.showMessageDialog(null,"¡Se ha registrado con exito!"); - } - }catch(Exception ex){ - JOptionPane.showMessageDialog(null - ,"Ah ocurrido un error durante la verificacion "+ "\nError :" - + ex.getMessage()); - - } - } - public void enter(KeyEvent evt){//------------------------------------------------------------------------------Al hacer enter se accede - int key = evt.getKeyCode(); - if(key == KeyEvent.VK_ENTER){ - ingresar(); - } - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - jInternalFrame1 = new javax.swing.JInternalFrame(); - jPanel1 = new javax.swing.JPanel(); - jBinicia = new javax.swing.JButton(); - jBregistrar = new javax.swing.JButton(); - Menu = new javax.swing.JLabel(); - jLlogo = new javax.swing.JLabel(); - jPRegistro = new javax.swing.JPanel(); - jTdireccion = new javax.swing.JTextField(); - jTcedula = new javax.swing.JTextField(); - jTtelefono = new javax.swing.JTextField(); - jTcorreo = new javax.swing.JTextField(); - jTnombre = new javax.swing.JTextField(); - jTcargo = new javax.swing.JTextField(); - jTusuario = new javax.swing.JTextField(); - jPcontraseñaRe = new javax.swing.JPasswordField(); - jBrgistrar = new javax.swing.JButton(); - jLabel2 = new javax.swing.JLabel(); - jLabel3 = new javax.swing.JLabel(); - jLabel4 = new javax.swing.JLabel(); - jLabel5 = new javax.swing.JLabel(); - jLabel6 = new javax.swing.JLabel(); - jLabel8 = new javax.swing.JLabel(); - jLabel7 = new javax.swing.JLabel(); - jLabel9 = new javax.swing.JLabel(); - jLfondo1 = new javax.swing.JLabel(); - jPiniciarSesion = new javax.swing.JPanel(); - jPcontraseña = new javax.swing.JPasswordField(); - jTusername = new javax.swing.JTextField(); - jLinput = new javax.swing.JLabel(); - jBiniciarSesion = new javax.swing.JButton(); - jLfondo = new javax.swing.JLabel(); - - jInternalFrame1.setVisible(true); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - - jPanel1.setBackground(new java.awt.Color(69, 170, 242)); - jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - - jBinicia.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Iniciar-sinselect.png"))); // NOI18N - jBinicia.setBorder(null); - jBinicia.setContentAreaFilled(false); - jBinicia.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBinicia.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Iniciar-select.png"))); // NOI18N - jBinicia.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBiniciaActionPerformed(evt); - } - }); - jPanel1.add(jBinicia, new org.netbeans.lib.awtextra.AbsoluteConstraints(429, 253, -1, -1)); - - jBregistrar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Registrar-sinselect.png"))); // NOI18N - jBregistrar.setBorder(null); - jBregistrar.setContentAreaFilled(false); - jBregistrar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBregistrar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Registrar-select.png"))); // NOI18N - jBregistrar.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBregistrarActionPerformed(evt); - } - }); - jPanel1.add(jBregistrar, new org.netbeans.lib.awtextra.AbsoluteConstraints(562, 253, -1, -1)); - - Menu.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Menu-Inicio.png"))); // NOI18N - jPanel1.add(Menu, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 250, -1, 60)); - - jLlogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Logo.png"))); // NOI18N - jPanel1.add(jLlogo, new org.netbeans.lib.awtextra.AbsoluteConstraints(505, 59, -1, -1)); - - jPRegistro.setBackground(new java.awt.Color(69, 170, 242)); - jPRegistro.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - - jTdireccion.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTdireccion.setForeground(new java.awt.Color(204, 204, 204)); - jTdireccion.setText("Dirección"); - jTdireccion.setBorder(null); - jTdireccion.setOpaque(false); - jTdireccion.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTdireccionFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - jTdireccionFocusLost(evt); - } - }); - jTdireccion.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jTdireccionActionPerformed(evt); - } - }); - jPRegistro.add(jTdireccion, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 230, 190, 30)); - - jTcedula.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTcedula.setForeground(new java.awt.Color(204, 204, 204)); - jTcedula.setText("Cédula"); - jTcedula.setBorder(null); - jTcedula.setOpaque(false); - jTcedula.setSelectedTextColor(new java.awt.Color(69, 170, 242)); - jTcedula.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTcedulaFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - jTcedulaFocusLost(evt); - } - }); - jTcedula.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jTcedulaActionPerformed(evt); - } - }); - jPRegistro.add(jTcedula, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 130, 190, 30)); - - jTtelefono.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTtelefono.setForeground(new java.awt.Color(204, 204, 204)); - jTtelefono.setText("Télefono"); - jTtelefono.setBorder(null); - jTtelefono.setOpaque(false); - jTtelefono.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTtelefonoFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - jTtelefonoFocusLost(evt); - } - }); - jTtelefono.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jTtelefonoActionPerformed(evt); - } - }); - jPRegistro.add(jTtelefono, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 180, 190, 30)); - - jTcorreo.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTcorreo.setForeground(new java.awt.Color(204, 204, 204)); - jTcorreo.setText("Correo"); - jTcorreo.setBorder(null); - jTcorreo.setOpaque(false); - jTcorreo.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTcorreoFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - jTcorreoFocusLost(evt); - } - }); - jTcorreo.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jTcorreoActionPerformed(evt); - } - }); - jPRegistro.add(jTcorreo, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 230, 190, 30)); - - jTnombre.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTnombre.setForeground(new java.awt.Color(204, 204, 204)); - jTnombre.setText("Nombre"); - jTnombre.setBorder(null); - jTnombre.setOpaque(false); - jTnombre.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTnombreFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - jTnombreFocusLost(evt); - } - }); - jTnombre.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jTnombreActionPerformed(evt); - } - }); - jPRegistro.add(jTnombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 130, 190, 30)); - - jTcargo.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTcargo.setForeground(new java.awt.Color(204, 204, 204)); - jTcargo.setText("Cargo"); - jTcargo.setBorder(null); - jTcargo.setOpaque(false); - jTcargo.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTcargoFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - jTcargoFocusLost(evt); - } - }); - jTcargo.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jTcargoActionPerformed(evt); - } - }); - jPRegistro.add(jTcargo, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 180, 190, 30)); - - jTusuario.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTusuario.setForeground(new java.awt.Color(204, 204, 204)); - jTusuario.setText("Usuario"); - jTusuario.setBorder(null); - jTusuario.setOpaque(false); - jTusuario.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTusuarioFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - jTusuarioFocusLost(evt); - } - }); - jTusuario.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jTusuarioActionPerformed(evt); - } - }); - jPRegistro.add(jTusuario, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 280, 190, 30)); - - jPcontraseñaRe.setFont(new java.awt.Font("Decker", 0, 14)); - jPcontraseñaRe.setForeground(new java.awt.Color(204, 204, 204)); - jPcontraseñaRe.setText("Contraseña"); - jPcontraseñaRe. setEchoChar((char)0); - jPcontraseñaRe.setBorder(null); - jPcontraseñaRe.setOpaque(false); - jPcontraseñaRe.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jPcontraseñaReFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - jPcontraseñaReFocusLost(evt); - } - }); - jPcontraseñaRe.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jPcontraseñaReActionPerformed(evt); - } - }); - jPRegistro.add(jPcontraseñaRe, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 280, 200, 30)); - - jBrgistrar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Registro-select.png"))); // NOI18N - jBrgistrar.setBorder(null); - jBrgistrar.setContentAreaFilled(false); - jBrgistrar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBrgistrar.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBrgistrarActionPerformed(evt); - } - }); - jPRegistro.add(jBrgistrar, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 340, -1, -1)); - - jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N - jPRegistro.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 220, -1, -1)); - - jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N - jPRegistro.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 120, -1, -1)); - - jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N - jPRegistro.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 170, -1, -1)); - - jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N - jPRegistro.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 270, -1, -1)); - - jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N - jPRegistro.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 120, -1, -1)); - - jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N - jPRegistro.add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 170, -1, -1)); - - jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N - jPRegistro.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 220, -1, -1)); - - jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N - jPRegistro.add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 270, -1, -1)); - - jLfondo1.setBackground(new java.awt.Color(69, 170, 242)); - jLfondo1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Fondo-registro.png"))); // NOI18N - jLfondo1.setAlignmentX(327.0F); - jLfondo1.setAlignmentY(208.0F); - jLfondo1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); - jPRegistro.add(jLfondo1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, 660, -1)); - - jPanel1.add(jPRegistro, new org.netbeans.lib.awtextra.AbsoluteConstraints(227, 208, 680, 440)); - - jPiniciarSesion.setBackground(new java.awt.Color(69, 170, 242)); - jPiniciarSesion.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - - jPcontraseña.setFont(new java.awt.Font("Quicksand", 0, 18)); // NOI18N - jPcontraseña.setEchoChar((char)0); - jPcontraseña.setForeground(new java.awt.Color(204, 204, 204)); - jPcontraseña.setText("Contraseña"); - jPcontraseña.setBorder(null); - jPcontraseña.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jPcontraseñaFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - jPcontraseñaFocusLost(evt); - } - }); - jPcontraseña.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jPcontraseñaActionPerformed(evt); - } - }); - jPcontraseña.addKeyListener(new java.awt.event.KeyAdapter() { - public void keyPressed(java.awt.event.KeyEvent evt) { - jPcontraseñaKeyPressed(evt); - } - }); - jPiniciarSesion.add(jPcontraseña, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 210, 260, 20)); - - jTusername.setFont(new java.awt.Font("Quicksand", 0, 18)); // NOI18N - jTusername.setForeground(new java.awt.Color(204, 204, 204)); - jTusername.setText("Usuario"); - jTusername.setBorder(null); - jTusername.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTusernameFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - jTusernameFocusLost(evt); - } - }); - jTusername.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jTusernameActionPerformed(evt); - } - }); - jPiniciarSesion.add(jTusername, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 150, 270, 20)); - - jLinput.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Input.png"))); // NOI18N - jPiniciarSesion.add(jLinput, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 120, -1, -1)); - - jBiniciarSesion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/IniciarSesión-select.png"))); // NOI18N - jBiniciarSesion.setBorder(null); - jBiniciarSesion.setContentAreaFilled(false); - jBiniciarSesion.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBiniciarSesion.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBiniciarSesionActionPerformed(evt); - } - }); - jPiniciarSesion.add(jBiniciarSesion, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 250, -1, -1)); - - jLfondo.setBackground(new java.awt.Color(69, 170, 242)); - jLfondo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Fondo-login.png"))); // NOI18N - jLfondo.setAlignmentX(327.0F); - jLfondo.setAlignmentY(208.0F); - jLfondo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); - jPiniciarSesion.add(jLfondo, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1)); - - jPanel1.add(jPiniciarSesion, new org.netbeans.lib.awtextra.AbsoluteConstraints(327, 208, -1, 370)); - - getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1118, 680)); - - pack(); - }// //GEN-END:initComponents - - private void jPcontraseñaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jPcontraseñaActionPerformed - jPcontraseña.selectAll(); - }//GEN-LAST:event_jPcontraseñaActionPerformed - - private void jBiniciaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBiniciaActionPerformed - // TODO add your handling code here: - jPRegistro.setVisible(false); - jPiniciarSesion.setVisible(true); - }//GEN-LAST:event_jBiniciaActionPerformed - - private void jBregistrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBregistrarActionPerformed - // TODO add your handling code here: - jPiniciarSesion.setVisible(false); - jPRegistro.setVisible(true); - - }//GEN-LAST:event_jBregistrarActionPerformed - - private void jTtelefonoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTtelefonoActionPerformed - jTtelefono.selectAll(); - }//GEN-LAST:event_jTtelefonoActionPerformed - - private void jTcedulaFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcedulaFocusGained - // TODO add your handling code here: - jTcedula.setText(""); - jTcedula.setForeground(new java.awt.Color(0, 0, 0)); - }//GEN-LAST:event_jTcedulaFocusGained - - private void jTtelefonoFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTtelefonoFocusGained - // TODO add your handling code here: - jTtelefono.setText(""); - jTtelefono.setForeground(new java.awt.Color(0, 0, 0)); - }//GEN-LAST:event_jTtelefonoFocusGained - - private void jTcorreoFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcorreoFocusGained - // TODO add your handling code here: - jTcorreo.setText(""); - jTcorreo.setForeground(new java.awt.Color(0, 0, 0)); - }//GEN-LAST:event_jTcorreoFocusGained - - private void jTnombreFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTnombreFocusGained - // TODO add your handling code here: - jTnombre.setText(""); - jTnombre.setForeground(new java.awt.Color(0, 0, 0)); - }//GEN-LAST:event_jTnombreFocusGained - - private void jTcargoFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcargoFocusGained - // TODO add your handling code here: - jTcargo.setText(""); - jTcargo.setForeground(new java.awt.Color(0, 0, 0)); - }//GEN-LAST:event_jTcargoFocusGained - - private void jTdireccionFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTdireccionFocusGained - // TODO add your handling code here: - jTdireccion.setText(""); - jTdireccion.setForeground(new java.awt.Color(0, 0, 0)); - }//GEN-LAST:event_jTdireccionFocusGained - - private void jTcedulaFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcedulaFocusLost - // TODO add your handling code here: - if(jTcedula.getText().equalsIgnoreCase("")){ - jTcedula.setForeground(new java.awt.Color(204, 204, 204)); - jTcedula.setText("Cédula"); - } - }//GEN-LAST:event_jTcedulaFocusLost - - private void jTtelefonoFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTtelefonoFocusLost - // TODO add your handling code here: - if(jTtelefono.getText().equalsIgnoreCase("")){ - jTtelefono.setText("Teléfono"); - jTtelefono.setForeground(new java.awt.Color(204, 204, 204)); - } - }//GEN-LAST:event_jTtelefonoFocusLost - - private void jTcorreoFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcorreoFocusLost - // TODO add your handling code here: - if(jTcorreo.getText().equalsIgnoreCase("")){ - jTcorreo.setText("Correo eléctronico"); - jTcorreo.setForeground(new java.awt.Color(204, 204, 204)); - } - }//GEN-LAST:event_jTcorreoFocusLost - - private void jTnombreFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTnombreFocusLost - // TODO add your handling code here: - if(jTnombre.getText().equalsIgnoreCase("")){ - jTnombre.setText("Nombre"); - jTnombre.setForeground(new java.awt.Color(204, 204, 204)); - } - }//GEN-LAST:event_jTnombreFocusLost - - private void jTcargoFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcargoFocusLost - // TODO add your handling code here: - if(jTcargo.getText().equalsIgnoreCase("")){ - jTcargo.setText("Cargo"); - jTcargo.setForeground(new java.awt.Color(204, 204, 204)); - } - }//GEN-LAST:event_jTcargoFocusLost - - private void jTdireccionFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTdireccionFocusLost - // TODO add your handling code here: - if(jTdireccion.getText().equalsIgnoreCase("")){ - jTdireccion.setText("Dirección"); - jTdireccion.setForeground(new java.awt.Color(204, 204, 204)); - } - }//GEN-LAST:event_jTdireccionFocusLost - - private void jBrgistrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBrgistrarActionPerformed - registrar(); - - }//GEN-LAST:event_jBrgistrarActionPerformed - - private void jTusernameFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTusernameFocusGained - // TODO add your handling code here: - - jTusername.setText(""); - jTusername.setForeground(new java.awt.Color(0, 0, 0)); - - }//GEN-LAST:event_jTusernameFocusGained - - private void jTusernameFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTusernameFocusLost - // TODO add your handling code here: - if(jTusername.getText().equalsIgnoreCase("")){ - jTusername.setForeground(new java.awt.Color(204, 204, 204)); - jTusername.setText("Usuario"); - } - - }//GEN-LAST:event_jTusernameFocusLost - - private void jPcontraseñaFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jPcontraseñaFocusGained - // TODO add your handling code here: - jPcontraseña.setForeground(new java.awt.Color(0, 0, 0)); - jPcontraseña.setText(""); - jPcontraseña.setEchoChar((char)1); - jPcontraseña.setFont(new java.awt.Font("Arial", 0, 18)); - }//GEN-LAST:event_jPcontraseñaFocusGained - - private void jPcontraseñaFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jPcontraseñaFocusLost - // TODO add your handling code here: - if(jPcontraseña.getText().equalsIgnoreCase("")){ - jPcontraseña.setFont(new java.awt.Font("Quicksand", 0, 18)); - jPcontraseña.setForeground(new java.awt.Color(204, 204, 204)); - jPcontraseña.setText("Contraseña"); - jPcontraseña.setEchoChar((char)0); - } - }//GEN-LAST:event_jPcontraseñaFocusLost - - private void jBiniciarSesionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBiniciarSesionActionPerformed - - if(jTusuario.getText().equalsIgnoreCase("") - || jTcargo.getText().equalsIgnoreCase("")){ - - JOptionPane.showMessageDialog(null, "Campos vacios");}else{ - //-------------------------------------------------------------------------------------------BOTON ACCEDER - - ingresar(); - } - - }//GEN-LAST:event_jBiniciarSesionActionPerformed - - private void jTusuarioFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTusuarioFocusGained - // TODO add your handling code here: - jTusuario.setForeground(new java.awt.Color(0, 0, 0)); - jTusuario.setText(""); - - }//GEN-LAST:event_jTusuarioFocusGained - - private void jTusuarioFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTusuarioFocusLost - // TODO add your handling code here: - if(jTusuario.getText().equalsIgnoreCase("")){ - jTusuario.setForeground(new java.awt.Color(204, 204, 204)); - jTusuario.setText("Usuario"); - } - - }//GEN-LAST:event_jTusuarioFocusLost - - private void jPcontraseñaReFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jPcontraseñaReFocusGained - // TODO add your handling code here: - jPcontraseñaRe.setForeground(new java.awt.Color(0, 0, 0)); - jPcontraseñaRe.setText(""); - jPcontraseñaRe.setEchoChar((char)1); - }//GEN-LAST:event_jPcontraseñaReFocusGained - - private void jPcontraseñaReFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jPcontraseñaReFocusLost - // TODO add your handling code here: - if(jPcontraseñaRe.getText().equalsIgnoreCase("")){ - jPcontraseñaRe.setForeground(new java.awt.Color(204, 204, 204)); - jPcontraseñaRe.setText("Contraseña"); - jPcontraseñaRe.setEchoChar((char)0); - } - }//GEN-LAST:event_jPcontraseñaReFocusLost - - private void jTusernameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTusernameActionPerformed - jTusername.selectAll(); - }//GEN-LAST:event_jTusernameActionPerformed - - private void jPcontraseñaKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jPcontraseñaKeyPressed - enter(evt); - }//GEN-LAST:event_jPcontraseñaKeyPressed - - private void jTcedulaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTcedulaActionPerformed - jTcedula.selectAll(); - }//GEN-LAST:event_jTcedulaActionPerformed - - private void jTnombreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTnombreActionPerformed - jTnombre.selectAll(); - }//GEN-LAST:event_jTnombreActionPerformed - - private void jTcargoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTcargoActionPerformed - jTcargo.selectAll(); - }//GEN-LAST:event_jTcargoActionPerformed - - private void jTcorreoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTcorreoActionPerformed - jTcorreo.selectAll(); - }//GEN-LAST:event_jTcorreoActionPerformed - - private void jTdireccionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTdireccionActionPerformed - jTdireccion.selectAll(); - }//GEN-LAST:event_jTdireccionActionPerformed - - private void jTusuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTusuarioActionPerformed - jTusuario.selectAll(); - }//GEN-LAST:event_jTusuarioActionPerformed - - private void jPcontraseñaReActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jPcontraseñaReActionPerformed - jPcontraseña.selectAll(); - }//GEN-LAST:event_jPcontraseñaReActionPerformed - - - /** - * @param args the command line arguments - */ - public static void main(String args[]) { - /* Set the Nimbus look and feel */ - // - /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. - * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html - */ - try { - for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { - if ("Nimbus".equals(info.getName())) { - javax.swing.UIManager.setLookAndFeel(info.getClassName()); - break; - } - } - } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } - // - - /* Create and display the form */ - java.awt.EventQueue.invokeLater(new Runnable() { - public void run() { - new Login().setVisible(true); - } - }); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JLabel Menu; - private javax.swing.JButton jBinicia; - private javax.swing.JButton jBiniciarSesion; - private javax.swing.JButton jBregistrar; - private javax.swing.JButton jBrgistrar; - private javax.swing.JInternalFrame jInternalFrame1; - private javax.swing.JLabel jLabel2; - private javax.swing.JLabel jLabel3; - private javax.swing.JLabel jLabel4; - private javax.swing.JLabel jLabel5; - private javax.swing.JLabel jLabel6; - private javax.swing.JLabel jLabel7; - private javax.swing.JLabel jLabel8; - private javax.swing.JLabel jLabel9; - private javax.swing.JLabel jLfondo; - private javax.swing.JLabel jLfondo1; - private javax.swing.JLabel jLinput; - private javax.swing.JLabel jLlogo; - private javax.swing.JPanel jPRegistro; - private javax.swing.JPanel jPanel1; - private javax.swing.JPasswordField jPcontraseña; - private javax.swing.JPasswordField jPcontraseñaRe; - private javax.swing.JPanel jPiniciarSesion; - private javax.swing.JTextField jTcargo; - private javax.swing.JTextField jTcedula; - private javax.swing.JTextField jTcorreo; - private javax.swing.JTextField jTdireccion; - private javax.swing.JTextField jTnombre; - private javax.swing.JTextField jTtelefono; - private javax.swing.JTextField jTusername; - private javax.swing.JTextField jTusuario; - // End of variables declaration//GEN-END:variables -} diff --git a/HotelAdmin/build/src/Vistas/Jframe/hello b/HotelAdmin/build/src/Vistas/Jframe/hello deleted file mode 100644 index f2aa86d..0000000 --- a/HotelAdmin/build/src/Vistas/Jframe/hello +++ /dev/null @@ -1 +0,0 @@ -hello diff --git a/HotelAdmin/build/src/Vistas/hello b/HotelAdmin/build/src/Vistas/hello deleted file mode 100644 index f2aa86d..0000000 --- a/HotelAdmin/build/src/Vistas/hello +++ /dev/null @@ -1 +0,0 @@ -hello diff --git a/HotelAdmin/build/src/hoteladmin/HotelAdmin.java b/HotelAdmin/build/src/hoteladmin/HotelAdmin.java deleted file mode 100644 index c85970f..0000000 --- a/HotelAdmin/build/src/hoteladmin/HotelAdmin.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package hoteladmin; - -import Vistas.Jframe.Login; -import java.awt.Toolkit; -import javax.swing.JFrame; -import static javax.swing.JFrame.EXIT_ON_CLOSE; - -/** - * - * @author Leonardo - */ -public class HotelAdmin{ - - - public static void main(String[] args) { - - Login inicio = new Login(); - inicio.setVisible(true); - inicio.setDefaultCloseOperation(EXIT_ON_CLOSE); - - } - -} diff --git a/HotelAdmin/dist/HotelAdmin.jar b/HotelAdmin/dist/HotelAdmin.jar deleted file mode 100644 index ef4ab9d..0000000 Binary files a/HotelAdmin/dist/HotelAdmin.jar and /dev/null differ diff --git a/HotelAdmin/dist/README.TXT b/HotelAdmin/dist/README.TXT deleted file mode 100644 index 8dabd15..0000000 --- a/HotelAdmin/dist/README.TXT +++ /dev/null @@ -1,32 +0,0 @@ -======================== -BUILD OUTPUT DESCRIPTION -======================== - -When you build an Java application project that has a main class, the IDE -automatically copies all of the JAR -files on the projects classpath to your projects dist/lib folder. The IDE -also adds each of the JAR files to the Class-Path element in the application -JAR files manifest file (MANIFEST.MF). - -To run the project from the command line, go to the dist folder and -type the following: - -java -jar "HotelAdmin.jar" - -To distribute this project, zip up the dist folder (including the lib folder) -and distribute the ZIP file. - -Notes: - -* If two JAR files on the project classpath have the same name, only the first -JAR file is copied to the lib folder. -* Only JAR files are copied to the lib folder. -If the classpath contains other types of files or folders, these files (folders) -are not copied. -* If a library on the projects classpath also has a Class-Path element -specified in the manifest,the content of the Class-Path element has to be on -the projects runtime path. -* To set a main class in a standard Java project, right-click the project node -in the Projects window and choose Properties. Then click Run and enter the -class name in the Main Class field. Alternatively, you can manually type the -class name in the manifest Main-Class element. diff --git a/HotelAdmin/build/build/classes/.netbeans_automatic_build b/HotelAdmin/nbproject/private/config.properties similarity index 100% rename from HotelAdmin/build/build/classes/.netbeans_automatic_build rename to HotelAdmin/nbproject/private/config.properties diff --git a/HotelAdmin/nbproject/private/private.properties b/HotelAdmin/nbproject/private/private.properties index 172ae17..f7f5bd6 100644 --- a/HotelAdmin/nbproject/private/private.properties +++ b/HotelAdmin/nbproject/private/private.properties @@ -1,2 +1,8 @@ -compile.on.save=true -user.properties.file=C:\\Users\\crist\\AppData\\Roaming\\NetBeans\\8.2\\build.properties +compile.on.save=true +do.depend=false +do.jar=true +file.reference.AbsoluteLayout.jar=C:\\Users\\vanes\\Desktop\\PROYECTO DESARROLLO\\Master\\Desarrollo\\HotelAdmin\\src\\Servicios\\AbsoluteLayout.jar +file.reference.jcalendar-1.4.jar=C:\\Users\\vanes\\Desktop\\PROYECTO DESARROLLO\\Master\\Desarrollo\\HotelAdmin\\src\\Servicios\\jcalendar-1.4.jar +javac.debug=true +javadoc.preview=true +user.properties.file=C:\\Users\\vanes\\AppData\\Roaming\\NetBeans\\8.2\\build.properties diff --git a/HotelAdmin/nbproject/private/private.xml b/HotelAdmin/nbproject/private/private.xml index 6807a2b..a609eb3 100644 --- a/HotelAdmin/nbproject/private/private.xml +++ b/HotelAdmin/nbproject/private/private.xml @@ -1,6 +1,15 @@ - + + + src/Servicios/jdbc.properties + + + 2 + + + + diff --git a/HotelAdmin/nbproject/project.properties b/HotelAdmin/nbproject/project.properties index 15ef5c9..e182c92 100644 --- a/HotelAdmin/nbproject/project.properties +++ b/HotelAdmin/nbproject/project.properties @@ -1,9 +1,10 @@ annotation.processing.enabled=true annotation.processing.enabled.in.editor=false -annotation.processing.processor.options= annotation.processing.processors.list= annotation.processing.run.all.processors=true annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=HotelAdmin +application.vendor=Usuario build.classes.dir=${build.dir}/classes build.classes.excludes=**/*.java,**/*.form # This directory is removed when the project is cleaned: @@ -30,11 +31,16 @@ dist.archive.excludes= dist.dir=dist dist.jar=${dist.dir}/HotelAdmin.jar dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= excludes= +file.reference.AbsoluteLayout.jar=C:\\Users\\Usuario\\Documents\\Ultima Desarrollo\\Desarrollo\\HotelAdmin\\src\\Servicios\\AbsoluteLayout.jar +file.reference.jcalendar-1.4.jar=C:\\Users\\Usuario\\Documents\\Ultima Desarrollo\\Desarrollo\\HotelAdmin\\src\\Servicios\\jcalendar-1.4.jar includes=** jar.compress=false javac.classpath=\ - ${libs.absolutelayout.classpath} + ${libs.PostgreSQLDriver.classpath}:\ + ${file.reference.AbsoluteLayout.jar}:\ + ${file.reference.jcalendar-1.4.jar} # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false diff --git a/HotelAdmin/src/Controladores/ControladorCheckout.java b/HotelAdmin/src/Controladores/ControladorCheckout.java new file mode 100644 index 0000000..59d2ddf --- /dev/null +++ b/HotelAdmin/src/Controladores/ControladorCheckout.java @@ -0,0 +1,79 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controladores; + +import Modelo.Checkout; +import Modelo.CheckoutDAO; +import java.io.BufferedWriter; +import java.io.FileWriter; +import java.io.IOException; +import java.sql.Timestamp; +import java.util.ArrayList; +import javax.swing.JOptionPane; + +/** + * + * @author crist + */ +public class ControladorCheckout { + public static int extraerId() + { + CheckoutDAO hd = new CheckoutDAO(); + return hd.extraerUltimoId(); + + } + public static int grabarChekout(Checkout c) + { + CheckoutDAO hd = new CheckoutDAO(); + c.setIdCheckout(extraerId()+1); + int resultado = hd.grabarCheckout(c); + return resultado; + } + public static Checkout getCheckout(int idcliente){ + CheckoutDAO cd = new CheckoutDAO(); + return cd.extraerCheckout(idcliente); + } + + public static void imprimirFactura(ArrayListinfo, int numf){ + FileWriter flwriter = null; + Timestamp fecha = new Timestamp(System.currentTimeMillis()); + try { + //crea el flujo para escribir en el archivo + flwriter = new FileWriter("Facturas//Factura Num. "+numf+".txt"); + //crea un buffer o flujo intermedio + //antes de escribir directamente en el archivo + BufferedWriter bfwriter = new BufferedWriter(flwriter); + bfwriter.write("--------------ADMIN H S.A.S----------------\n"); + bfwriter.write("Factura de hospedaje Numero: "+numf + +"\nFecha: "+fecha+"\n"); + bfwriter.write("-------------------------------------------\n"); + for (int i=0;i listClients(int id) + { + ArrayList clientList; + clientList = new ArrayList(); + ClientDAO clientes = new ClientDAO(); + clientList = clientes.listCliente(id); + return clientList; + } + + public static int modificarCliente(Cliente c) + { + ClientDAO clientDAO = new ClientDAO(); + int resultado = clientDAO.modifyClient(c); + return resultado; + } +} \ No newline at end of file diff --git a/HotelAdmin/src/Controladores/ControladorEmpleado.java b/HotelAdmin/src/Controladores/ControladorEmpleado.java new file mode 100644 index 0000000..bfd056d --- /dev/null +++ b/HotelAdmin/src/Controladores/ControladorEmpleado.java @@ -0,0 +1,44 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controladores; + +import Modelo.Empleado; +import Modelo.EmpleadoDAO; +import java.util.ArrayList; + +/** + * + * @author chris + */ +public class ControladorEmpleado { + public static int grabarEmpleado(Empleado c) + { + EmpleadoDAO empleadoDAO = new EmpleadoDAO(); + int resultado = empleadoDAO.grabarEmpleado(c); + return resultado; + } + + public static ArrayList listadoEmpleado(int id) + { + ArrayList listado; + listado = new ArrayList(); + EmpleadoDAO empleados = new EmpleadoDAO(); + listado = empleados.listadoEmpleado(id); + return listado; + } + + public static int modificarEmpleado(Empleado c) + { + EmpleadoDAO empleadoDAO = new EmpleadoDAO(); + int resultado =empleadoDAO.modificarEmpleado(c); + return resultado; + } + + + + + +} diff --git a/HotelAdmin/src/Controladores/ControladorHospedaje.java b/HotelAdmin/src/Controladores/ControladorHospedaje.java new file mode 100644 index 0000000..81d804e --- /dev/null +++ b/HotelAdmin/src/Controladores/ControladorHospedaje.java @@ -0,0 +1,57 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controladores; + +import Modelo.Hospedaje; +import Modelo.HospedajeDAO; +import java.util.ArrayList; + +/** + * + * @author crist + */ +public class ControladorHospedaje { + public static int extraerId() + { + HospedajeDAO hd = new HospedajeDAO(); + return hd.extraerUltimoId(); + + } + public static int grabarHospedaje(Hospedaje c) + { + HospedajeDAO hd = new HospedajeDAO(); + c.setIdHospedaje(extraerId()+1); + int resultado = hd.grabarHospedaje(c); + return resultado; + } + + public static ArrayList listadoHospedaje(int s) + { + ArrayList listado; + listado = new ArrayList(); + HospedajeDAO a = new HospedajeDAO(); + listado = a.listadoHospedaje(s); + return listado; + } + public static int borrarHospedaje(String s) + { + HospedajeDAO a = new HospedajeDAO(); + int resultado = a.borrarHospedaje(s); + return resultado; + } + public static int modificarHospedaje(Hospedaje c) + { + HospedajeDAO a = new HospedajeDAO(); + int resultado =a.modificarHospedaje(c); + return resultado; + } + public static int cambiarEstado(int idhospedaje) + { + HospedajeDAO a = new HospedajeDAO(); + int resultado =a.cambiarEstado(idhospedaje); + return resultado; + } +} diff --git a/HotelAdmin/src/Controladores/ControladorServiciosAdicionado.java b/HotelAdmin/src/Controladores/ControladorServiciosAdicionado.java new file mode 100644 index 0000000..526bd54 --- /dev/null +++ b/HotelAdmin/src/Controladores/ControladorServiciosAdicionado.java @@ -0,0 +1,21 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controladores; + +import Modelo.ServiciosAdicionado; +import Modelo.ServiciosAdicionadoDAO; +import java.util.ArrayList; + +/** + * + * @author crist + */ +public class ControladorServiciosAdicionado { + public static ArrayList listadoSH(int idcheckout){ + ServiciosAdicionadoDAO sad = new ServiciosAdicionadoDAO(); + return sad.listadoSH(idcheckout); + } +} diff --git a/HotelAdmin/src/Controladores/ControllerHabitacion.java b/HotelAdmin/src/Controladores/ControllerHabitacion.java new file mode 100644 index 0000000..756f47b --- /dev/null +++ b/HotelAdmin/src/Controladores/ControllerHabitacion.java @@ -0,0 +1,233 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controladores; + +import Vistas.Jframe.*; +import Vistas.Jpanel.*; +import Modelo.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Date; +import javax.swing.JOptionPane; +import javax.swing.JPanel; + +/** + * + * @author vanes + */ +public class ControllerHabitacion { + + Habitaciones vista; + //HabitacionListaGUI vista_actualizar_eliminar; + HabitacionDAO modelo; + int id_seleccionado; + + public ControllerHabitacion(Habitaciones vista_agregar, HabitacionDAO modelo) { + + this.vista = vista_agregar; + this.modelo = modelo; + + HabitacionListener manejadoreventos = new HabitacionListener(); + this.vista.getPanelAgregar().getjBcancelar().addActionListener(manejadoreventos); + + this.vista.getjBagregar().addActionListener(manejadoreventos); + this.vista.getjBmodificar().addActionListener(manejadoreventos); + this.vista.getjBeliminar().addActionListener(manejadoreventos); + } + //-------------------------------------------------------------------------- + public ControllerHabitacion(){ + + } + + public int getPrecioHabitacion(int idHabitacion){ + int precio= 0; + HabitacionDAO hd = new HabitacionDAO(); + Habitacion h = new Habitacion(); + h = hd.extraerHabitaciones_porID(idHabitacion); + precio = h.getPrecio_hab(); + return precio; + } + public static void cambiarEstadoHabitacion(int idHabitacion){ + HabitacionDAO hd = new HabitacionDAO(); + hd.cambiarEstadoHabitacion(idHabitacion); + } + //-------------------------------------------------------------------------- + + /*public ControllerHabitacion (HabitacionListaGUI vista_actualizar_eliminar, HabitacionDAO modelo){ + + this.vista_actualizar_eliminar = vista_actualizar_eliminar; + this.modelo = modelo; + }*/ + //Método para leer las habitaciones y lograr cargar a la vista la información de habitaciones + public void leerHabitaciones() { + ArrayList lista_habitaciones; + + lista_habitaciones = modelo.listadoHabitacion(); + vista.getPanelModificar().CargarLista(lista_habitaciones, "actualizar"); + vista.getPanelEliminar().CargarLista(lista_habitaciones, "eliminar"); + } + + public void leerHabitacionID(int idHabitacion) { + + id_seleccionado = idHabitacion; + Habitacion objhabitaciones; + objhabitaciones = modelo.extraerHabitaciones_porID(idHabitacion); + + vista.getPanelAgregar().setValidador("actualizar"); + vista.getPanelModificar().llenarFormulario(objhabitaciones); + } + + //Implementar escuchas + public class HabitacionListener implements ActionListener { + + @Override + public void actionPerformed(ActionEvent ae) { + + if (ae.getSource() == vista.getPanelAgregar().getjBcancelar()) { + if (vista.getPanelAgregar().getValidador() == "guardar") { + if (vista.getPanelAgregar().validarCampos() == 0) { + JOptionPane.showMessageDialog + (null, "Introduce los campos"); + } else { + + registrarHabitacion(); + vista.getPanelAgregar().setearCampos(); + } + + } else if (vista.getPanelAgregar() + .getValidador() == "actualizar") { + actualizarHabitacion(); + vista.getPanelAgregar().setearCampos(); + + } else if (vista.getPanelAgregar() + .getValidador() == "eliminar") { + eliminarhabitacion(id_seleccionado); + } + + } + + if (ae.getSource() == vista.getjBagregar()) { + vista.mostrarPanelAgregar(); + + } + + if (ae.getSource() == vista.getjBmodificar()) { + vista.mostrarPanelModificar(); + leerHabitaciones(); + } + + if (ae.getSource() == vista.getjBeliminar()) { + vista.mostrarPanelEliminar(); + leerHabitaciones(); + } + + } + } + + //Método registrar habitación + public void registrarHabitacion() { + + if (vista.getPanelAgregar().getjTnumeroHabitacion().equals("")) { + vista.getPanelAgregar().gestionMensajes + ("Ingrese el id de habitación", + "Error de Entrada", JOptionPane.ERROR_MESSAGE); + + } else { + Habitacion habitacion = new Habitacion(); + + habitacion.setId_habitacion(Integer.parseInt(vista.getPanelAgregar() + .getjTnumeroHabitacion().getText())); + habitacion.setTipo_habitacion(vista.getPanelAgregar() + .getjCtipoHabi().getSelectedItem().toString()); + habitacion.setPiso(vista.getPanelAgregar().getjTpiso().getText()); + habitacion.setCantidadPersonas( + Integer.parseInt(vista.getPanelAgregar().getjTcapacidad() + .getText())); + habitacion.setPrecio_hab(Integer.parseInt(vista.getPanelAgregar() + .getjTprecio().getText())); + habitacion.setNum_camas(Integer.parseInt(vista.getPanelAgregar() + .getjCnumeroCamas().getSelectedItem().toString())); + //habitacion.setEstado(vista_agregar.getPanelAM().getjTpiso().setVisible(true)); // Se debe cambiar por estado + // + + int resultado; + resultado = modelo.grabarHabitacion(habitacion); + + if (resultado == 1) { + vista.getPanelAgregar().gestionMensajes + ("Registro Grabado con éxito", + "Mensaje grabar habitación", + JOptionPane.INFORMATION_MESSAGE); + + } else { + vista.getPanelAgregar().gestionMensajes + ("Error al grabar habitación", + "Mensaje grabar habitación", JOptionPane.ERROR_MESSAGE); + } + +// vista.getPanelAgregar().gestionMensajes("Codigo ya está registrado", +// "Confirmación", +// JOptionPane.ERROR_MESSAGE); + } + } + //Método para modificar habitación + + public void actualizarHabitacion() { + + Habitacion habitacion = new Habitacion(); + + habitacion.setId_habitacion(id_seleccionado); + + //habitacion.setId_habitacion(Integer.parseInt(vista_agregar.getPanelAM().getjTnumeroHabitacion().getText())); + habitacion.setTipo_habitacion(vista.getPanelAgregar() + .getjCtipoHabi().getSelectedItem().toString().trim()); + habitacion.setPiso(vista.getPanelAgregar().getjTpiso().getText()); + habitacion.setCantidadPersonas(Integer.parseInt(vista.getPanelAgregar() + .getjTcapacidad().getText())); + habitacion.setPrecio_hab(Integer.parseInt(vista.getPanelAgregar() + .getjTprecio().getText().trim())); + habitacion.setNum_camas(Integer.parseInt(vista.getPanelAgregar() + .getjCnumeroCamas().getSelectedItem().toString().trim())); + //habitacion.setEstado(vista_agregar.getPanelAM().getjTpiso().setVisible(true)); // Se debe cambiar por estado + + if (modelo.modificarHabitacion(habitacion) == 1) { + vista.getPanelAgregar().gestionMensajes( + "Se modificó la habitación correctamente", + "Mensaje de actualización", + JOptionPane.INFORMATION_MESSAGE); + vista.getPanelAgregar().setValidador("guardar"); + } else { + vista.getPanelAgregar().gestionMensajes( + "Actualización fallida", + "Mensaje de actualización", + JOptionPane.ERROR_MESSAGE); + } + + } + // } + + //Método borrar habitación + public void eliminarhabitacion(int id_habitacion) { + + id_seleccionado = id_habitacion; + + if (modelo.borrarHabitacion(id_seleccionado) == 1) { + JOptionPane.showMessageDialog(null, + "Registro de habitación borrado", + "Mensaje borrar habitación", + JOptionPane.INFORMATION_MESSAGE); + + } else { + JOptionPane.showMessageDialog(null, + "Error al borrar habitación", + "Mensaje borrar habitación", + JOptionPane.ERROR_MESSAGE); + } + } + +} diff --git a/HotelAdmin/src/Controladores/ControllerReserva.java b/HotelAdmin/src/Controladores/ControllerReserva.java new file mode 100644 index 0000000..dcace94 --- /dev/null +++ b/HotelAdmin/src/Controladores/ControllerReserva.java @@ -0,0 +1,137 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controladores; + + + +import static Controladores.ControllerServicios.opcionEjec; +import Modelo.Reserva; +import Modelo.ReservaDAO; +import Modelo.Habitacion; +import java.sql.Timestamp; +import java.util.ArrayList; +import javax.swing.JOptionPane; + +/** + * + * @author Usuario + */ +public class ControllerReserva { + + static int numeroReserva; + static int numEmpleado; + + + public ControllerReserva() { + extraerId(); + } + + public static void setNumEmpleado(int numEmpl) { + numEmpleado = numEmpl; + } + + + public static void setNumeroReserva(int numeroReserva) { + ControllerReserva.numeroReserva = numeroReserva; + } + + + + public static int getNumEmpleado() { + return numEmpleado; + } + + + public Reserva getReserva(int idcliente){ + ReservaDAO modelo = new ReservaDAO(); + return modelo.getReserva(idcliente); + } + + + public static ArrayList loadListRooms + (Timestamp fi,Timestamp fs,String modo,int numReserva){ + ReservaDAO modeloHab = new ReservaDAO(); + return modeloHab.listadoHabitacion(fi, fs, modo, numReserva); + } + + + public static int extraerId(){ + ReservaDAO modelo = new ReservaDAO(); + return modelo.extraerUltimoId(); + } + + public static ArrayList listarReservas(){ + ReservaDAO modelo = new ReservaDAO(); + return modelo.listadoReservas(); + } + + public static int registrarReserva(Reserva reserva) { + int resultado = 0; + ReservaDAO modelo = new ReservaDAO(); + resultado = modelo.grabarReserva(reserva); + if (resultado == 1) { + gestionMensajes("Registro Grabado con éxito", + "Confirmación", JOptionPane.INFORMATION_MESSAGE); + return 1; + } else { + return 0; + } + } + + + + + public static ArrayList listarReservasLike(int numReserva){ + ReservaDAO modelo = new ReservaDAO(); + return modelo.listReservasLike(numReserva); + } + + + + public static int eliminarReserva(int ID) { + ReservaDAO modelo = new ReservaDAO(); + if (modelo.borrarReserva(ID) == 1) { + gestionMensajes( + "Registro Borrado con éxtio", + "Confirmación de acción", + JOptionPane.INFORMATION_MESSAGE); + return 1; + } else { + gestionMensajes( + "Error al borrar", + "Confirmación de acción", + JOptionPane.ERROR_MESSAGE); + return 0; + } + } + + public static int actualizarReserva(Reserva reserva){ + ReservaDAO modelo = new ReservaDAO(); + if (modelo.modificarReserva(reserva) == 1) { + gestionMensajes( + "Actualización exitosa", + "Confirmación ", + JOptionPane.INFORMATION_MESSAGE); + return 1; + } else { + gestionMensajes( + "Actualización Falida", + "Confirmación ", + JOptionPane.ERROR_MESSAGE); + return 0; + } + + } + + + public static void gestionMensajes(String mensaje, String titulo, int icono) { + JOptionPane.showMessageDialog(null, mensaje, titulo, icono); + } + + + + +} diff --git a/HotelAdmin/src/Controladores/ControllerServicios.java b/HotelAdmin/src/Controladores/ControllerServicios.java new file mode 100644 index 0000000..42c9061 --- /dev/null +++ b/HotelAdmin/src/Controladores/ControllerServicios.java @@ -0,0 +1,115 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controladores; + +import Modelo.*; +import java.util.ArrayList; +import javax.swing.JOptionPane; + +/** + * + * @author Usuario + */ +public class ControllerServicios { + + static int num_servicio = 0; + + //valida si se requiere hacer una actuslizacion o ingresar un registro + static String opcionEjec = "guardar"; + + public static ArrayList desplegarServicios() { + RoomServicesDAO modelo = new RoomServicesDAO(); + ArrayList lista_roomServices; + lista_roomServices = modelo.listadoRoomServices(); + return lista_roomServices; + } + + public static RoomServices leerServicio_porID(int ID) { + RoomServicesDAO modelo = new RoomServicesDAO(); + RoomServices obj; + obj = modelo.extraerServicio_porID(ID); + return obj; + } + + public static void registrarServicio(RoomServices servicio) { + RoomServicesDAO modelo = new RoomServicesDAO(); + int resultado = 0; + resultado = modelo.grabarServicio(servicio); + if (resultado == 1) { + gestionMensajes("Registro Grabado con éxito", + "Confirmación", JOptionPane.INFORMATION_MESSAGE); + } else { + gestionMensajes("Error al grabar", + "Confirmación", JOptionPane.ERROR_MESSAGE); + } + } + + public static void extraerId() { + int id = 0; + RoomServicesDAO modelo = new RoomServicesDAO(); + id = modelo.extraerUltimoId(); + if (id == 0) { + num_servicio = 1; + } else { + num_servicio = id + 1; + } + } + + public static void actualizarServicio(RoomServices servicio) { + + RoomServicesDAO modelo = new RoomServicesDAO(); + if (modelo.modificarRoomSercices(servicio) == 1) { + gestionMensajes( + "Actualización exitosa", + "Confirmación ", + JOptionPane.INFORMATION_MESSAGE); + opcionEjec = "guardar"; + } else { + gestionMensajes( + "Actualización Falida", + "Confirmación ", + JOptionPane.ERROR_MESSAGE); + } + } + + public static void eliminarServicio(int ID) { + RoomServicesDAO modelo = new RoomServicesDAO(); + if (modelo.borrarServicio(ID) == 1) { + gestionMensajes( + "Registro Borrado con éxtio", + "Confirmación de acción", + JOptionPane.INFORMATION_MESSAGE); + } else { + gestionMensajes( + "Error al borrar", + "Confirmación de acción", + JOptionPane.ERROR_MESSAGE); + } + } + + + public static int getNum_servicio() { + return num_servicio; + } + + public static void setNum_servicio(int num_servicio) { + ControllerServicios.num_servicio = num_servicio; + } + + public static void gestionMensajes(String mensaje, String titulo, int icono) { + JOptionPane.showMessageDialog(null, mensaje, titulo, icono); + } + + public static String getOpcionEjec() { + return opcionEjec; + + } + + public static void setOpcionEjec(String opcionEjec) { + ControllerServicios.opcionEjec = opcionEjec; + } + +} diff --git a/HotelAdmin/src/Controladores/HospedajeControllador.java b/HotelAdmin/src/Controladores/HospedajeControllador.java new file mode 100644 index 0000000..44eaabc --- /dev/null +++ b/HotelAdmin/src/Controladores/HospedajeControllador.java @@ -0,0 +1,43 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controladores; + +import Modelo.Hospedaje; +import Modelo.HospedajeDAO; +import java.util.ArrayList; + +/** + * + * @author crist + */ +public class HospedajeControllador { + public static int grabarHospedaje(Hospedaje c) + { + HospedajeDAO hd = new HospedajeDAO(); + int resultado = hd.grabarHospedaje(c); + return resultado; + } + public static ArrayList listadoActor(int s) + { + ArrayList listado; + listado = new ArrayList(); + HospedajeDAO a = new HospedajeDAO(); + listado = a.listadoHospedaje(s); + return listado; + } + public static int borrarActor(String s) + { + HospedajeDAO a = new HospedajeDAO(); + int resultado = a.borrarHospedaje(s); + return resultado; + } + public static int modificarActor(Hospedaje c) + { + HospedajeDAO a = new HospedajeDAO(); + int resultado =a.modificarHospedaje(c); + return resultado; + } +} diff --git a/HotelAdmin/src/Controladores/LoginControlador.java b/HotelAdmin/src/Controladores/LoginControlador.java new file mode 100644 index 0000000..cf4a1eb --- /dev/null +++ b/HotelAdmin/src/Controladores/LoginControlador.java @@ -0,0 +1,32 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controladores; + +import Modelo.LoginModelo; +import Modelo.LoginDAO; +import java.util.ArrayList; + +/** + * + * @author crist + */ +public class LoginControlador { + public static int grabarLogin(LoginModelo c) + { + LoginDAO fc = new LoginDAO(); + int resultado = fc.grabarLogin(c); + return resultado; + } + + public static ArrayList listadoLogin(int usuario) + { + ArrayList listado; + listado = new ArrayList(); + LoginDAO fc = new LoginDAO(); + listado = fc.listadoLogin(usuario); + return listado; + } +} diff --git a/HotelAdmin/src/Imagenes/BotonAgregarSele.png b/HotelAdmin/src/Imagenes/BotonAgregarSele.png new file mode 100644 index 0000000..a229c4c Binary files /dev/null and b/HotelAdmin/src/Imagenes/BotonAgregarSele.png differ diff --git a/HotelAdmin/src/Imagenes/BotonAgregarSinSele.png b/HotelAdmin/src/Imagenes/BotonAgregarSinSele.png new file mode 100644 index 0000000..061e776 Binary files /dev/null and b/HotelAdmin/src/Imagenes/BotonAgregarSinSele.png differ diff --git "a/HotelAdmin/src/Imagenes/BotonA\303\261adir.png" "b/HotelAdmin/src/Imagenes/BotonA\303\261adir.png" new file mode 100644 index 0000000..065409f Binary files /dev/null and "b/HotelAdmin/src/Imagenes/BotonA\303\261adir.png" differ diff --git a/HotelAdmin/src/Imagenes/BotonEliminarSele.png b/HotelAdmin/src/Imagenes/BotonEliminarSele.png new file mode 100644 index 0000000..5f5bb88 Binary files /dev/null and b/HotelAdmin/src/Imagenes/BotonEliminarSele.png differ diff --git a/HotelAdmin/src/Imagenes/BotonEliminarSinSele.png b/HotelAdmin/src/Imagenes/BotonEliminarSinSele.png new file mode 100644 index 0000000..45e2f4f Binary files /dev/null and b/HotelAdmin/src/Imagenes/BotonEliminarSinSele.png differ diff --git a/HotelAdmin/src/Imagenes/BotonModificarSele.png b/HotelAdmin/src/Imagenes/BotonModificarSele.png new file mode 100644 index 0000000..0b98ecd Binary files /dev/null and b/HotelAdmin/src/Imagenes/BotonModificarSele.png differ diff --git a/HotelAdmin/src/Imagenes/BotonModificarSinSele.png b/HotelAdmin/src/Imagenes/BotonModificarSinSele.png new file mode 100644 index 0000000..fa4fe03 Binary files /dev/null and b/HotelAdmin/src/Imagenes/BotonModificarSinSele.png differ diff --git a/HotelAdmin/src/Imagenes/BotonRegistradosSele.png b/HotelAdmin/src/Imagenes/BotonRegistradosSele.png new file mode 100644 index 0000000..a482d01 Binary files /dev/null and b/HotelAdmin/src/Imagenes/BotonRegistradosSele.png differ diff --git a/HotelAdmin/src/Imagenes/BotonRegistradosSinSele.png b/HotelAdmin/src/Imagenes/BotonRegistradosSinSele.png new file mode 100644 index 0000000..95dad76 Binary files /dev/null and b/HotelAdmin/src/Imagenes/BotonRegistradosSinSele.png differ diff --git a/HotelAdmin/src/Imagenes/Check-in-seleccionado.png b/HotelAdmin/src/Imagenes/Check-in-seleccionado.png new file mode 100644 index 0000000..7d705e6 Binary files /dev/null and b/HotelAdmin/src/Imagenes/Check-in-seleccionado.png differ diff --git a/HotelAdmin/src/Imagenes/Check-inBoton.png b/HotelAdmin/src/Imagenes/Check-inBoton.png new file mode 100644 index 0000000..04e5404 Binary files /dev/null and b/HotelAdmin/src/Imagenes/Check-inBoton.png differ diff --git a/HotelAdmin/src/Imagenes/CheckInBoton.png b/HotelAdmin/src/Imagenes/CheckInBoton.png new file mode 100644 index 0000000..371b708 Binary files /dev/null and b/HotelAdmin/src/Imagenes/CheckInBoton.png differ diff --git a/HotelAdmin/src/Imagenes/CheckInBotonSele.png b/HotelAdmin/src/Imagenes/CheckInBotonSele.png new file mode 100644 index 0000000..f4a8d30 Binary files /dev/null and b/HotelAdmin/src/Imagenes/CheckInBotonSele.png differ diff --git a/HotelAdmin/src/Imagenes/CheckInSinReserva.png b/HotelAdmin/src/Imagenes/CheckInSinReserva.png new file mode 100644 index 0000000..d2ab55d Binary files /dev/null and b/HotelAdmin/src/Imagenes/CheckInSinReserva.png differ diff --git a/HotelAdmin/src/Imagenes/CheckoutBoton.png b/HotelAdmin/src/Imagenes/CheckoutBoton.png new file mode 100644 index 0000000..a483470 Binary files /dev/null and b/HotelAdmin/src/Imagenes/CheckoutBoton.png differ diff --git a/HotelAdmin/src/Imagenes/CheckoutBotonSele.png b/HotelAdmin/src/Imagenes/CheckoutBotonSele.png new file mode 100644 index 0000000..abc4ba5 Binary files /dev/null and b/HotelAdmin/src/Imagenes/CheckoutBotonSele.png differ diff --git a/HotelAdmin/src/Imagenes/CliSele.png b/HotelAdmin/src/Imagenes/CliSele.png new file mode 100644 index 0000000..f5c649b Binary files /dev/null and b/HotelAdmin/src/Imagenes/CliSele.png differ diff --git a/HotelAdmin/src/Imagenes/CliSinSele.png b/HotelAdmin/src/Imagenes/CliSinSele.png new file mode 100644 index 0000000..d8121ae Binary files /dev/null and b/HotelAdmin/src/Imagenes/CliSinSele.png differ diff --git a/HotelAdmin/src/Imagenes/ClienteBoton.png b/HotelAdmin/src/Imagenes/ClienteBoton.png new file mode 100644 index 0000000..a77c7df Binary files /dev/null and b/HotelAdmin/src/Imagenes/ClienteBoton.png differ diff --git a/HotelAdmin/src/Imagenes/ClienteBotonSele.png b/HotelAdmin/src/Imagenes/ClienteBotonSele.png new file mode 100644 index 0000000..96d8496 Binary files /dev/null and b/HotelAdmin/src/Imagenes/ClienteBotonSele.png differ diff --git a/HotelAdmin/src/Imagenes/ContornoHabitacion.png b/HotelAdmin/src/Imagenes/ContornoHabitacion.png new file mode 100644 index 0000000..9d654ff Binary files /dev/null and b/HotelAdmin/src/Imagenes/ContornoHabitacion.png differ diff --git a/HotelAdmin/src/Imagenes/EmpleadosBotonSele.png b/HotelAdmin/src/Imagenes/EmpleadosBotonSele.png new file mode 100644 index 0000000..20a7be1 Binary files /dev/null and b/HotelAdmin/src/Imagenes/EmpleadosBotonSele.png differ diff --git a/HotelAdmin/src/Imagenes/EmpleadosBotonSinSele.png b/HotelAdmin/src/Imagenes/EmpleadosBotonSinSele.png new file mode 100644 index 0000000..7260a22 Binary files /dev/null and b/HotelAdmin/src/Imagenes/EmpleadosBotonSinSele.png differ diff --git a/HotelAdmin/src/Imagenes/Factura.png b/HotelAdmin/src/Imagenes/Factura.png new file mode 100644 index 0000000..824501c Binary files /dev/null and b/HotelAdmin/src/Imagenes/Factura.png differ diff --git a/HotelAdmin/src/Imagenes/Guardar-SinSele.png b/HotelAdmin/src/Imagenes/Guardar-SinSele.png new file mode 100644 index 0000000..78775ab Binary files /dev/null and b/HotelAdmin/src/Imagenes/Guardar-SinSele.png differ diff --git a/HotelAdmin/src/Imagenes/GuardarSele.png b/HotelAdmin/src/Imagenes/GuardarSele.png new file mode 100644 index 0000000..c41a7ee Binary files /dev/null and b/HotelAdmin/src/Imagenes/GuardarSele.png differ diff --git a/HotelAdmin/src/Imagenes/HabitacionBotonSele.png b/HotelAdmin/src/Imagenes/HabitacionBotonSele.png new file mode 100644 index 0000000..91d140b Binary files /dev/null and b/HotelAdmin/src/Imagenes/HabitacionBotonSele.png differ diff --git a/HotelAdmin/src/Imagenes/HabitacionBotonSinSele.png b/HotelAdmin/src/Imagenes/HabitacionBotonSinSele.png new file mode 100644 index 0000000..634946a Binary files /dev/null and b/HotelAdmin/src/Imagenes/HabitacionBotonSinSele.png differ diff --git a/HotelAdmin/src/Imagenes/HabitacionChe.png b/HotelAdmin/src/Imagenes/HabitacionChe.png new file mode 100644 index 0000000..135bef7 Binary files /dev/null and b/HotelAdmin/src/Imagenes/HabitacionChe.png differ diff --git a/HotelAdmin/src/Imagenes/HabitacionSeleccion.png b/HotelAdmin/src/Imagenes/HabitacionSeleccion.png new file mode 100644 index 0000000..14209c0 Binary files /dev/null and b/HotelAdmin/src/Imagenes/HabitacionSeleccion.png differ diff --git a/HotelAdmin/build/src/Imagenes/L3.png b/HotelAdmin/src/Imagenes/L3.png similarity index 100% rename from HotelAdmin/build/src/Imagenes/L3.png rename to HotelAdmin/src/Imagenes/L3.png diff --git a/HotelAdmin/src/Imagenes/ListaReserva.png b/HotelAdmin/src/Imagenes/ListaReserva.png new file mode 100644 index 0000000..1997c46 Binary files /dev/null and b/HotelAdmin/src/Imagenes/ListaReserva.png differ diff --git a/HotelAdmin/src/Imagenes/ListaReservaSele.png b/HotelAdmin/src/Imagenes/ListaReservaSele.png new file mode 100644 index 0000000..9973d6e Binary files /dev/null and b/HotelAdmin/src/Imagenes/ListaReservaSele.png differ diff --git a/HotelAdmin/src/Imagenes/ListaServicios2.png b/HotelAdmin/src/Imagenes/ListaServicios2.png new file mode 100644 index 0000000..058678c Binary files /dev/null and b/HotelAdmin/src/Imagenes/ListaServicios2.png differ diff --git a/HotelAdmin/src/Imagenes/ListaServiciosAgregar.png b/HotelAdmin/src/Imagenes/ListaServiciosAgregar.png new file mode 100644 index 0000000..d4505ad Binary files /dev/null and b/HotelAdmin/src/Imagenes/ListaServiciosAgregar.png differ diff --git a/HotelAdmin/build/src/Imagenes/Logocm.png b/HotelAdmin/src/Imagenes/Logocm.png similarity index 100% rename from HotelAdmin/build/src/Imagenes/Logocm.png rename to HotelAdmin/src/Imagenes/Logocm.png diff --git a/HotelAdmin/src/Imagenes/Marco.png b/HotelAdmin/src/Imagenes/Marco.png new file mode 100644 index 0000000..6b88aec Binary files /dev/null and b/HotelAdmin/src/Imagenes/Marco.png differ diff --git a/HotelAdmin/src/Imagenes/MarcoCheckin.png b/HotelAdmin/src/Imagenes/MarcoCheckin.png new file mode 100644 index 0000000..1a8ab84 Binary files /dev/null and b/HotelAdmin/src/Imagenes/MarcoCheckin.png differ diff --git a/HotelAdmin/src/Imagenes/MarcoListaCli.png b/HotelAdmin/src/Imagenes/MarcoListaCli.png new file mode 100644 index 0000000..cfd3be2 Binary files /dev/null and b/HotelAdmin/src/Imagenes/MarcoListaCli.png differ diff --git a/HotelAdmin/src/Imagenes/MarcoListaHospe.png b/HotelAdmin/src/Imagenes/MarcoListaHospe.png new file mode 100644 index 0000000..b580e38 Binary files /dev/null and b/HotelAdmin/src/Imagenes/MarcoListaHospe.png differ diff --git a/HotelAdmin/src/Imagenes/MarcoReserva.png b/HotelAdmin/src/Imagenes/MarcoReserva.png new file mode 100644 index 0000000..63aaeaf Binary files /dev/null and b/HotelAdmin/src/Imagenes/MarcoReserva.png differ diff --git a/HotelAdmin/src/Imagenes/MarcoServicio.png b/HotelAdmin/src/Imagenes/MarcoServicio.png new file mode 100644 index 0000000..b3dae67 Binary files /dev/null and b/HotelAdmin/src/Imagenes/MarcoServicio.png differ diff --git a/HotelAdmin/src/Imagenes/MarcoServicioAgregar.png b/HotelAdmin/src/Imagenes/MarcoServicioAgregar.png new file mode 100644 index 0000000..1d7e996 Binary files /dev/null and b/HotelAdmin/src/Imagenes/MarcoServicioAgregar.png differ diff --git a/HotelAdmin/src/Imagenes/MostrarReserva.png b/HotelAdmin/src/Imagenes/MostrarReserva.png new file mode 100644 index 0000000..9b345b6 Binary files /dev/null and b/HotelAdmin/src/Imagenes/MostrarReserva.png differ diff --git a/HotelAdmin/src/Imagenes/RealizarReserva.png b/HotelAdmin/src/Imagenes/RealizarReserva.png new file mode 100644 index 0000000..500d38a Binary files /dev/null and b/HotelAdmin/src/Imagenes/RealizarReserva.png differ diff --git a/HotelAdmin/src/Imagenes/RealizarReservaSele.png b/HotelAdmin/src/Imagenes/RealizarReservaSele.png new file mode 100644 index 0000000..888f341 Binary files /dev/null and b/HotelAdmin/src/Imagenes/RealizarReservaSele.png differ diff --git a/HotelAdmin/src/Imagenes/ReservSele.png b/HotelAdmin/src/Imagenes/ReservSele.png new file mode 100644 index 0000000..199b9bd Binary files /dev/null and b/HotelAdmin/src/Imagenes/ReservSele.png differ diff --git a/HotelAdmin/src/Imagenes/ReservSinSele.png b/HotelAdmin/src/Imagenes/ReservSinSele.png new file mode 100644 index 0000000..ec03fff Binary files /dev/null and b/HotelAdmin/src/Imagenes/ReservSinSele.png differ diff --git "a/HotelAdmin/src/Imagenes/ReservaPrevia-Selecci\303\263n.png" "b/HotelAdmin/src/Imagenes/ReservaPrevia-Selecci\303\263n.png" new file mode 100644 index 0000000..6388bbc Binary files /dev/null and "b/HotelAdmin/src/Imagenes/ReservaPrevia-Selecci\303\263n.png" differ diff --git a/HotelAdmin/src/Imagenes/ReservaPrevia.png b/HotelAdmin/src/Imagenes/ReservaPrevia.png new file mode 100644 index 0000000..5f6fcc1 Binary files /dev/null and b/HotelAdmin/src/Imagenes/ReservaPrevia.png differ diff --git a/HotelAdmin/src/Imagenes/SinReserva.png b/HotelAdmin/src/Imagenes/SinReserva.png new file mode 100644 index 0000000..8290df0 Binary files /dev/null and b/HotelAdmin/src/Imagenes/SinReserva.png differ diff --git a/HotelAdmin/src/Imagenes/SinReservaSelec.png b/HotelAdmin/src/Imagenes/SinReservaSelec.png new file mode 100644 index 0000000..d4f268e Binary files /dev/null and b/HotelAdmin/src/Imagenes/SinReservaSelec.png differ diff --git a/HotelAdmin/src/Imagenes/botonAregarServicio.png b/HotelAdmin/src/Imagenes/botonAregarServicio.png new file mode 100644 index 0000000..b47ec13 Binary files /dev/null and b/HotelAdmin/src/Imagenes/botonAregarServicio.png differ diff --git a/HotelAdmin/src/Imagenes/botonAregarServicioSinSele.png b/HotelAdmin/src/Imagenes/botonAregarServicioSinSele.png new file mode 100644 index 0000000..d468e2e Binary files /dev/null and b/HotelAdmin/src/Imagenes/botonAregarServicioSinSele.png differ diff --git a/HotelAdmin/src/Imagenes/botonCheckOutSele.png b/HotelAdmin/src/Imagenes/botonCheckOutSele.png new file mode 100644 index 0000000..cf9fc9c Binary files /dev/null and b/HotelAdmin/src/Imagenes/botonCheckOutSele.png differ diff --git a/HotelAdmin/src/Imagenes/botonCheckOutSinSele.png b/HotelAdmin/src/Imagenes/botonCheckOutSinSele.png new file mode 100644 index 0000000..2bfa01f Binary files /dev/null and b/HotelAdmin/src/Imagenes/botonCheckOutSinSele.png differ diff --git a/HotelAdmin/src/Imagenes/botonHospedajesSele.png b/HotelAdmin/src/Imagenes/botonHospedajesSele.png new file mode 100644 index 0000000..a95f2b9 Binary files /dev/null and b/HotelAdmin/src/Imagenes/botonHospedajesSele.png differ diff --git a/HotelAdmin/src/Imagenes/botonHospedajesSinSele.png b/HotelAdmin/src/Imagenes/botonHospedajesSinSele.png new file mode 100644 index 0000000..7f6c4f6 Binary files /dev/null and b/HotelAdmin/src/Imagenes/botonHospedajesSinSele.png differ diff --git a/HotelAdmin/src/Imagenes/botonRegistrarSalidaSele.png b/HotelAdmin/src/Imagenes/botonRegistrarSalidaSele.png new file mode 100644 index 0000000..0f7bb9a Binary files /dev/null and b/HotelAdmin/src/Imagenes/botonRegistrarSalidaSele.png differ diff --git a/HotelAdmin/src/Imagenes/botonRegistrarSalidaSinSele.png b/HotelAdmin/src/Imagenes/botonRegistrarSalidaSinSele.png new file mode 100644 index 0000000..a593daf Binary files /dev/null and b/HotelAdmin/src/Imagenes/botonRegistrarSalidaSinSele.png differ diff --git a/HotelAdmin/src/Imagenes/botonRegistrarSele.png b/HotelAdmin/src/Imagenes/botonRegistrarSele.png new file mode 100644 index 0000000..198b025 Binary files /dev/null and b/HotelAdmin/src/Imagenes/botonRegistrarSele.png differ diff --git a/HotelAdmin/src/Imagenes/botonRegistrarSinsele.png b/HotelAdmin/src/Imagenes/botonRegistrarSinsele.png new file mode 100644 index 0000000..9a9963b Binary files /dev/null and b/HotelAdmin/src/Imagenes/botonRegistrarSinsele.png differ diff --git a/HotelAdmin/src/Imagenes/botonSalida.png b/HotelAdmin/src/Imagenes/botonSalida.png index 8225937..557a772 100644 Binary files a/HotelAdmin/src/Imagenes/botonSalida.png and b/HotelAdmin/src/Imagenes/botonSalida.png differ diff --git a/HotelAdmin/build/src/Imagenes/btnIN.png b/HotelAdmin/src/Imagenes/btnIN.png similarity index 100% rename from HotelAdmin/build/src/Imagenes/btnIN.png rename to HotelAdmin/src/Imagenes/btnIN.png diff --git a/HotelAdmin/src/Imagenes/buscar-azul.png b/HotelAdmin/src/Imagenes/buscar-azul.png new file mode 100644 index 0000000..3de9173 Binary files /dev/null and b/HotelAdmin/src/Imagenes/buscar-azul.png differ diff --git a/HotelAdmin/src/Imagenes/hospedajeSele.png b/HotelAdmin/src/Imagenes/hospedajeSele.png new file mode 100644 index 0000000..443300e Binary files /dev/null and b/HotelAdmin/src/Imagenes/hospedajeSele.png differ diff --git a/HotelAdmin/src/Imagenes/hospedajeSinSele.png b/HotelAdmin/src/Imagenes/hospedajeSinSele.png new file mode 100644 index 0000000..b131f94 Binary files /dev/null and b/HotelAdmin/src/Imagenes/hospedajeSinSele.png differ diff --git a/HotelAdmin/src/Imagenes/iconEditar.png b/HotelAdmin/src/Imagenes/iconEditar.png new file mode 100644 index 0000000..7d998e7 Binary files /dev/null and b/HotelAdmin/src/Imagenes/iconEditar.png differ diff --git a/HotelAdmin/src/Imagenes/iconEliminar.png b/HotelAdmin/src/Imagenes/iconEliminar.png new file mode 100644 index 0000000..6393bd3 Binary files /dev/null and b/HotelAdmin/src/Imagenes/iconEliminar.png differ diff --git a/HotelAdmin/src/Imagenes/jPnumeroH.png b/HotelAdmin/src/Imagenes/jPnumeroH.png new file mode 100644 index 0000000..63b3001 Binary files /dev/null and b/HotelAdmin/src/Imagenes/jPnumeroH.png differ diff --git a/HotelAdmin/build/src/Imagenes/logo1.png b/HotelAdmin/src/Imagenes/logo1.png similarity index 100% rename from HotelAdmin/build/src/Imagenes/logo1.png rename to HotelAdmin/src/Imagenes/logo1.png diff --git a/HotelAdmin/build/src/Imagenes/logopq.png b/HotelAdmin/src/Imagenes/logopq.png similarity index 100% rename from HotelAdmin/build/src/Imagenes/logopq.png rename to HotelAdmin/src/Imagenes/logopq.png diff --git a/HotelAdmin/src/Imagenes/marcoEmpleado.png b/HotelAdmin/src/Imagenes/marcoEmpleado.png new file mode 100644 index 0000000..1d84654 Binary files /dev/null and b/HotelAdmin/src/Imagenes/marcoEmpleado.png differ diff --git a/HotelAdmin/src/Imagenes/marcoServiciosLista.png b/HotelAdmin/src/Imagenes/marcoServiciosLista.png new file mode 100644 index 0000000..2b445ed Binary files /dev/null and b/HotelAdmin/src/Imagenes/marcoServiciosLista.png differ diff --git a/HotelAdmin/src/Imagenes/reservarBoton.png b/HotelAdmin/src/Imagenes/reservarBoton.png new file mode 100644 index 0000000..1430bf8 Binary files /dev/null and b/HotelAdmin/src/Imagenes/reservarBoton.png differ diff --git a/HotelAdmin/src/Imagenes/reservarBotonSele.png b/HotelAdmin/src/Imagenes/reservarBotonSele.png new file mode 100644 index 0000000..570d2e7 Binary files /dev/null and b/HotelAdmin/src/Imagenes/reservarBotonSele.png differ diff --git a/HotelAdmin/src/Imagenes/serviciosBoton.png b/HotelAdmin/src/Imagenes/serviciosBoton.png new file mode 100644 index 0000000..08dd2f6 Binary files /dev/null and b/HotelAdmin/src/Imagenes/serviciosBoton.png differ diff --git a/HotelAdmin/src/Imagenes/serviciosBotonSele.png b/HotelAdmin/src/Imagenes/serviciosBotonSele.png new file mode 100644 index 0000000..6de233a Binary files /dev/null and b/HotelAdmin/src/Imagenes/serviciosBotonSele.png differ diff --git a/HotelAdmin/src/Modelo/Checkout.java b/HotelAdmin/src/Modelo/Checkout.java new file mode 100644 index 0000000..1ac2b32 --- /dev/null +++ b/HotelAdmin/src/Modelo/Checkout.java @@ -0,0 +1,137 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Modelo; + +import java.sql.Timestamp; +import java.util.Date; + +/** + * + * @author crist + */ +public class Checkout { + private String medio_pago; + private int id_checkout,id_hospedaje; + private int valorTotal; + private Timestamp fPago; + + //--------Vista cuenta + private int id_cliente, id_habitacion, precio_habi; + private Timestamp fechaIngreso,fechaSalida; + private String tipo; + + public Checkout(){ + this.id_hospedaje = 0; + this.id_checkout = 0; + this.medio_pago= ""; + this.valorTotal= 0; + this.fPago = new Timestamp(1900,1 , 1, 00, 00, 00, 00); + this.tipo = ""; + } + public Checkout(int iho ,int ich,String mp,int vt,Timestamp fp){ + this.id_hospedaje = iho; + this.id_checkout = ich; + this.medio_pago= mp; + this.valorTotal = vt; + this.fPago = fp; + } + public Checkout(int iho ,int ich,String mp,int vt,Timestamp fp, + int ic,int ih, Timestamp fi, Timestamp fs,String t, int ph){ + this.id_hospedaje = iho; + this.id_checkout = ich; + this.medio_pago= mp; + this.valorTotal = vt; + this.fPago = fp; + this.id_cliente = ic; + this.id_habitacion = ih; + this.fechaIngreso = fi; + this.fechaSalida = fs; + this.tipo = t; + this.precio_habi = ph; + } + //------------------------------ SET checkout ---------------------------- + public void setIdHospedaje (int iho) + { + this.id_hospedaje = iho; + } + public void setIdCheckout(int ich) + { + this.id_checkout = ich; + } + public void setmediodepago(String mdp) + { + this.medio_pago = mdp; + } + public void setValorTotal(int vl) + { + this.valorTotal = vl; + } + public void setFpago(Timestamp fp) + { + this.fPago = fp; + } + public void setIdCliente(int ic){ + this.id_cliente = ic; + } + public void setIdhabitacion(int id){ + this.id_habitacion = id; + } + public void setFechaIngreso(Timestamp fi){ + this.fechaIngreso = fi; + } + public void setFechaSalida(Timestamp fs){ + this.fechaSalida = fs; + } + public void setTipo(String h) + { + this.tipo = h; + } + public void setPreciohabitacion(int ph){ + this.precio_habi = ph; + } + + //-----------------------------GET checkout -------------------------------- + public int getIdHospedaje () + { + return this.id_hospedaje; + } + public int getIdCheckout() + { + return id_checkout; + } + public String getMediodepago() + { + return this.medio_pago; + } + public int getValorTotal() + { + return this.valorTotal; + } + public int getIdCliente(){ + return this.id_cliente; + } + public int getIdhabitacion(){ + return this.id_habitacion; + } + public Timestamp getFpago() + { + return this.fPago; + } + public Timestamp getfechaIngreso(){ + return this.fechaIngreso; + } + public Timestamp getfechaSalida(){ + return this.fechaSalida; + } + public String getTipoH() + { + return this.tipo; + } + public int getPrecioH(){ + return this.precio_habi; + } + //-------------------------------------------------------------------------- +} diff --git a/HotelAdmin/src/Modelo/CheckoutDAO.java b/HotelAdmin/src/Modelo/CheckoutDAO.java new file mode 100644 index 0000000..99a7e3b --- /dev/null +++ b/HotelAdmin/src/Modelo/CheckoutDAO.java @@ -0,0 +1,176 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Modelo; + +import Servicios.Fachada; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import javax.swing.JOptionPane; + +/** + * + * @author crist + */ +public class CheckoutDAO { + private void mensajeError(SQLException ex){ + + JOptionPane.showMessageDialog(null,"Código "+ + ex.getErrorCode() + "\n Error" + ex.getMessage()); + } + //-------------------------------------------------------------------------- + public int grabarCheckout(Checkout c){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "INSERT INTO checkout (id_checkout,id_hospedaje," + + "valortotal,medio_pago,fecha)" + + "VALUES (?,?,?,?,?)"; + pstm = con.prepareStatement(sql); + pstm.setInt(1, c.getIdCheckout()); + pstm.setInt(2, c.getIdHospedaje()); + pstm.setInt(3, c.getValorTotal()); + pstm.setString(4, c.getMediodepago()); + pstm.setTimestamp(5, c.getFpago()); + + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return rtdo; + } + //-------------------------------------------------------------------------- + public int extraerUltimoId() + { + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + int id = 0; + try { + con = Fachada.getConnection(); + String sql = ""; + + sql = "select max(id_checkout) as id_checkout from checkout"; + + pstm = con.prepareStatement(sql); + + rs = pstm.executeQuery(); + + while (rs.next()) { + id = rs.getInt("id_checkout"); + } + } catch (SQLException ex) { + mensajeError(ex); + } finally { + try { + if (rs != null) { + rs.close(); + } + if (pstm != null) { + pstm.close(); + } + } catch (SQLException ex) { + mensajeError(ex); + } + } + return id; + } + //-------------------------------------------------------------------------- + public Checkout extraerCheckout (int idcliente) + { + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + + Checkout c = new Checkout(); + try { + con = Fachada.getConnection(); + String sql = ""; + + sql + = "SELECT * FROM cuenta" //cuenta es una vista + + " WHERE estado = true " + + "AND id_cliente = ?"; + + pstm = con.prepareStatement(sql); + pstm.setInt(1, idcliente); + rs = pstm.executeQuery(); + + while (rs.next()) { + c.setIdCliente(rs.getInt("id_cliente")); + c.setIdhabitacion(rs.getInt("habitacion")); + c.setValorTotal(rs.getInt("valortotal")); + c.setPreciohabitacion(rs.getInt("precio_hab")); + c.setTipo(rs.getString("tipo_habitacion")); + c.setFechaIngreso(rs.getTimestamp("fecha_ingreso")); + c.setFechaSalida(rs.getTimestamp("fecha_salida")); + c.setIdCheckout(rs.getInt("id_checkout")); + } + } catch (SQLException ex) { + mensajeError(ex); + } finally { + try { + if (rs != null) { + rs.close(); + } + if (pstm != null) { + pstm.close(); + } + } catch (SQLException ex) { + mensajeError(ex); + } + } + return c; + } + //-------------------------------------------------------------------------- + public int modificarCheckout(Checkout c){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "UPDATE checkout " + + "SET fecha = ?, valorTotal = ?,medio_pago = ?" + + "WHERE id_checkout = ?"; + pstm = con.prepareStatement(sql); + pstm.setTimestamp(1, c.getFpago()); + pstm.setInt(2, c.getValorTotal()); + pstm.setString(3, c.getMediodepago()); + pstm.setInt(4, c.getIdCheckout()); + + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return rtdo; + } + +} diff --git a/HotelAdmin/src/Modelo/ClientDAO.java b/HotelAdmin/src/Modelo/ClientDAO.java new file mode 100644 index 0000000..8d84acc --- /dev/null +++ b/HotelAdmin/src/Modelo/ClientDAO.java @@ -0,0 +1,150 @@ + +package Modelo; + +import Servicios.Fachada; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.swing.JOptionPane; + +/** + * @author linkedV0id + **/ + +public class ClientDAO { + + public int addClient(Cliente c){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "INSERT INTO Cliente " + + "(id_cliente, nombre_cli, apellido_cli, telefono_cli," + + "direccion_cli, email_cli) values (?,?,?,?,?,?)"; + + pstm = con.prepareStatement(sql); + + pstm.setInt(1, c.getID()); + pstm.setString(2, c.getNombre()); + pstm.setString(3, c.getApellido()); + pstm.setString(4, c.getTelefono()); + pstm.setString(5, c.getDireccion()); + pstm.setString(6, c.getCorreo()); + + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Code: " + + ex.getErrorCode() + "\nError: " + ex.getMessage()); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Code: " + + ex.getErrorCode() + "\nError: " + ex.getMessage()); + } + } + return rtdo; + } + + + public int modifyClient(Cliente c){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "UPDATE Cliente " + + "SET id_cliente = ?, nombre_cli = ?,apellido_cli = ?," + + "telefono_cli = ?, direccion_cli = ?, email_cli = ?" + + "WHERE id_cliente = ?"; + pstm = con.prepareStatement(sql); + + pstm.setInt(1, c.getID()); + pstm.setString(2, c.getNombre()); + pstm.setString(3, c.getApellido()); + pstm.setString(4, c.getTelefono()); + pstm.setString(5, c.getDireccion()); + pstm.setString(6, c.getCorreo()); + + pstm.setInt(7, c.getID()); + + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Code modificar: " + + ex.getErrorCode() + "\nError: " + ex.getMessage()); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Code: " + + ex.getErrorCode() + "\nError: " + ex.getMessage()); + } + } + return rtdo; + } + + public ArrayList listCliente(int id_cliente){ + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + ArrayList list = new ArrayList<>(); + try{ + con = Fachada.getConnection(); + String sql=""; + if(id_cliente ==0){ + sql = "SELECT * FROM Cliente ORDER BY id_cliente"; + }else{ + sql = "SELECT * FROM Cliente where id_cliente = ? " + + "ORDER BY id_cliente"; + } + pstm = con.prepareStatement(sql); + + if(id_cliente != 0){ + pstm.setInt(1, id_cliente); + } + + rs = pstm.executeQuery(); + + Cliente cliente = null; + while(rs.next()){ + cliente = new Cliente(); + cliente.setID(rs.getInt("id_cliente")); + cliente.setNombre(rs.getString("nombre_cli")); + cliente.setApellido(rs.getString("apellido_cli")); + cliente.setDireccion(rs.getString("direccion_cli")); + cliente.setCorreo(rs.getString("email_cli")); + cliente.setTelefono(rs.getString("telefono_cli")); + list.add(cliente); + } + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Code: " + + ex.getErrorCode() + "\nError: " + ex.getMessage()); + } + finally{ + try{ + if(rs!=null) rs.close(); + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Code: " + + ex.getErrorCode() + "\nError: " + ex.getMessage()); + } + } + return list; + } + +} \ No newline at end of file diff --git a/HotelAdmin/src/Modelo/Cliente.java b/HotelAdmin/src/Modelo/Cliente.java index d721501..c1d8db4 100644 --- a/HotelAdmin/src/Modelo/Cliente.java +++ b/HotelAdmin/src/Modelo/Cliente.java @@ -11,4 +11,11 @@ */ public class Cliente extends Persona{ private String usuario, contraseña; + + public Cliente(){} + + // Creo constructor para Cliente para crear e insertar directamente a la BD + public Cliente(int cedula, String nombre, String apellido, String correo, String direccion, int telefono){ + + } } diff --git a/HotelAdmin/src/Modelo/Empleado.java b/HotelAdmin/src/Modelo/Empleado.java index 0ab6ae5..d45712f 100644 --- a/HotelAdmin/src/Modelo/Empleado.java +++ b/HotelAdmin/src/Modelo/Empleado.java @@ -5,11 +5,64 @@ */ package Modelo; +import java.sql.Timestamp; + /** * * @author Leonardo */ public class Empleado extends Persona { - private int codigoEmpleado; private String cargo; + private boolean estado; + private Timestamp fecha_ingreso; + private int salario; + + public Empleado() +{ +} + //------------------------------ SET EMPLEADO ------------------------------ + + + + public void setCargo (String cargo) + { + this.cargo = cargo; + } + + public void setEstado (boolean estado) + { + this.estado = estado; + } + + public void setFechaIngreso(Timestamp timestamp) + { + this.fecha_ingreso = timestamp; + } + + public void setSalario(int salario) + { + this.salario = salario; + } + //-----------------------------GET EMPLEADO--------------------------------- + + + + public String getCargo() + { + return cargo; + } + + public boolean getEstado() + { + return estado; + } + + public Timestamp getIngreso() + { + return fecha_ingreso; + } + + public int getSalario() { + return salario; + } } diff --git a/HotelAdmin/src/Modelo/EmpleadoDAO.java b/HotelAdmin/src/Modelo/EmpleadoDAO.java new file mode 100644 index 0000000..960124b --- /dev/null +++ b/HotelAdmin/src/Modelo/EmpleadoDAO.java @@ -0,0 +1,167 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Modelo; + +import Servicios.Fachada; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.swing.JOptionPane; + +/** + * + * @author chris + */ +public class EmpleadoDAO { + + //-------------------------------------------------------------------------- + + public int grabarEmpleado(Empleado c){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "INSERT INTO empleado values (?,?,?,?,?,?,?,?,?,?)"; + + pstm = con.prepareStatement(sql); + + pstm.setInt(1, c.getID()); + pstm.setString(2, c.getNombre()); + pstm.setString(3, c.getApellido()); + pstm.setString(4, c.getCorreo()); + pstm.setString(5, c.getDireccion()); + pstm.setString(6, c.getTelefono()); + pstm.setString(7, c.getCargo()); + pstm.setInt(8, c.getSalario()); + pstm.setTimestamp(9, c.getIngreso()); + pstm.setBoolean(10, c.getEstado()); + + + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return rtdo; + } + + //-------------------------------------------------------------------------- + + public int modificarEmpleado(Empleado c){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "UPDATE empleado " + + "SET id_empleado = ?, nombre_emp = ?,apellido_emp = ?," + + "email_emp = ?, direccion_emp = ?, telefono_emp = ?, " + + "cargo_emp = ?, salario_emp = ?, estado = ?, " + + "fecha_ingreso = ? WHERE id_empleado = ?"; + pstm = con.prepareStatement(sql); + pstm.setInt(1, c.getID()); + pstm.setString(2, c.getNombre()); + pstm.setString(3, c.getApellido()); + pstm.setString(4, c.getCorreo()); + pstm.setString(5, c.getDireccion()); + pstm.setString(6, c.getTelefono()); + pstm.setString(7, c.getCargo()); + pstm.setInt(8, c.getSalario()); + pstm.setBoolean(9, c.getEstado()); + pstm.setTimestamp(10, c.getIngreso()); + pstm.setInt(11, c.getID()); + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return rtdo; + } + + //-------------------------------------------------------------------------- + public ArrayList listadoEmpleado(int id_empleado){ + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + ArrayList listado = new ArrayList<>(); + try{ + con = Fachada.getConnection(); + String sql=""; + if(id_empleado ==0){ + sql = "SELECT * FROM empleado ORDER BY id_empleado"; + }else{ + sql = "SELECT * FROM empleado where id_empleado = ? " + + "ORDER BY id_empleado"; + } + pstm = con.prepareStatement(sql); + + if(id_empleado != 0){ + pstm.setInt(1, id_empleado); + } + + rs = pstm.executeQuery(); + + Empleado empleado = null; + while(rs.next()){ + empleado = new Empleado(); + empleado.setID(rs.getInt("id_empleado")); + empleado.setNombre(rs.getString("nombre_emp")); + empleado.setApellido(rs.getString("apellido_emp")); + empleado.setDireccion(rs.getString("direccion_emp")); + empleado.setCorreo(rs.getString("email_emp")); + empleado.setTelefono(rs.getString("telefono_emp")); + empleado.setCargo(rs.getString("cargo_emp")); + empleado.setSalario(rs.getInt("salario_emp")); + empleado.setFechaIngreso(rs.getTimestamp("fecha_ingreso")); + empleado.setEstado(rs.getBoolean("estado")); + listado.add(empleado); + } + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + finally{ + try{ + if(rs!=null) rs.close(); + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return listado; + } + +} \ No newline at end of file diff --git a/HotelAdmin/src/Modelo/Habitacion.java b/HotelAdmin/src/Modelo/Habitacion.java index 566329e..ee83f8c 100644 --- a/HotelAdmin/src/Modelo/Habitacion.java +++ b/HotelAdmin/src/Modelo/Habitacion.java @@ -1,15 +1,101 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Programa : Habitacion + * Fecha : 02/04/2020 + * Objetivo : Modela la clase Habitación + * Autor : Leidy Vanesa Cifuentes */ package Modelo; -/** - * - * @author Leonardo - */ + public class Habitacion { - private int numero_habitacion, precio, numero_camas, numero_piso; -} + + private int id_habitacion; + private String tipo_habitacion; + private String piso; + private int cantidadPersonas; + private int precio_hab; + private int num_camas; + private boolean estado; + /* private image img_habitacion;*/ + + + public Habitacion(){ + } + + public Habitacion(int id_habitacion, String tipo_habitacion, + int precio_hab, int num_camas, String piso, int cantidadPersonas, + boolean estado){ + this.id_habitacion = id_habitacion; + this.tipo_habitacion = tipo_habitacion; + this.piso = piso; + this.cantidadPersonas = cantidadPersonas; + this.precio_hab = precio_hab; + this.num_camas = num_camas; + this.estado = estado; + } + + public int getId_habitacion() { + return id_habitacion; + } + + public String getTipo_habitacion() { + return tipo_habitacion; + } + + public String getPiso() { + return piso; + } + + public int getCantidadPersonas() { + return cantidadPersonas; + } + + public boolean isEstado() { + return estado; + } + + + public int getPrecio_hab() { + return precio_hab; + } + + public int getNum_camas() { + return num_camas; + } + + public boolean getEstado() { + return estado; + } + + public void setId_habitacion(int id_habitacion) { + this.id_habitacion = id_habitacion; + } + + public void setTipo_habitacion(String tipo_habitacion) { + this.tipo_habitacion = tipo_habitacion; + } + + public void setPrecio_hab(int precio_hab) { + this.precio_hab = precio_hab; + } + + public void setNum_camas(int num_camas) { + this.num_camas = num_camas; + } + + public void setEstado(boolean estado) { + this.estado = estado; + } + + public void setPiso(String piso) { + this.piso = piso; + } + + public void setCantidadPersonas(int cantidadPersonas) { + this.cantidadPersonas = cantidadPersonas; + } + + + + } diff --git a/HotelAdmin/src/Modelo/HabitacionDAO.java b/HotelAdmin/src/Modelo/HabitacionDAO.java new file mode 100644 index 0000000..84c2960 --- /dev/null +++ b/HotelAdmin/src/Modelo/HabitacionDAO.java @@ -0,0 +1,268 @@ +/* + * Programa : HabitacionDAO + * Fecha : 02/04/2020 + * Objetivo : Modela el acceso a datos de la tabla Habitación + * Autor : Leidy Vanesa Cifuentes + */ + +package Modelo; +import java.sql.*; +import java.util.ArrayList; +import javax.swing.JOptionPane; +import Servicios.*; + + +public class HabitacionDAO { + + public HabitacionDAO(){ + + } + public void mensajeError(SQLException ex){ + + JOptionPane.showMessageDialog(null,"Código "+ + ex.getErrorCode() + "\n Error" + ex.getMessage()); + } + /** + * + * @param h Objeto de la clase Habitacion a grabar + * @return rtdo resultado de la operación grabar + */ + public int grabarHabitacion(Habitacion h){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "INSERT INTO habitacion values (?,?,?,?,?,?,true)"; + pstm = con.prepareStatement(sql); + pstm.setInt(1, h.getId_habitacion()); + pstm.setString(2, h.getTipo_habitacion()); + pstm.setString(3, h.getPiso()); + pstm.setInt(4, h.getCantidadPersonas()); + pstm.setInt(5, h.getPrecio_hab()); + pstm.setInt(6, h.getNum_camas()); + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return rtdo; + } + + /** + * + * @param h Objeto de la clase Habitacion a modificar + * @return rtdo resultado de la operación modificar + */ +public int modificarHabitacion(Habitacion h){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "UPDATE habitacion " + + "SET id_habitacion = ?, tipo_habitacion= ?, " + + "piso = ?, cantidad_personas = ?, precio_hab = ? " + + ", num_camas =?" + + "WHERE id_habitacion = ? "; + pstm = con.prepareStatement(sql); + + pstm.setInt(1, h.getId_habitacion()); + pstm.setString(2, h.getTipo_habitacion()); + pstm.setString(3, h.getPiso()); + pstm.setInt(4, h.getCantidadPersonas()); + pstm.setInt(5, h.getPrecio_hab()); + pstm.setInt(6, h.getNum_camas()); + // pstm.setBoolean(7, h.getEstado());*/ + pstm.setInt(7, h.getId_habitacion()); + + + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return rtdo; + } + + /** + * + * @param id_habitacion código de la habitación a borrar + * @return rtdo resultado de la operación borrar + */ + public int borrarHabitacion(int id_habitacion){ + Connection con = null; + PreparedStatement pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "DELETE FROM habitacion WHERE id_habitacion = ? "; + pstm = con.prepareStatement(sql); + pstm.setInt(1, id_habitacion); + rtdo = pstm.executeUpdate(); + return rtdo; + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return rtdo; + } + + /** + * + * @param id_habitacion id de habitación a listar + * @return ArrayList, lista de objetos Habitación + */ + public ArrayList listadoHabitacion(){ + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + ArrayList listadoHabitacion = new ArrayList<>(); + try{ + con = Fachada.getConnection(); + String sql=""; + + sql = "SELECT * FROM habitacion " + + " ORDER BY id_habitacion"; + pstm = con.prepareStatement(sql); + rs = pstm.executeQuery(); + Habitacion objhabitacion = null; + while(rs.next()){ + objhabitacion = new Habitacion(); + objhabitacion.setId_habitacion(rs.getInt("id_habitacion")); + objhabitacion.setTipo_habitacion( + rs.getString("tipo_habitacion")); + objhabitacion.setPiso(rs.getString("piso")); + objhabitacion.setCantidadPersonas( + rs.getInt("cantidad_personas")); + objhabitacion.setPrecio_hab(rs.getInt("precio_hab")); + objhabitacion.setNum_camas(rs.getInt("num_camas")); + objhabitacion.setEstado(rs.getBoolean("estado")); + listadoHabitacion.add(objhabitacion); + } + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(rs!=null) rs.close(); + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return listadoHabitacion; + } + +public Habitacion extraerHabitaciones_porID(int idHabitacion) + { + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + + Habitacion habitacion = new Habitacion(); + try { + con = Fachada.getConnection(); + String sql = ""; + + sql + = "SELECT * FROM habitacion" + + " WHERE id_habitacion = ?"; + + pstm = con.prepareStatement(sql); + pstm.setInt(1, idHabitacion); + rs = pstm.executeQuery(); + + while (rs.next()) { + + habitacion.setId_habitacion( + rs.getInt("id_habitacion")); + habitacion.setTipo_habitacion(rs.getString("tipo_habitacion")); + habitacion.setPiso(rs.getString("piso")); + habitacion.setCantidadPersonas(rs.getInt("cantidad_personas")); + habitacion.setPrecio_hab(rs.getInt("precio_hab")); + habitacion.setNum_camas(rs.getInt("num_camas")); + habitacion.setEstado(rs.getBoolean("estado")); + + } + } catch (SQLException ex) { + mensajeError(ex); + } finally { + try { + if (rs != null) { + rs.close(); + } + if (pstm != null) { + pstm.close(); + } + } catch (SQLException ex) { + mensajeError(ex); + } + } + return habitacion; + } + //-------------------------------------------------------------------------- + public int cambiarEstadoHabitacion(int idhabitacion){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "UPDATE habitacion " + + "SET estado = ? " + + "WHERE id_habitacion = ?"; + + pstm = con.prepareStatement(sql); + pstm.setBoolean(1, true); + pstm.setInt(2, idhabitacion); + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return rtdo; + } + + +} \ No newline at end of file diff --git a/HotelAdmin/src/Modelo/HabitacionesDAO.java b/HotelAdmin/src/Modelo/HabitacionesDAO.java new file mode 100644 index 0000000..b715f70 --- /dev/null +++ b/HotelAdmin/src/Modelo/HabitacionesDAO.java @@ -0,0 +1,245 @@ +/* + * Programa : HabitacionDAO + * Fecha : 02/04/2020 + * Objetivo : Modela el acceso a datos de la tabla Habitación + * Autor : Leidy Vanesa Cifuentes + */ + +package Modelo; +import java.sql.*; +import java.util.ArrayList; +import javax.swing.JOptionPane; +import Servicios.*; + + +public class HabitacionesDAO { + + public HabitacionesDAO(){ + + } + + /** + * + * @param h Objeto de la clase Habitacion a grabar + * @return rtdo resultado de la operación grabar + */ + public int grabarHabitacion(Habitacion h){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "INSERT INTO habitacion values (?,?,?,?,?,?,?)"; + pstm = con.prepareStatement(sql); + pstm.setInt(1, h.getId_habitacion()); + pstm.setString(2, h.getTipo_habitacion()); + pstm.setString(3, h.getPiso()); + pstm.setInt(4, h.getCantidadPersonas()); + pstm.setInt(5, h.getPrecio_hab()); + pstm.setInt(6, h.getNum_camas()); + pstm.setBoolean(7, h.getEstado()); + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Habitación : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Habitación : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return rtdo; + } + + /** + * + * @param h Objeto de la clase Habitacion a modificar + * @return rtdo resultado de la operación modificar + */ + public int modificarHabitacion(Habitacion h){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "UPDATE habitacion " + + "SET id_habitacion = ?, piso = ?, cantidad_personas = ?, precio_hab = ? " + + "WHERE id_habitacion = ?"; + pstm = con.prepareStatement(sql); + + pstm.setInt(1, h.getId_habitacion()); + // pstm.setString(2, h.getTipo_habitacion()); + pstm.setString(2, h.getPiso()); + pstm.setInt(3, h.getCantidadPersonas()); + pstm.setInt(4, h.getPrecio_hab()); + // pstm.setInt(6, h.getNum_camas()); + // pstm.setBoolean(7, h.getEstado());*/ + pstm.setInt(5, h.getId_habitacion()); + + + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Habitación : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Habitación : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return rtdo; + } + + /** + * + * @param id_habitacion código de la habitación a borrar + * @return rtdo resultado de la operación borrar + */ + public int borrarHabitacion(int id_habitacion){ + Connection con = null; + PreparedStatement pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "DELETE FROM habitacion WHERE id_habitacion = ? "; + pstm = con.prepareStatement(sql); + pstm.setInt(1, id_habitacion); + rtdo = pstm.executeUpdate(); + return rtdo; + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Habitación : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Habitación : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return rtdo; + } + + /** + * + * @param id_habitacion id de habitación a listar + * @return ArrayList, lista de objetos Habitación + */ + public ArrayList listadoHabitacion(){ + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + ArrayList listadoHabitacion = new ArrayList<>(); + try{ + con = Fachada.getConnection(); + String sql=""; + + sql = "SELECT * FROM habitacion ORDER BY id_habitacion"; + + pstm = con.prepareStatement(sql); + + rs = pstm.executeQuery(); + + Habitacion objhabitacion = null; + while(rs.next()){ + + objhabitacion = new Habitacion(); + objhabitacion.setId_habitacion(rs.getInt("id_habitacion")); + objhabitacion.setTipo_habitacion(rs.getString("tipo_habitacion")); + objhabitacion.setPiso(rs.getString("piso")); + objhabitacion.setCantidadPersonas(rs.getInt("cantidad_personas")); + objhabitacion.setPrecio_hab(rs.getInt("precio_hab")); + objhabitacion.setNum_camas(rs.getInt("num_camas")); + objhabitacion.setEstado(rs.getBoolean("estado")); + listadoHabitacion.add(objhabitacion); + } + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + finally{ + try{ + if(rs!=null) rs.close(); + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Habitación : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return listadoHabitacion; + + } + +public Habitacion extraerHabitaciones_porID(int idHabitacion) + { + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + + Habitacion habitacion = new Habitacion(); + try { + con = Fachada.getConnection(); + String sql = ""; + + sql + = "SELECT * FROM habitacion" + + " WHERE id_habitacion = ?"; + + pstm = con.prepareStatement(sql); + pstm.setInt(1, idHabitacion); + rs = pstm.executeQuery(); + + while (rs.next()) { + + habitacion.setId_habitacion(rs.getInt("id_habitacion")); + habitacion.setTipo_habitacion(rs.getString("tipo_habitacion")); + habitacion.setPiso(rs.getString("piso")); + habitacion.setCantidadPersonas(rs.getInt("cantidad_personas")); + habitacion.setPrecio_hab(rs.getInt("precio_hab")); + habitacion.setNum_camas(rs.getInt("num_camas")); + habitacion.setEstado(rs.getBoolean("estado")); + + } + } catch (SQLException ex) { + JOptionPane.showMessageDialog(null, "Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } finally { + try { + if (rs != null) { + rs.close(); + } + if (pstm != null) { + pstm.close(); + } + } catch (SQLException ex) { + JOptionPane.showMessageDialog(null, "Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return habitacion; + + } + + + +} \ No newline at end of file diff --git a/HotelAdmin/src/Modelo/Hospedaje.java b/HotelAdmin/src/Modelo/Hospedaje.java new file mode 100644 index 0000000..0b8dd1b --- /dev/null +++ b/HotelAdmin/src/Modelo/Hospedaje.java @@ -0,0 +1,136 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Modelo; + +import java.sql.Timestamp; +import java.util.Date; +/** + * + * @author crist + */ +public class Hospedaje { + private int id_hospedaje, id_habitacion, id_cliente, id_empleado,id_reserva; + private Timestamp fIngreso, fSalida; + private int numPersonas; + private boolean estado; + //---------Hospedaje con datos de Habitacion + private int piso; + + + public Hospedaje() { + Date fecha = new Date(); + this.id_hospedaje = 0; + this.id_habitacion = 0; + this.id_cliente = 0; + this.id_empleado = 0; + this.fIngreso = new Timestamp(fecha.getTime()); + this.fSalida = new Timestamp(fecha.getTime()); + this.numPersonas= 0; + this.estado = true; + this.piso = 0; + this.id_reserva = 0; + } + public Hospedaje(int iho, int iha, int icl, int iem, + Timestamp fin, Timestamp fsa, int nump, boolean es, int idr ) { + Date fecha = new Date(); + this.id_hospedaje = iho; + this.id_habitacion = iha; + this.id_cliente = icl; + this.id_empleado = iem; + this.fIngreso = fin; + this.fSalida = fsa; + this.numPersonas= nump; + this.estado = es; + this.id_reserva = idr; + } + public Hospedaje(int iho, int iha, int icl, int p ) { + Date fecha = new Date(); + this.id_hospedaje = iho; + this.id_habitacion = iha; + this.id_cliente = icl; + this.piso = p; + } + + //------------------------------ SET Hospedaje ---------------------------- + public void setIdHospedaje (int iho) + { + this.id_hospedaje = iho; + } + public void setIdHabitacion (int iha) + { + this.id_habitacion = iha; + } + public void setIdEmpleado (int iem) + { + this.id_empleado = iem; + } + public void setIdCliente (int icl) + { + this.id_cliente = icl; + } + + public void setFechaIngreso(Timestamp ingreso) + { + this.fIngreso = ingreso; + } + public void setFechaSalida(Timestamp salida) + { + this.fSalida = salida; + } + public void setNumeroPesonas(int nump) + { + this.numPersonas = nump; + } + + public void setEstado (boolean estado) + { + this.estado = estado; + } + public void setId_reserva(int idr){ + this.id_reserva = idr; + } + //-----------------------------GET Hospedaje-------------------------------- + public int getIdHospedaje () + { + return this.id_hospedaje; + } + public int getIdHabitacion () + { + return this.id_habitacion; + } + public int getIdEmpleado () + { + return this.id_empleado; + } + public int getIdCliente () + { + return this.id_cliente; + } + + public Timestamp getFechaIngreso() + { + return this.fIngreso; + } + public Timestamp getFechaSalida() + { + return this.fSalida; + } + public int getNumeroPesonas() + { + return this.numPersonas; + } + + public boolean getEstado () + { + return this.estado; + } + public int getId_reserva(){ + return this.id_reserva; + } + public int getPiso(){ + return this.piso; + } +} diff --git a/HotelAdmin/src/Modelo/HospedajeDAO.java b/HotelAdmin/src/Modelo/HospedajeDAO.java new file mode 100644 index 0000000..8971646 --- /dev/null +++ b/HotelAdmin/src/Modelo/HospedajeDAO.java @@ -0,0 +1,259 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Modelo; + +import Servicios.Fachada; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.swing.JOptionPane; + +/** + * + * @author crist + */ +public class HospedajeDAO { + private void mensajeError(SQLException ex){ + + JOptionPane.showMessageDialog(null,"Código "+ + ex.getErrorCode() + "\n Error" + ex.getMessage()); + } + //-------------------------------------------------------------------------- + public int grabarHospedaje(Hospedaje c){ + + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "INSERT INTO Hospedaje (id_hospedaje,id_habitacion," + + "id_cliente,id_empleado,FECHA_INGRESO,FECHA_SALIDA," + + "NUM_PERSONAS,estado,id_reserva) " + + " VALUES (?,?,?,?,?,?,?,?,?)"; + pstm = con.prepareStatement(sql); + pstm.setInt(1, c.getIdHospedaje()); + pstm.setInt(2, c.getIdHabitacion()); + pstm.setInt(3, c.getIdCliente()); + pstm.setInt(4, c.getIdEmpleado()); + pstm.setTimestamp(5, c.getFechaIngreso()); + pstm.setTimestamp(6, c.getFechaSalida()); + pstm.setInt(7, c.getNumeroPesonas()); + pstm.setBoolean(8, c.getEstado()); + pstm.setInt(9, c.getId_reserva()); + + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return rtdo; + } + //-------------------------------------------------------------------------- + public int modificarHospedaje(Hospedaje c){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "UPDATE hospedaje " + + "SET id_habitacion = ?,id_cliente = ?, id_empleado = ?," + + " fecha_ingreso = ?, fecha_salida = ?, num_personas = ?," + + " estado = ?" + + " WHERE id_hospedaje=?"; + pstm = con.prepareStatement(sql); + pstm.setInt(8, c.getIdHospedaje()); + pstm.setInt(1, c.getIdHabitacion()); + pstm.setInt(2, c.getIdCliente()); + pstm.setInt(3, c.getIdEmpleado()); + pstm.setTimestamp(4, c.getFechaIngreso()); + pstm.setTimestamp(5, c.getFechaSalida()); + pstm.setInt(6, c.getNumeroPesonas()); + pstm.setBoolean(7, c.getEstado()); + + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return rtdo; + } + //-------------------------------------------------------------------------- + public int borrarHospedaje(String id_hospedaje){ + Connection con = null; + PreparedStatement pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "DELETE FROM hospedaje " + + "WHERE id_hospedaje = ? "; + pstm = con.prepareStatement(sql); + pstm.setString(1, id_hospedaje); + rtdo = pstm.executeUpdate(); + return rtdo; + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return rtdo; + } + //-------------------------------------------------------------------------- + public int extraerUltimoId() + { + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + int id = 0; + try { + con = Fachada.getConnection(); + String sql = ""; + + sql = "select max(id_hospedaje) as id_hospedaje from hospedaje"; + + pstm = con.prepareStatement(sql); + + rs = pstm.executeQuery(); + + while (rs.next()) { + id = rs.getInt("id_hospedaje"); + + } + } catch (SQLException ex) { + mensajeError(ex); + } finally { + try { + if (rs != null) { + rs.close(); + } + if (pstm != null) { + pstm.close(); + } + } catch (SQLException ex) { + mensajeError(ex); + } + } + return id; + } + //-------------------------------------------------------------------------- + public ArrayList listadoHospedaje(int s){ + //si s=1 entonces muestra una vista con datos de la habitacion + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + ArrayList listado = new ArrayList<>(); + try{ + con = Fachada.getConnection(); + String sql=""; + if(s==0){ + sql = "SELECT * FROM hospedaje WHERE estado = TRUE"; //--------- + }else{ + sql = "SELECT * FROM datos_hospedaje "//--------- + + "ORDER BY id_hospedaje"; + } + pstm = con.prepareStatement(sql); + + rs = pstm.executeQuery(); + + Hospedaje h = null; + while(rs.next()){ + if(s==0){ + h = new Hospedaje( + rs.getInt("id_hospedaje"), + rs.getInt("id_habitacion"), + rs.getInt("id_cliente"), + rs.getInt("id_empleado"), + rs.getTimestamp("fecha_ingreso"), + rs.getTimestamp("fecha_salida"), + rs.getInt("num_personas"), + rs.getBoolean("estado"), + rs.getInt("id_reserva") + ); + } else { + h = new Hospedaje( + rs.getInt("id_hospedaje"), + rs.getInt("habitacion"), + rs.getInt("cedula_cliente"), + rs.getInt("piso") + ); + } + listado.add(h); + } + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(rs!=null) rs.close(); + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return listado; + } + //-------------------------------------------------------------------------- + public int cambiarEstado(int idHospedaje){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "UPDATE hospedaje " + + "SET estado = false" + + " WHERE id_hospedaje=?"; + pstm = con.prepareStatement(sql); + pstm.setInt(1, idHospedaje); + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return rtdo; + } +} + diff --git a/HotelAdmin/src/Modelo/LoginDAO.java b/HotelAdmin/src/Modelo/LoginDAO.java new file mode 100644 index 0000000..adc1a31 --- /dev/null +++ b/HotelAdmin/src/Modelo/LoginDAO.java @@ -0,0 +1,162 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Modelo; + +import Servicios.Fachada; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.swing.JOptionPane; +/** + * + * @author crist + */ +public class LoginDAO { + public int grabarLogin(LoginModelo c){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "INSERT INTO Login values (?,?)"; + pstm = con.prepareStatement(sql); + pstm.setInt(1, Integer.parseInt(c.getUsuario())); + pstm.setString(2, c.getContrasena()); + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError : " + + "Ocurrio un error al almacenar el usuario"); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError : " + + "Ocurrio un error al almacenar el usuario"); + } + } + return rtdo; + } + public int modificarLogin(LoginModelo c){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "UPDATE Login " + + "SET ID_empleado = ?,contrasena = ?" + + "WHERE ID_empleado=?"; + pstm = con.prepareStatement(sql); + pstm.setString(1, c.getUsuario()); + pstm.setString(2, c.getContrasena()); + + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return rtdo; + } + + public int borrarLogin(String usuario){ + Connection con = null; + PreparedStatement pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "DELETE FROM Login WHERE ID_empleado = ? "; + pstm = con.prepareStatement(sql); + pstm.setString(1, usuario); + rtdo = pstm.executeUpdate(); + return rtdo; + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return rtdo; + } + public ArrayList listadoLogin(int usuario){ + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + ArrayList listado = new ArrayList<>(); + try{ + con = Fachada.getConnection(); + String sql=""; + if(usuario==0){ + sql = "SELECT * FROM Login ORDER BY id_empleado"; + }else{ + sql = "SELECT * FROM Login where id_empleado = ? " + + "ORDER BY id_empleado"; + } + pstm = con.prepareStatement(sql); + + if(usuario != 0){ + pstm.setInt(1, usuario); + } + + rs = pstm.executeQuery(); + + LoginModelo login = null; + while(rs.next()){ + login = new LoginModelo(); + login.setUsuario(rs.getString("id_empleado")); + + login.setContrasena(rs.getString("contrasena")); + + listado.add(login); + } + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + + "Ocurrio un error durante la verificacion"); + } + finally{ + try{ + if(rs!=null) rs.close(); + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + + "Ocurrio un error durante la verificacion"); + } + } + return listado; + } +} diff --git a/HotelAdmin/src/Modelo/LoginModelo.java b/HotelAdmin/src/Modelo/LoginModelo.java new file mode 100644 index 0000000..ff9f022 --- /dev/null +++ b/HotelAdmin/src/Modelo/LoginModelo.java @@ -0,0 +1,41 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Modelo; + +/** + * + * @author crist + */ +public class LoginModelo { + private String usuario; + private String contrasena; + + + public LoginModelo(){ + usuario=""; + contrasena=""; + } + public LoginModelo(String usuario, String contrasena){ + this.usuario = usuario; + this.contrasena = contrasena; + } + + public String getUsuario(){ + return this.usuario; + } + + public String getContrasena(){ + return this.contrasena; + } + + public void setContrasena(String contrasena){ + this.contrasena = contrasena; + } + + public void setUsuario(String usuario){ + this.usuario = usuario; + } +} diff --git a/HotelAdmin/src/Modelo/Persona.java b/HotelAdmin/src/Modelo/Persona.java index fac431a..1c6d698 100644 --- a/HotelAdmin/src/Modelo/Persona.java +++ b/HotelAdmin/src/Modelo/Persona.java @@ -11,6 +11,68 @@ */ public class Persona { protected int ID; - protected String nombre, correo, telefono, direccion; + protected String nombre, apellido, correo, telefono, direccion; + //-------------------- SET ------------------------------------------------- + public void setNombre(String nombre) + { + this.nombre = nombre; + } + + public void setApellido(String apellido) + { + this.apellido = apellido; + } + + public void setCorreo(String correo) + { + this.correo = correo; + } + + public void setTelefono(String telefono) + { + this.telefono = telefono; + } + + public void setDireccion(String direccion) + { + this.direccion = direccion; + } + + public void setID(int id) + { + this.ID = id; + } + + //------------------------- GET -------------------------------------------- + + public String getNombre() + { + return nombre; + } + + public String getApellido() + { + return apellido; + } + + public String getCorreo() + { + return correo; + } + + public String getTelefono() + { + return telefono; + } + + public String getDireccion() + { + return direccion; + } + + public int getID() + { + return ID; + } } diff --git a/HotelAdmin/src/Modelo/Reserva.java b/HotelAdmin/src/Modelo/Reserva.java index 555d3dd..010c6ef 100644 --- a/HotelAdmin/src/Modelo/Reserva.java +++ b/HotelAdmin/src/Modelo/Reserva.java @@ -13,8 +13,88 @@ */ public class Reserva { - private int numero_reserva, dias_estancia; + private int numero_reserva, num_Personas; + private int num_Habitacion, numCliente, num_Empleado; private Timestamp fecha_reserva, fecha_ingreso, fecha_salida; - private Habitacion unaHabitacion; - private Cliente unCliente; + + + + public int getNumero_reserva() { + return numero_reserva; + } + + public int getNum_Personas() { + return num_Personas; + + } + + public Timestamp getFecha_reserva() { + return fecha_reserva; + } + + public Timestamp getFecha_ingreso() { + return fecha_ingreso; + } + + public Timestamp getFecha_salida() { + return fecha_salida; + } + + public int getNum_Habitacion() { + return num_Habitacion; + } + + public int getNumCliente() { + return numCliente; + } + + public int getNum_Empleado() { + return num_Empleado; + } + + + + + + public void setNumero_reserva(int numero_reserva) { + this.numero_reserva = numero_reserva; + } + + public void setNum_Personas(int num_Personas) { + this.num_Personas = num_Personas; + } + + public void setFecha_reserva(Timestamp fecha_reserva) { + this.fecha_reserva = fecha_reserva; + } + + public void setFecha_ingreso(Timestamp fecha_ingreso) { + this.fecha_ingreso = fecha_ingreso; + } + + public void setFecha_salida(Timestamp fecha_salida) { + this.fecha_salida = fecha_salida; + } + + public void setNum_Habitacion(int num_Habitacion) { + this.num_Habitacion = num_Habitacion; + } + + public void setNumCliente(int numCliente) { + this.numCliente = numCliente; + } + + public void setNum_Empleado(int num_Empleado) { + this.num_Empleado = num_Empleado; + } + + + + + + + + + + } diff --git a/HotelAdmin/src/Modelo/ReservaDAO.java b/HotelAdmin/src/Modelo/ReservaDAO.java new file mode 100644 index 0000000..bb84757 --- /dev/null +++ b/HotelAdmin/src/Modelo/ReservaDAO.java @@ -0,0 +1,526 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Modelo; + +import Servicios.Fachada; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.ArrayList; +import javax.swing.JOptionPane; + +/** + * + * @author Usuario + */ + + +public class ReservaDAO { + + + + + public static void mensajeError(SQLException ex){ + + JOptionPane.showMessageDialog(null,"Código "+ + ex.getErrorCode() + "\n Error" + ex.getMessage()); + } + + + public static int extraerUltimoId() + { + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + int id = 0; + + + try { + con = Fachada.getConnection(); + String sql = ""; + + sql + = "select max(id_reserva) as id_reserva from reserva"; + + pstm = con.prepareStatement(sql); + + rs = pstm.executeQuery(); + + while (rs.next()) { + id = rs.getInt("id_reserva"); + + } + } catch (SQLException ex) { + mensajeError(ex);; + } finally { + try { + if (rs != null) { + rs.close(); + } + if (pstm != null) { + pstm.close(); + } + } catch (SQLException ex) { + mensajeError(ex); + } + } + return id; + } + + + + public static int grabarReserva (Reserva reserva) + { + Connection con = null; + PreparedStatement pstm; + pstm= null; + int rtdo; + rtdo= 0; + + try{ + con = Fachada.getConnection(); + String sql = "INSERT INTO reserva values(?,?,?,?,?,?,?,?)"; + + pstm = con.prepareStatement(sql); + pstm.setInt(1,reserva.getNumero_reserva()); + pstm.setInt(2,reserva.getNum_Habitacion()); + pstm.setInt(3, reserva.getNumCliente()); + pstm.setInt(4, reserva.getNum_Empleado()); + pstm.setTimestamp(5, reserva.getFecha_reserva()); + pstm.setTimestamp(6, reserva.getFecha_ingreso()); + pstm.setTimestamp(7, reserva.getFecha_salida()); + pstm.setInt(8, reserva.getNum_Personas()); + + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + + } + finally{ + try{ + if (pstm != null) pstm.close(); + } + catch(SQLException ex) + { + + } + } + return rtdo; + } + + + + public static ArrayList listadoReservas(){ + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + ArrayList listadoReservas = new ArrayList<>(); + try{ + con = Fachada.getConnection(); + String sql=""; + + sql = "SELECT * FROM reserva ORDER BY fecha_ingreso"; + + + pstm = con.prepareStatement(sql); + rs = pstm.executeQuery(); + Reserva objReserva = null; + + while(rs.next()){ + + objReserva = new Reserva(); + objReserva.setNumero_reserva(rs.getInt("id_reserva")); + objReserva.setNum_Habitacion(rs.getInt("id_habitacion")); + objReserva.setNumCliente(rs.getInt("id_cliente")); + objReserva.setNum_Empleado(rs.getInt("id_empleado")); + objReserva.setFecha_reserva(rs.getTimestamp("fecha_reserva")); + objReserva.setFecha_ingreso(rs.getTimestamp("fecha_ingreso")); + objReserva.setFecha_salida(rs.getTimestamp("fecha_salida")); + objReserva.setNum_Personas(rs.getInt("num_personas")); + listadoReservas.add(objReserva); + } + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(rs!=null) rs.close(); + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return listadoReservas; + } + + + public ArrayList listReservasLike(int i){ + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + ArrayList listadoReservas = new ArrayList<>(); + try{ + con = Fachada.getConnection(); + String sql=""; + + sql = " select * from Reserva where " + + "(SELECT CAST (id_cliente AS varchar(1))) like '"+i+"%'"; + + + pstm = con.prepareStatement(sql); + rs = pstm.executeQuery(); + Reserva objReserva = null; + + while(rs.next()){ + + objReserva = new Reserva(); + objReserva.setNumero_reserva(rs.getInt("id_reserva")); + objReserva.setNum_Habitacion(rs.getInt("id_habitacion")); + objReserva.setNumCliente(rs.getInt("id_cliente")); + objReserva.setNum_Empleado(rs.getInt("id_empleado")); + objReserva.setFecha_reserva(rs.getTimestamp("fecha_reserva")); + objReserva.setFecha_ingreso(rs.getTimestamp("fecha_ingreso")); + objReserva.setFecha_salida(rs.getTimestamp("fecha_salida")); + objReserva.setNum_Personas(rs.getInt("num_personas")); + listadoReservas.add(objReserva); + } + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(rs!=null) rs.close(); + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return listadoReservas; + } + + + public static Reserva extraerReserva_porID(int idReserva) + { + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + Reserva objReserva = new Reserva(); + + try { + con = Fachada.getConnection(); + String sql = ""; + + sql = "SELECT * FROM reserva" + + " WHERE id_reserva = ?"; + + pstm = con.prepareStatement(sql); + pstm.setInt(1, idReserva); + rs = pstm.executeQuery(); + + while (rs.next()) { + objReserva = new Reserva(); + objReserva.setNumero_reserva(rs.getInt("id_reserva")); + objReserva.setNum_Habitacion(rs.getInt("id_habitacion")); + objReserva.setNumCliente(rs.getInt("id_cliente")); + objReserva.setNum_Empleado(rs.getInt("id_empleado")); + objReserva.setFecha_reserva(rs.getTimestamp("fecha_reserva")); + objReserva.setFecha_ingreso(rs.getTimestamp("fecha_ingreso")); + objReserva.setFecha_salida(rs.getTimestamp("fecha_salida")); + objReserva.setNum_Personas(rs.getInt("num_personas")); + + } + } catch (SQLException ex) { + mensajeError(ex); + } finally { + try { + if (rs != null) { + rs.close(); + } + if (pstm != null) { + pstm.close(); + } + } catch (SQLException ex) { + mensajeError(ex); + } + } + return objReserva; + + } + + + public int modificarReserva(Reserva reserva){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "UPDATE reserva " + + "SET id_reserva = ?, id_habitacion = ?, id_cliente = ?," + + " id_empleado = ?, fecha_reserva = ?, fecha_ingreso = ?," + + " fecha_salida = ?, num_personas = ? " + + "WHERE id_reserva = ?"; + + pstm = con.prepareStatement(sql); + + pstm.setInt(1, reserva.getNumero_reserva()); + pstm.setInt(2,reserva.getNum_Habitacion()); + pstm.setInt(3, reserva.getNumCliente()); + pstm.setInt(4, reserva.getNum_Empleado()); + pstm.setTimestamp(5, reserva.getFecha_reserva()); + pstm.setTimestamp(6, reserva.getFecha_ingreso()); + pstm.setTimestamp(7, reserva.getFecha_salida()); + pstm.setInt(8, reserva.getNum_Personas()); + pstm.setInt(9, reserva.getNumero_reserva()); + + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return rtdo; + } + + + + public Reserva getReserva(int idcliente) + { + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + Reserva objReserva = new Reserva(); + + try { + con = Fachada.getConnection(); + String sql = ""; + + sql = "SELECT * FROM reserva" + + " WHERE id_cliente = ?"; + + pstm = con.prepareStatement(sql); + pstm.setInt(1, idcliente); + rs = pstm.executeQuery(); + + while (rs.next()) { + objReserva = new Reserva(); + objReserva.setNumero_reserva(rs.getInt("id_reserva")); + objReserva.setNum_Habitacion(rs.getInt("id_habitacion")); + objReserva.setNumCliente(rs.getInt("id_cliente")); + objReserva.setNum_Empleado(rs.getInt("id_empleado")); + objReserva.setFecha_reserva(rs.getTimestamp("fecha_reserva")); + objReserva.setFecha_ingreso(rs.getTimestamp("fecha_ingreso")); + objReserva.setFecha_salida(rs.getTimestamp("fecha_salida")); + objReserva.setNum_Personas(rs.getInt("num_personas")); + + } + } catch (SQLException ex) { + mensajeError(ex); + + } finally { + try { + if (rs != null) { + rs.close(); + } + if (pstm != null) { + pstm.close(); + } + } catch (SQLException ex) { + mensajeError(ex); + } + } + return objReserva; + } + + + public int borrarReserva(int id_reserva){ + Connection con = null; + PreparedStatement pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "DELETE FROM reserva WHERE id_reserva = ?"; + pstm = con.prepareStatement(sql); + pstm.setInt(1, id_reserva); + rtdo = pstm.executeUpdate(); + return rtdo; + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return rtdo; + } + + + + public ArrayList listadoHabitacion + (Timestamp fi, Timestamp fs,String modo,int idReserva){ + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + ArrayList listadoHabitacion = new ArrayList<>(); + try{ + con = Fachada.getConnection(); + String sql=""; + if(modo.equals("save")){ + sql = + "SELECT * FROM HABITACION " + + "WHERE ID_HABITACION " + + "NOT IN " + + "(SELECT ID_HABITACION FROM RESERVA " + + "WHERE ((FECHA_INGRESO BETWEEN ? AND ?) " + + "OR (FECHA_SALIDA BETWEEN ? AND ?)) " + + "OR((? BETWEEN FECHA_INGRESO AND FECHA_SALIDA ) " + + "AND (? BETWEEN FECHA_INGRESO AND FECHA_SALIDA))) " + + "INTERSECT " + + "SELECT * FROM HABITACION " + + "WHERE ID_HABITACION " + + "NOT IN " + + "(SELECT ID_HABITACION FROM HOSPEDAJE " + + "WHERE ((FECHA_INGRESO BETWEEN ? AND ?) " + + "OR (FECHA_SALIDA BETWEEN ? AND ?)) " + + "OR((? BETWEEN FECHA_INGRESO AND FECHA_SALIDA ) " + + "AND (? BETWEEN FECHA_INGRESO AND FECHA_SALIDA))) " + + "ORDER BY ID_HABITACION"; + + + pstm = con.prepareStatement(sql); + pstm.setTimestamp(1, fi); + pstm.setTimestamp(2, fs); + pstm.setTimestamp(3, fi); + pstm.setTimestamp(4, fs); + pstm.setTimestamp(5, fi); + pstm.setTimestamp(6, fs); + pstm.setTimestamp(7, fi); + pstm.setTimestamp(8, fs); + pstm.setTimestamp(9, fi); + pstm.setTimestamp(10, fs); + pstm.setTimestamp(11, fi); + pstm.setTimestamp(12, fs); + + System.out.println("Modo save"); + + }else if(modo.equals("update")){ + + System.err.println("modoe update"); + sql = + "SELECT * FROM HABITACION WHERE ID_HABITACION = " + + "(SELECT ID_HABITACION FROM RESERVA WHERE ID_RESERVA = ?) " + + "AND ID_HABITACION NOT IN " + + "(SELECT HABITACION.ID_HABITACION FROM HABITACION , " + + "(SELECT * FROM RESERVA WHERE ID_HABITACION IN " + + "(SELECT ID_HABITACION FROM RESERVA WHERE ID_RESERVA = ?) " + + "AND (FECHA_INGRESO BETWEEN ? AND ? OR " + + "FECHA_SALIDA BETWEEN ? AND ?))AS R " + + "WHERE R.ID_HABITACION = HABITACION.ID_HABITACION" + + " AND R.ID_RESERVA <> ?) " + + + + "UNION SELECT * FROM HABITACION " + + "WHERE ID_HABITACION " + + "NOT IN " + + "(SELECT ID_HABITACION FROM RESERVA " + + "WHERE ((FECHA_INGRESO BETWEEN ? AND ?) " + + "OR (FECHA_SALIDA BETWEEN ? AND ?)) " + + "OR((? BETWEEN FECHA_INGRESO AND FECHA_SALIDA ) " + + "AND (? BETWEEN FECHA_INGRESO AND FECHA_SALIDA))) " + + "INTERSECT " + + "SELECT * FROM HABITACION " + + "WHERE ID_HABITACION " + + "NOT IN " + + "(SELECT ID_HABITACION FROM HOSPEDAJE " + + "WHERE ((FECHA_INGRESO BETWEEN ? AND ?) " + + "OR (FECHA_SALIDA BETWEEN ? AND ?)) " + + "OR((? BETWEEN FECHA_INGRESO AND FECHA_SALIDA ) " + + "AND (? BETWEEN FECHA_INGRESO AND FECHA_SALIDA))) " + + "ORDER BY ID_HABITACION"; + + pstm = con.prepareStatement(sql); + pstm.setInt(1, idReserva); + pstm.setInt(2, idReserva); + pstm.setTimestamp(3, fi); + pstm.setTimestamp(4, fs); + pstm.setTimestamp(5, fi); + pstm.setTimestamp(6, fs); + pstm.setInt(7, idReserva); + pstm.setTimestamp(8, fi); + pstm.setTimestamp(9, fs); + pstm.setTimestamp(10, fi); + pstm.setTimestamp(11, fs); + pstm.setTimestamp(12, fi); + pstm.setTimestamp(13, fs); + pstm.setTimestamp(14, fi); + pstm.setTimestamp(15, fs); + pstm.setTimestamp(16, fi); + pstm.setTimestamp(17, fs); + pstm.setTimestamp(18, fi); + pstm.setTimestamp(19, fs); + } + + rs = pstm.executeQuery(); + + + Habitacion objhabitacion = null; + while(rs.next()){ + + objhabitacion = new Habitacion(); + objhabitacion.setId_habitacion(rs.getInt("id_habitacion")); + objhabitacion.setTipo_habitacion( + rs.getString("tipo_habitacion")); + objhabitacion.setPiso(rs.getString("piso")); + objhabitacion.setCantidadPersonas( + rs.getInt("cantidad_personas")); + objhabitacion.setPrecio_hab(rs.getInt("precio_hab")); + objhabitacion.setNum_camas(rs.getInt("num_camas")); + objhabitacion.setEstado(rs.getBoolean("estado")); + listadoHabitacion.add(objhabitacion); + } + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + finally{ + try{ + if(rs!=null) rs.close(); + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Habitación : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return listadoHabitacion; + + } + + + + +} diff --git a/HotelAdmin/src/Modelo/RoomServices.java b/HotelAdmin/src/Modelo/RoomServices.java new file mode 100644 index 0000000..b316988 --- /dev/null +++ b/HotelAdmin/src/Modelo/RoomServices.java @@ -0,0 +1,67 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Modelo; + +/** + * + * @author Usuario + */ +public class RoomServices { + + String nombrePro; + int cantidad,id_servicio; + Double precio; + + public RoomServices() { + } + + /* + public RoomServices(String id_servicio, String nombrePro, int cantidad, Double precio) { + this.id_servicio = id_servicio; + this.nombrePro = nombrePro; + this.cantidad = cantidad; + this.precio = precio; + }*/ + + + + public int getId_servicio() { + return id_servicio; + } + + public String getNombrePro() { + return nombrePro; + } + + public int getCantidad() { + return cantidad; + } + + public Double getPrecio() { + return precio; + } + + public void setId_servicio(int id_servicio) { + this.id_servicio = id_servicio; + } + + public void setNombrePro(String nombrePro) { + this.nombrePro = nombrePro; + } + + public void setCantidad(int cantidad) { + this.cantidad = cantidad; + } + + public void setPrecio(Double precio) { + this.precio = precio; + } + + + + + +} diff --git a/HotelAdmin/src/Modelo/RoomServicesDAO.java b/HotelAdmin/src/Modelo/RoomServicesDAO.java new file mode 100644 index 0000000..5b4a10f --- /dev/null +++ b/HotelAdmin/src/Modelo/RoomServicesDAO.java @@ -0,0 +1,265 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Modelo; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.SQLException; +import javax.swing.JOptionPane; +import Servicios.*; +import java.sql.ResultSet; +import java.util.ArrayList; + +/** + * + * @author Usuario + */ +public class RoomServicesDAO { + + public int grabarServicio (RoomServices rs) + { + Connection con = null; + PreparedStatement pstm; + pstm= null; + int rtdo; + rtdo= 0; + try{ + con = Fachada.getConnection(); + String sql = "INSERT INTO roomservices values(?,?,?,?)"; + + pstm = con.prepareStatement(sql); + + pstm.setInt(1, rs.getId_servicio()); + pstm.setString(2,rs.getNombrePro()); + pstm.setInt(3, rs.getCantidad()); + pstm.setDouble(4, rs.getPrecio()); + + rtdo = pstm.executeUpdate(); + + } + + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código "+ + ex.getErrorCode() + "\n Error" + ex.getMessage()); + } + + finally{ + try{ + if (pstm != null) pstm.close(); + } + catch(SQLException ex) + { + JOptionPane.showMessageDialog(null, " Código : "+ + ex.getErrorCode() + " \n Error : " + ex.getMessage()); + } + } + return rtdo; + } + + public ArrayList listadoRoomServices(){ + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + ArrayList listadoServicios = new ArrayList<>(); + try{ + con = Fachada.getConnection(); + String sql=""; + + sql = "SELECT * FROM RoomServices ORDER BY id_servicio"; + + pstm = con.prepareStatement(sql); + + rs = pstm.executeQuery(); + + RoomServices objRoomServices = null; + while(rs.next()){ + + objRoomServices = new RoomServices(); + objRoomServices.setId_servicio(rs.getInt("id_servicio")); + objRoomServices.setNombrePro(rs.getString("nombre_pro")); + objRoomServices.setPrecio(rs.getDouble("precio")); + objRoomServices.setCantidad(rs.getInt("cantidad")); + listadoServicios.add(objRoomServices); + } + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + finally{ + try{ + if(rs!=null) rs.close(); + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Habitación : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return listadoServicios; + + } + + public RoomServices extraerServicio_porID(int idServicio) + { + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + + RoomServices servicio = new RoomServices(); + try { + con = Fachada.getConnection(); + String sql = ""; + + sql + = "SELECT * FROM roomservices" + + " WHERE id_Servicio = ?"; + + pstm = con.prepareStatement(sql); + pstm.setInt(1, idServicio); + rs = pstm.executeQuery(); + + while (rs.next()) { + servicio.setId_servicio(rs.getInt("id_servicio")); + servicio.setNombrePro(rs.getString("nombre_pro")); + servicio.setCantidad(rs.getInt("cantidad")); + servicio.setPrecio(rs.getDouble("precio")); + + } + } catch (SQLException ex) { + JOptionPane.showMessageDialog(null, "Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } finally { + try { + if (rs != null) { + rs.close(); + } + if (pstm != null) { + pstm.close(); + } + } catch (SQLException ex) { + JOptionPane.showMessageDialog(null, "Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return servicio; + + } + + public int extraerUltimoId() + { + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + int id= 0; + + + try { + con = Fachada.getConnection(); + String sql = ""; + + sql + = "select max(id_servicio) as id_servicio from roomservices"; + + pstm = con.prepareStatement(sql); + //pstm.setString(1, idServicio); + rs = pstm.executeQuery(); + + while (rs.next()) { + id = rs.getInt("id_servicio"); + + } + } catch (SQLException ex) { + JOptionPane.showMessageDialog(null, "Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } finally { + try { + if (rs != null) { + rs.close(); + } + if (pstm != null) { + pstm.close(); + } + } catch (SQLException ex) { + JOptionPane.showMessageDialog(null, "Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return id; + } + + public int modificarRoomSercices(RoomServices roomServices){ + Connection con = null; + PreparedStatement pstm; + pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "UPDATE RoomServices " + + "SET id_Servicio = ?, nombre_Pro = ?, cantidad = ?, precio = ?" + + "WHERE id_Servicio = ?"; + + pstm = con.prepareStatement(sql); + pstm.setInt(1, roomServices.getId_servicio()); + pstm.setString(2,roomServices.getNombrePro()); + pstm.setInt(3, roomServices.getCantidad()); + pstm.setDouble(4, roomServices.getPrecio()); + pstm.setInt(5, roomServices.getId_servicio()); + + rtdo = pstm.executeUpdate(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return rtdo; + } + + + public int borrarServicio(int id_servicio){ + Connection con = null; + PreparedStatement pstm = null; + int rtdo; + rtdo = 0; + try{ + con = Fachada.getConnection(); + String sql = "DELETE FROM roomServices WHERE id_servicio = ?"; + pstm = con.prepareStatement(sql); + pstm.setInt(1, id_servicio); + rtdo = pstm.executeUpdate(); + return rtdo; + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + finally{ + try{ + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + JOptionPane.showMessageDialog(null,"Código : " + + ex.getErrorCode() + "\nError :" + ex.getMessage()); + } + } + return rtdo; + } + + + + + +} diff --git a/HotelAdmin/src/Modelo/ServiciosAdicionado.java b/HotelAdmin/src/Modelo/ServiciosAdicionado.java new file mode 100644 index 0000000..a14fc2f --- /dev/null +++ b/HotelAdmin/src/Modelo/ServiciosAdicionado.java @@ -0,0 +1,88 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Modelo; + +/** + * + * @author crist + */ +public class ServiciosAdicionado { + //--------------Vista-------------- + private int id_checkout, id_servicio, cantidad, precio, total; + private String nombre_producto; + + public ServiciosAdicionado(){ + this.id_checkout = 0; + this.id_servicio = 0; + this.cantidad = 0; + this.precio = 0; + this.total = 0; + this.nombre_producto = ""; + } + + public ServiciosAdicionado(int id_checkout,int id_servicio,int cantidad, + int precio,int total,String nombre_pro){ + this.id_checkout = id_checkout; + this.id_servicio = id_servicio; + this.cantidad = cantidad; + this.precio = precio; + this.total = total; + this.nombre_producto = nombre_pro; + } + //----------------------GET------------------------------------------------- + public int getIdCheckout() + { + return id_checkout; + } + public int getIdServicio() + { + return id_servicio; + } + public int getcantidad() + { + return cantidad; + } + public int getPrecio() + { + return precio; + } + public int getTotal() + { + return total; + } + public String getNombreProducto() + { + return nombre_producto; + } + + + //---------------------SET-------------------------------------------------- + public void setIdCheckout(int m) + { + id_checkout = m; + } + public void setIdServicio(int m) + { + id_servicio = m; + } + public void setcantidad(int m) + { + cantidad = m; + } + public void setPrecio(int m) + { + precio = m; + } + public void setTotal(int m) + { + total = m; + } + public void setNombreProducto(String m) + { + nombre_producto = m; + } + +} diff --git a/HotelAdmin/src/Modelo/ServiciosAdicionadoDAO.java b/HotelAdmin/src/Modelo/ServiciosAdicionadoDAO.java new file mode 100644 index 0000000..b48e7a6 --- /dev/null +++ b/HotelAdmin/src/Modelo/ServiciosAdicionadoDAO.java @@ -0,0 +1,70 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Modelo; + +import Servicios.Fachada; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.swing.JOptionPane; + +/** + * + * @author crist + */ +public class ServiciosAdicionadoDAO { + private void mensajeError(SQLException ex){ + + JOptionPane.showMessageDialog(null,"Código "+ + ex.getErrorCode() + "\n Error" + ex.getMessage()); + } + public ArrayList listadoSH(int idcheckout){ + Connection con = null; + PreparedStatement pstm = null; + ResultSet rs = null; + ArrayList listado = new ArrayList<>(); + try{ + con = Fachada.getConnection(); + String sql=""; + + sql = "SELECT * FROM servicioscheckout " + + "WHERE id_checkout = ?"; + + pstm = con.prepareStatement(sql); + pstm.setInt(1, idcheckout); + + rs = pstm.executeQuery(); + + ServiciosAdicionado h = null; + while(rs.next()){ + h = new ServiciosAdicionado( + rs.getInt("id_checkout"), + rs.getInt("id_servicio"), + rs.getInt("cantidad"), + rs.getInt("precio"), + rs.getInt("total"), + rs.getString("nombre_pro") + ); + listado.add(h); + } + } + catch(SQLException ex){ + mensajeError(ex); + } + finally{ + try{ + if(rs!=null) rs.close(); + if(pstm!=null) pstm.close(); + } + catch(SQLException ex){ + mensajeError(ex); + } + } + return listado; + } +} diff --git a/HotelAdmin/dist/lib/AbsoluteLayout.jar b/HotelAdmin/src/Servicios/AbsoluteLayout.jar similarity index 100% rename from HotelAdmin/dist/lib/AbsoluteLayout.jar rename to HotelAdmin/src/Servicios/AbsoluteLayout.jar diff --git a/HotelAdmin/src/Servicios/Fachada.java b/HotelAdmin/src/Servicios/Fachada.java new file mode 100644 index 0000000..24dafda --- /dev/null +++ b/HotelAdmin/src/Servicios/Fachada.java @@ -0,0 +1,56 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Servicios; +import java.sql.*; +import java.util.ResourceBundle; +import javax.swing.JOptionPane; +/** + * + * @author Leonardo + */ +public class Fachada { +private static Connection con = null; + + public static Connection getConnection(){ + try + { + if(con == null){ + + Runtime.getRuntime().addShutdownHook(new MiShDwnHook()); + + ResourceBundle rb = ResourceBundle.getBundle("Servicios.jdbc"); + String driver = rb.getString("driver"); + String url = rb.getString("url"); + String pwd = rb.getString("pwd"); + String usr = rb.getString("usr"); + + Class.forName(driver); + con = DriverManager.getConnection(url, usr, pwd); + } + + } + catch(ClassNotFoundException | SQLException ex){ + JOptionPane.showMessageDialog(null,"Error : " + + ex.getMessage()); + } + return con; + } + + static class MiShDwnHook extends Thread{ + + @Override + public void run(){ + try{ + Connection con = Fachada.getConnection(); + con.close(); + } + catch (Exception ex){ + JOptionPane.showMessageDialog(null,"Error : " + + ex.getMessage()); + } + } + } +} diff --git a/HotelAdmin/src/Servicios/Fecha.java b/HotelAdmin/src/Servicios/Fecha.java new file mode 100644 index 0000000..732a8b2 --- /dev/null +++ b/HotelAdmin/src/Servicios/Fecha.java @@ -0,0 +1,117 @@ +/* + * Programa : PROYECTO PROGRAMACION INTERACTIVA 2019- DVD RENTAL + * Fecha : Septiembre-2019 + * Objetivo : Establecer y/o fecha en formato Timestamp y Date + * Programadores : Cristhian Guzman, Nathalia Riascos, Vanesa Cifuentes + * Clase : Fachada + */ +package Servicios; + +import Vistas.Jpanel.RealizarReservaGUI; +import java.sql.Timestamp; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.logging.Level; +import java.util.logging.Logger; + + +public class Fecha { + + public static Timestamp crearFechaTimestamp() { + + Calendar calendar = Calendar.getInstance(); + java.util.Date now = calendar.getTime(); + Timestamp currentTimestamp = new java.sql.Timestamp(now.getTime()); + return currentTimestamp; + + + } + + + public static Timestamp formatearFechaIngreso(Date now){ + Timestamp currentTimestamp; + SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyyy"); + String fechaString = format.format(now); + fechaString += " 14:00:00"; + format = new SimpleDateFormat("dd/MM/yyyyy HH:mm:ss"); + + try { + now = format.parse(fechaString); + + } catch (ParseException ex) { + Logger.getLogger(Fecha.class.getName()).log(Level.SEVERE, null, ex); + } + currentTimestamp = new Timestamp(now.getTime()); + return currentTimestamp; + } + + public static Timestamp formatearFechaSalida(Date now){ + Timestamp currentTimestamp; + SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyyy"); + String fechaString = format.format(now); + fechaString += " 12:00:00"; + format = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); + + try { + + now = format.parse(fechaString); + + } catch (ParseException ex) { + Logger.getLogger(Fecha.class.getName()).log(Level.SEVERE, null, ex); + } + currentTimestamp = new Timestamp(now.getTime()); + return currentTimestamp; + } + + + + public static Date dateTomorrow(Date now) + { + + Date f = new Date(now.getTime()+86400000); + return f; + } + + + public static Timestamp toTimestamp(String now) + { + now = now.substring(0,now.length()-2); + char array[] = now.toCharArray(); + for(int i = 0; i < now.length();i++) + { + + if(array[i] == '-'){ + array[i] = '/'; + } + } + + now = new String(array); + System.out.println(now); + SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); + Date fecha = null; + try { + fecha = format.parse(now); + + Timestamp f = new Timestamp(fecha.getTime()); + return f; + } catch (ParseException ex) { + Logger.getLogger(Fecha.class.getName()).log(Level.SEVERE, null, ex); + } + return (Timestamp)fecha; + + } + + + public static Timestamp crearFechaTimeStampEspecifico(int año,int mes,int dia) + { + Calendar calendar = Calendar.getInstance(); + java.util.Date now; + calendar.set(año,mes-1,dia,0,0,0); + now = calendar.getTime(); + Timestamp currentTimestamp = new java.sql.Timestamp(now.getTime()); + return currentTimestamp; + } +} diff --git a/HotelAdmin/src/Servicios/JFopciones.form b/HotelAdmin/src/Servicios/JFopciones.form new file mode 100644 index 0000000..cf84b52 --- /dev/null +++ b/HotelAdmin/src/Servicios/JFopciones.form @@ -0,0 +1,207 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Servicios/JFopciones.java b/HotelAdmin/src/Servicios/JFopciones.java new file mode 100644 index 0000000..ce0ba99 --- /dev/null +++ b/HotelAdmin/src/Servicios/JFopciones.java @@ -0,0 +1,260 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Servicios; + +import Vistas.Jpanel.jPhabitacion; +import Vistas.Jpanel.jPservicio; +import javax.swing.JPanel; + +/** + * + * @author Usuario + */ +public class JFopciones extends javax.swing.JFrame{ + + /** + * Creates new form NewJFrame + */ + JPanel panel; + + public JFopciones(jPservicio panel) { + initComponents(); + this.panel = panel; + setVisible(true); + setLocationRelativeTo(panel); + setResizable(false); + setDefaultCloseOperation(DISPOSE_ON_CLOSE); + } + + + public JFopciones(jPhabitacion panel) { + initComponents(); + setVisible(true); + setLocationRelativeTo(panel); + setResizable(false); + setDefaultCloseOperation(DISPOSE_ON_CLOSE); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + buttonGroup1 = new javax.swing.ButtonGroup(); + jPanel1 = new javax.swing.JPanel(); + jPanel2 = new javax.swing.JPanel(); + jRadioButton1 = new javax.swing.JRadioButton(); + jRadioButton2 = new javax.swing.JRadioButton(); + jButton1 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + jPanel1.setBackground(new java.awt.Color(255, 255, 255)); + jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder("Options"))); + + jPanel2.setBackground(new java.awt.Color(255, 255, 255)); + jPanel2.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(0, 102, 204))); + + buttonGroup1.add(jRadioButton1); + jRadioButton1.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N + jRadioButton1.setForeground(new java.awt.Color(0, 102, 204)); + jRadioButton1.setText("Delete"); + jRadioButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jRadioButton1ActionPerformed(evt); + } + }); + + buttonGroup1.add(jRadioButton2); + jRadioButton2.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N + jRadioButton2.setForeground(new java.awt.Color(0, 102, 204)); + jRadioButton2.setText("Update"); + jRadioButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jRadioButton2ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jRadioButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jRadioButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 25, Short.MAX_VALUE))) + .addContainerGap()) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jRadioButton1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jRadioButton2) + .addContainerGap(7, Short.MAX_VALUE)) + ); + + jButton1.setForeground(new java.awt.Color(0, 102, 204)); + jButton1.setText("OK"); + jButton1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(0, 102, 204))); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + jButton2.setForeground(new java.awt.Color(0, 102, 204)); + jButton2.setText("Cancel"); + jButton2.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(0, 102, 204))); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addContainerGap(31, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup() + .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(33, 33, 33)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(10, 10, 10) + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + + pack(); + }// //GEN-END:initComponents + + private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jRadioButton1ActionPerformed + + private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jRadioButton2ActionPerformed + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + dispose(); + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + if(jRadioButton1.isSelected()){ + if(panel instanceof jPservicio){ + dispose(); + jPservicio panelServ = (jPservicio)panel; + panelServ.manejaOpciones("eliminar"); + }else + if(panel instanceof jPhabitacion){ + + } + }else + if(jRadioButton2.isSelected()){ + if(panel instanceof jPservicio){ + jPservicio panelServ = (jPservicio)panel; + panelServ.manejaOpciones("actualizar"); + dispose(); + + }else + if(panel instanceof jPhabitacion){ + + } + } + }//GEN-LAST:event_jButton1ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(JFopciones.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(JFopciones.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(JFopciones.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(JFopciones.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + // + // + // + + // Create and display the form + /*java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new JFopciones().setVisible(true); + } + // + // + // + // + + // Create and display the form + /*java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new JFopciones().setVisible(true); + } + });*/ + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.ButtonGroup buttonGroup1; + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JRadioButton jRadioButton1; + private javax.swing.JRadioButton jRadioButton2; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Servicios/jcalendar-1.4.jar b/HotelAdmin/src/Servicios/jcalendar-1.4.jar new file mode 100644 index 0000000..617a335 Binary files /dev/null and b/HotelAdmin/src/Servicios/jcalendar-1.4.jar differ diff --git a/HotelAdmin/src/Servicios/jdbc.properties b/HotelAdmin/src/Servicios/jdbc.properties new file mode 100644 index 0000000..574eb17 --- /dev/null +++ b/HotelAdmin/src/Servicios/jdbc.properties @@ -0,0 +1,8 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +usr = postgres +pwd = 1234 +driver = org.postgresql.Driver +url = jdbc:postgresql://localhost:5432/adminh \ No newline at end of file diff --git a/HotelAdmin/src/Vistas/Jframe/CheckIn.form b/HotelAdmin/src/Vistas/Jframe/CheckIn.form new file mode 100644 index 0000000..b180ca7 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jframe/CheckIn.form @@ -0,0 +1,133 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jframe/CheckIn.java b/HotelAdmin/src/Vistas/Jframe/CheckIn.java new file mode 100644 index 0000000..5847175 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jframe/CheckIn.java @@ -0,0 +1,153 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jframe; + +import Vistas.Jpanel.CheckInReservaPreviaGUI; +import Vistas.Jpanel.CheckInSinReservaGUI; +import Vistas.Jpanel.ListaHospedajesGUI; + +/** + * + * @author nicol + */ +public class CheckIn extends javax.swing.JPanel { + + /** + * Creates new form NewJPanel + */ + //-------------------------------------------------------------------------- + int numEmpleado; + //-------------------------------------------------------------------------- + public CheckIn(int numE) { + numEmpleado = numE; + initComponents(); + seleccionarPrimero(); + } + + public void seleccionarPrimero(){ + jBsinReserva.setSelected(false); + jBhospedajes.setSelected(false); + jBreservaPrevia.setSelected(true); + CheckInReservaPreviaGUI check = + new CheckInReservaPreviaGUI(numEmpleado); + jPcontenedor.removeAll(); + jPcontenedor.add(check); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + } + + + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jPcontenedor = new javax.swing.JPanel(); + jBreservaPrevia = new javax.swing.JButton(); + jBsinReserva = new javax.swing.JButton(); + jBhospedajes = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setBackground(new java.awt.Color(239, 239, 239)); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jPcontenedor.setBackground(new java.awt.Color(255, 255, 255)); + jPcontenedor.setVerifyInputWhenFocusTarget(false); + jPcontenedor.setLayout(new java.awt.BorderLayout()); + add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 146, 1021, 534)); + + jBreservaPrevia.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ReservaPrevia.png"))); // NOI18N + jBreservaPrevia.setBorder(null); + jBreservaPrevia.setContentAreaFilled(false); + jBreservaPrevia.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBreservaPrevia.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ReservaPrevia-Selección.png"))); // NOI18N + jBreservaPrevia.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBreservaPreviaActionPerformed(evt); + } + }); + add(jBreservaPrevia, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 115, -1, -1)); + + jBsinReserva.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/SinReserva.png"))); // NOI18N + jBsinReserva.setBorder(null); + jBsinReserva.setContentAreaFilled(false); + jBsinReserva.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBsinReserva.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/SinReservaSelec.png"))); // NOI18N + jBsinReserva.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBsinReservaActionPerformed(evt); + } + }); + add(jBsinReserva, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 115, -1, -1)); + + jBhospedajes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/botonHospedajesSinSele.png"))); // NOI18N + jBhospedajes.setBorder(null); + jBhospedajes.setContentAreaFilled(false); + jBhospedajes.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBhospedajes.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/botonHospedajesSele.png"))); // NOI18N + jBhospedajes.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBhospedajesActionPerformed(evt); + } + }); + add(jBhospedajes, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 115, -1, -1)); + + jLabel1.setFont(new java.awt.Font("Decker", 0, 20)); // NOI18N + jLabel1.setForeground(new java.awt.Color(112, 112, 112)); + jLabel1.setText("Check-in"); + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 50, -1, -1)); + }// //GEN-END:initComponents + + private void jBreservaPreviaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBreservaPreviaActionPerformed + // TODO add your handling code here: + + jPcontenedor.removeAll(); + seleccionarPrimero(); + }//GEN-LAST:event_jBreservaPreviaActionPerformed + + private void jBsinReservaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBsinReservaActionPerformed + // TODO add your handling code here: + jBreservaPrevia.setSelected(false); + jBhospedajes.setSelected(false); + jBsinReserva.setSelected(true); + CheckInSinReservaGUI check = new CheckInSinReservaGUI(); + // check.resetListCheck-in(); + jPcontenedor.removeAll(); + jPcontenedor.add(check); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + }//GEN-LAST:event_jBsinReservaActionPerformed + + private void jBhospedajesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBhospedajesActionPerformed + // TODO add your handling code here: + jBreservaPrevia.setSelected(false); + jBsinReserva.setSelected(false); + jBhospedajes.setSelected(true); + ListaHospedajesGUI lista = new ListaHospedajesGUI(); + jPcontenedor.removeAll(); + jPcontenedor.add(lista); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + + }//GEN-LAST:event_jBhospedajesActionPerformed + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBhospedajes; + private javax.swing.JButton jBreservaPrevia; + private javax.swing.JButton jBsinReserva; + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel jPcontenedor; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jframe/CheckOut.form b/HotelAdmin/src/Vistas/Jframe/CheckOut.form new file mode 100644 index 0000000..ce52b2e --- /dev/null +++ b/HotelAdmin/src/Vistas/Jframe/CheckOut.form @@ -0,0 +1,80 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jframe/CheckOut.java b/HotelAdmin/src/Vistas/Jframe/CheckOut.java new file mode 100644 index 0000000..72cca4e --- /dev/null +++ b/HotelAdmin/src/Vistas/Jframe/CheckOut.java @@ -0,0 +1,76 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jframe; + +import Vistas.Jpanel.RegistrarSalidaGUI; + +/** + * + * @author nicol + */ +public class CheckOut extends javax.swing.JPanel { + + /** + * Creates new form CheckOut + */ + private int idempleado;//--------------------------------------------------- + + public CheckOut(int ide) { + idempleado = ide; + initComponents(); + seleccionar(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jPcontenedor = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + jBregistrarSalida = new javax.swing.JButton(); + + setBackground(new java.awt.Color(239, 239, 239)); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jPcontenedor.setBackground(new java.awt.Color(255, 255, 255)); + jPcontenedor.setVerifyInputWhenFocusTarget(false); + jPcontenedor.setLayout(new java.awt.BorderLayout()); + add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 146, 1021, 534)); + + jLabel1.setFont(new java.awt.Font("Decker", 0, 20)); // NOI18N + jLabel1.setForeground(new java.awt.Color(112, 112, 112)); + jLabel1.setText("Check-Out"); + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 50, -1, -1)); + + jBregistrarSalida.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/botonRegistrarSalidaSinSele.png"))); // NOI18N + jBregistrarSalida.setBorder(null); + jBregistrarSalida.setContentAreaFilled(false); + jBregistrarSalida.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBregistrarSalida.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/botonRegistrarSalidaSele.png"))); // NOI18N + add(jBregistrarSalida, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 115, -1, -1)); + }// //GEN-END:initComponents + + private void seleccionar(){ + jBregistrarSalida.setSelected(true); + RegistrarSalidaGUI check = new RegistrarSalidaGUI(idempleado);//-------- + jPcontenedor.removeAll(); + jPcontenedor.add(check); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBregistrarSalida; + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel jPcontenedor; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jframe/ClienteRecepcionista.form b/HotelAdmin/src/Vistas/Jframe/ClienteRecepcionista.form new file mode 100644 index 0000000..a6af58f --- /dev/null +++ b/HotelAdmin/src/Vistas/Jframe/ClienteRecepcionista.form @@ -0,0 +1,109 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jframe/ClienteRecepcionista.java b/HotelAdmin/src/Vistas/Jframe/ClienteRecepcionista.java new file mode 100644 index 0000000..4659804 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jframe/ClienteRecepcionista.java @@ -0,0 +1,143 @@ +/* +CLIENTE RECEPCIONISTA + */ +package Vistas.Jframe; + +import Controladores.ControladorCliente; +import Modelo.Cliente; +import Vistas.Jpanel.ClienteListaGUI; +import Vistas.Jpanel.ClientesAgregarModificarGUI; +import Vistas.Jpanel.ClientesRegistradosGUI; + +/** + * @author nicol + */ +public class ClienteRecepcionista extends javax.swing.JPanel { + + ClientesAgregarModificarGUI formulario; + ClientesRegistradosGUI panelListar; + ControladorCliente controlador; + + public ClienteRecepcionista() { + + initComponents(); + formulario = new ClientesAgregarModificarGUI(this); + seleccionarPrimero(formulario); + + } + + public void AgregarCliente(Cliente c) { + controlador.addClient(c); + } + + public void panelListarCliente() { + panelListar = new ClientesRegistradosGUI(this); + jBregistrar.setSelected(false); + jBlistaClientes.setSelected(true); + jPcontenedor.setVisible(false); + jPcontenedor.setVisible(true); + jPcontenedor.removeAll(); + jPcontenedor.add(panelListar); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + } + + public void FormularioModificar(Cliente llenar ){ + + jBlistaClientes.setSelected(false); + jBregistrar.setSelected(true); + jPcontenedor.removeAll(); + formulario.llenarValores(llenar); + jPcontenedor.add(formulario); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jBlistaClientes = new javax.swing.JButton(); + jBregistrar = new javax.swing.JButton(); + jPcontenedor = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + + setBackground(new java.awt.Color(239, 239, 239)); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jBlistaClientes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonRegistradosSinSele.png"))); // NOI18N + jBlistaClientes.setBorder(null); + jBlistaClientes.setBorderPainted(false); + jBlistaClientes.setContentAreaFilled(false); + jBlistaClientes.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBlistaClientes.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonRegistradosSele.png"))); // NOI18N + jBlistaClientes.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBlistaClientesActionPerformed(evt); + } + }); + add(jBlistaClientes, new org.netbeans.lib.awtextra.AbsoluteConstraints(151, 115, 117, 32)); + + jBregistrar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/botonRegistrarSinsele.png"))); // NOI18N + jBregistrar.setBorder(null); + jBregistrar.setBorderPainted(false); + jBregistrar.setContentAreaFilled(false); + jBregistrar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBregistrar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/botonRegistrarSele.png"))); // NOI18N + jBregistrar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBregistrarActionPerformed(evt); + } + }); + add(jBregistrar, new org.netbeans.lib.awtextra.AbsoluteConstraints(79, 115, 55, 30)); + + jPcontenedor.setBackground(new java.awt.Color(255, 255, 255)); + jPcontenedor.setLayout(new java.awt.BorderLayout()); + add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 146, 1021, 534)); + + jLabel1.setFont(new java.awt.Font("Decker", 0, 20)); // NOI18N + jLabel1.setForeground(new java.awt.Color(112, 112, 112)); + jLabel1.setText("Cliente"); + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 50, -1, -1)); + }// //GEN-END:initComponents + + private void jBlistaClientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBlistaClientesActionPerformed + // TODO add your handling code here: + panelListarCliente(); + formulario.limpiarCampos(); + }//GEN-LAST:event_jBlistaClientesActionPerformed + + public void seleccionarPrimero(ClientesAgregarModificarGUI formulario) { + + jBlistaClientes.setSelected(false); + jBregistrar.setSelected(true); + jPcontenedor.removeAll(); + jPcontenedor.add(formulario); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + } + + + private void jBregistrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBregistrarActionPerformed + + jPcontenedor.removeAll(); + seleccionarPrimero(formulario); + }//GEN-LAST:event_jBregistrarActionPerformed + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBlistaClientes; + private javax.swing.JButton jBregistrar; + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel jPcontenedor; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jframe/Clientes.form b/HotelAdmin/src/Vistas/Jframe/Clientes.form index 548dcea..7b9b0b8 100644 --- a/HotelAdmin/src/Vistas/Jframe/Clientes.form +++ b/HotelAdmin/src/Vistas/Jframe/Clientes.form @@ -2,7 +2,9 @@
- + + + @@ -14,7 +16,7 @@ - + @@ -24,7 +26,7 @@ - + @@ -35,7 +37,7 @@ - + @@ -43,40 +45,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -87,7 +63,7 @@ - + @@ -95,33 +71,39 @@ - + - + - - + + - + - - + + + + - + + + + + + + - + - - - + diff --git a/HotelAdmin/src/Vistas/Jframe/Clientes.java b/HotelAdmin/src/Vistas/Jframe/Clientes.java index d603d4b..57e8864 100644 --- a/HotelAdmin/src/Vistas/Jframe/Clientes.java +++ b/HotelAdmin/src/Vistas/Jframe/Clientes.java @@ -5,9 +5,10 @@ */ package Vistas.Jframe; +import Controladores.ControladorCliente; +import Modelo.Cliente; import Vistas.Jpanel.ClienteListaGUI; import Vistas.Jpanel.ClientesAgregarModificarGUI; -import Vistas.Jpanel.HabitacionAgregarModificarGUI; /** * @@ -18,11 +19,52 @@ public class Clientes extends javax.swing.JPanel { /** * Creates new form Clientes */ + + ClientesAgregarModificarGUI formulario; + ClienteListaGUI panel_listar; + ControladorCliente controlador; + public Clientes() { initComponents(); + formulario = new ClientesAgregarModificarGUI(); seleccionarPrimero(); } + public ControladorCliente getControlador() { + return controlador; + } + + + public void AgregarCliente(Cliente c) { + controlador.addClient(c); + } + + public void PanelListarCliente(){ + + panel_listar = new ClienteListaGUI(this); + jBagregar.setSelected(false); + jBmodificar.setSelected(true); + jPcontenedor.setVisible(false); + jPcontenedor.setVisible(true); + jPcontenedor.removeAll(); + jPcontenedor.add(panel_listar); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + } + + + public void FormularioModificar(Cliente llenar){ + + jBagregar.setSelected(false); + jBmodificar.setSelected(true); + jPcontenedor.removeAll(); + formulario.llenarValores(llenar); + jPcontenedor.add(formulario); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + } + /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always @@ -33,96 +75,55 @@ public Clientes() { private void initComponents() { jBmodificar = new javax.swing.JButton(); - jBeliminar = new javax.swing.JButton(); jBagregar = new javax.swing.JButton(); - jLmenuCrud = new javax.swing.JLabel(); jPcontenedor = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); - setOpaque(false); + setBackground(new java.awt.Color(239, 239, 239)); setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - jBmodificar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-modificarGris.png"))); // NOI18N + jBmodificar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonModificarSinSele.png"))); // NOI18N jBmodificar.setBorder(null); jBmodificar.setBorderPainted(false); jBmodificar.setContentAreaFilled(false); jBmodificar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBmodificar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-modificar.png"))); // NOI18N + jBmodificar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonModificarSele.png"))); // NOI18N jBmodificar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBmodificarActionPerformed(evt); } }); - add(jBmodificar, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 30, 90, -1)); - - jBeliminar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-eliminarGris.png"))); // NOI18N - jBeliminar.setBorder(null); - jBeliminar.setBorderPainted(false); - jBeliminar.setContentAreaFilled(false); - jBeliminar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBeliminar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/seleccion-eliminar.png"))); // NOI18N - jBeliminar.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBeliminarActionPerformed(evt); - } - }); - add(jBeliminar, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 30, 100, 40)); + add(jBmodificar, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 115, 56, 30)); - jBagregar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-agregarGris.png"))); // NOI18N + jBagregar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonAgregarSinSele.png"))); // NOI18N jBagregar.setBorder(null); jBagregar.setBorderPainted(false); jBagregar.setContentAreaFilled(false); jBagregar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBagregar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-agregar.png"))); // NOI18N + jBagregar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonAgregarSele.png"))); // NOI18N jBagregar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBagregarActionPerformed(evt); } }); - add(jBagregar, new org.netbeans.lib.awtextra.AbsoluteConstraints(242, 30, -1, -1)); + add(jBagregar, new org.netbeans.lib.awtextra.AbsoluteConstraints(79, 115, 49, 30)); - jLmenuCrud.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Menu-crud.png"))); // NOI18N - add(jLmenuCrud, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 23, -1, -1)); - - jPcontenedor.setOpaque(false); + jPcontenedor.setBackground(new java.awt.Color(255, 255, 255)); jPcontenedor.setLayout(new java.awt.BorderLayout()); - add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 80, 770, 480)); + add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 146, 1021, 534)); + + jLabel1.setFont(new java.awt.Font("Decker", 0, 20)); // NOI18N + jLabel1.setForeground(new java.awt.Color(112, 112, 112)); + jLabel1.setText("Cliente"); + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 50, -1, -1)); }// //GEN-END:initComponents private void jBmodificarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBmodificarActionPerformed // TODO add your handling code here: - jBagregar.setSelected(false); - jBeliminar.setSelected(false); - jBmodificar.setSelected(true); - - jPcontenedor.setVisible(false); - jPcontenedor.setVisible(true); - ClienteListaGUI panelE = new ClienteListaGUI(); - // EmpleadoAgregarModificarGUI panelE = new EmpleadoAgregarModificarGUI(); - jPcontenedor.removeAll(); - jPcontenedor.add(panelE); - jPcontenedor.revalidate(); - jPcontenedor.repaint(); - + PanelListarCliente(); }//GEN-LAST:event_jBmodificarActionPerformed - private void jBeliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBeliminarActionPerformed - // TODO add your handling code here: - jBagregar.setSelected(false); - jBmodificar.setSelected(false); - jBeliminar.setSelected(true); - - jPcontenedor.setVisible(false); - jPcontenedor.setVisible(true); - ClienteListaGUI panelE = new ClienteListaGUI(); - jPcontenedor.removeAll(); - jPcontenedor.add(panelE); - jPcontenedor.revalidate(); - jPcontenedor.repaint(); - - }//GEN-LAST:event_jBeliminarActionPerformed - public void seleccionarPrimero(){ - jBeliminar.setSelected(false); jBmodificar.setSelected(false); jBagregar.setSelected(true); ClientesAgregarModificarGUI panelAM = new ClientesAgregarModificarGUI(); @@ -141,9 +142,8 @@ private void jBagregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIR // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jBagregar; - private javax.swing.JButton jBeliminar; private javax.swing.JButton jBmodificar; - private javax.swing.JLabel jLmenuCrud; + private javax.swing.JLabel jLabel1; private javax.swing.JPanel jPcontenedor; // End of variables declaration//GEN-END:variables } diff --git a/HotelAdmin/src/Vistas/Jframe/Empleados.form b/HotelAdmin/src/Vistas/Jframe/Empleados.form index 548dcea..9f188ac 100644 --- a/HotelAdmin/src/Vistas/Jframe/Empleados.form +++ b/HotelAdmin/src/Vistas/Jframe/Empleados.form @@ -2,7 +2,9 @@
- + + + @@ -14,7 +16,7 @@ - + @@ -24,7 +26,7 @@ - + @@ -35,7 +37,7 @@ - + @@ -43,40 +45,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -87,7 +63,7 @@ - + @@ -95,33 +71,39 @@ - + - + - - + + - + - - + + + + - + + + + + + + - + - - - + diff --git a/HotelAdmin/src/Vistas/Jframe/Empleados.java b/HotelAdmin/src/Vistas/Jframe/Empleados.java index b703793..d4418d8 100644 --- a/HotelAdmin/src/Vistas/Jframe/Empleados.java +++ b/HotelAdmin/src/Vistas/Jframe/Empleados.java @@ -5,11 +5,14 @@ */ package Vistas.Jframe; -import Vistas.Jpanel.EmpleadoAgregarModificarGUI; -import Vistas.Jpanel.EmpleadoListaGUI; +import Controladores.ControladorEmpleado; +import Modelo.Empleado; +import Vistas.Jpanel.EmpleadoFormulario; +import Vistas.Jpanel.EmpleadoPanelListar; import Vistas.Jpanel.HabitacionAgregarModificarGUI; import Vistas.Jpanel.HabitacionListaGUI; import Vistas.Jpanel.jPhabitacion; +import javax.swing.JOptionPane; /** * @@ -20,10 +23,70 @@ public class Empleados extends javax.swing.JPanel { /** * Creates new form EmpleadoGUI */ - public Empleados() { + + /*public Empleados() { initComponents(); seleccionarPrimero(); + }*/ + EmpleadoFormulario formulario; + EmpleadoPanelListar panelListar; + ControladorEmpleado controlador; + + public Empleados() + { + initComponents(); + formulario = new EmpleadoFormulario(this); + + seleccionarPrimero(formulario); + } + + public void setControladorEmpleado(ControladorEmpleado s){ + + this.controlador = s; + + } + + public ControladorEmpleado getControladorEmpleado() + { + return controlador; + } + + + public void AgregarEmpleado(Empleado c) + { + controlador.grabarEmpleado(c); + } + + + public void FormularioModificar(Empleado llenar){ + //jBeliminar.setSelected(false); + jBmodificar.setSelected(true); + jBagregar.setSelected(false); + jPcontenedor.removeAll(); + formulario.llenarValores(llenar); + formulario.setValidar("modificar"); + jPcontenedor.add(formulario); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + } + + + public void btnModificar() + { + panelListar = new EmpleadoPanelListar(this); + jBagregar.setSelected(false); +// jBeliminar.setSelected(false); + jBmodificar.setSelected(true); + jPcontenedor.setVisible(false); + jPcontenedor.setVisible(true); + jPcontenedor.removeAll(); + + jPcontenedor.add(panelListar); + + jPcontenedor.revalidate(); + jPcontenedor.repaint(); } /** @@ -36,105 +99,63 @@ public Empleados() { private void initComponents() { jBmodificar = new javax.swing.JButton(); - jBeliminar = new javax.swing.JButton(); jBagregar = new javax.swing.JButton(); - jLmenuCrud = new javax.swing.JLabel(); jPcontenedor = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); - setOpaque(false); + setBackground(new java.awt.Color(239, 239, 239)); setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - jBmodificar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-modificarGris.png"))); // NOI18N + jBmodificar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonModificarSinSele.png"))); // NOI18N jBmodificar.setBorder(null); jBmodificar.setBorderPainted(false); jBmodificar.setContentAreaFilled(false); jBmodificar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBmodificar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-modificar.png"))); // NOI18N + jBmodificar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonModificarSele.png"))); // NOI18N jBmodificar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBmodificarActionPerformed(evt); } }); - add(jBmodificar, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 30, 90, -1)); - - jBeliminar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-eliminarGris.png"))); // NOI18N - jBeliminar.setBorder(null); - jBeliminar.setBorderPainted(false); - jBeliminar.setContentAreaFilled(false); - jBeliminar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBeliminar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/seleccion-eliminar.png"))); // NOI18N - jBeliminar.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBeliminarActionPerformed(evt); - } - }); - add(jBeliminar, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 30, 100, 40)); + add(jBmodificar, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 115, 56, 30)); - jBagregar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-agregarGris.png"))); // NOI18N + jBagregar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonAgregarSinSele.png"))); // NOI18N jBagregar.setBorder(null); jBagregar.setBorderPainted(false); jBagregar.setContentAreaFilled(false); jBagregar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBagregar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-agregar.png"))); // NOI18N + jBagregar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonAgregarSele.png"))); // NOI18N jBagregar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBagregarActionPerformed(evt); } }); - add(jBagregar, new org.netbeans.lib.awtextra.AbsoluteConstraints(242, 30, -1, -1)); + add(jBagregar, new org.netbeans.lib.awtextra.AbsoluteConstraints(79, 115, 49, 30)); - jLmenuCrud.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Menu-crud.png"))); // NOI18N - add(jLmenuCrud, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 23, -1, -1)); - - jPcontenedor.setOpaque(false); + jPcontenedor.setBackground(new java.awt.Color(255, 255, 255)); jPcontenedor.setLayout(new java.awt.BorderLayout()); - add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 80, 770, 480)); + add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 146, 1021, 534)); + + jLabel1.setFont(new java.awt.Font("Decker", 0, 20)); // NOI18N + jLabel1.setForeground(new java.awt.Color(112, 112, 112)); + jLabel1.setText("Empleado"); + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 50, -1, -1)); }// //GEN-END:initComponents private void jBmodificarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBmodificarActionPerformed // TODO add your handling code here: - jBagregar.setSelected(false); - jBeliminar.setSelected(false); - jBmodificar.setSelected(true); - - jPcontenedor.setVisible(false); - jPcontenedor.setVisible(true); - EmpleadoListaGUI panelE = new EmpleadoListaGUI(); - // EmpleadoAgregarModificarGUI panelE = new EmpleadoAgregarModificarGUI(); - jPcontenedor.removeAll(); - jPcontenedor.add(panelE); - jPcontenedor.revalidate(); - jPcontenedor.repaint(); - - + btnModificar(); }//GEN-LAST:event_jBmodificarActionPerformed - private void jBeliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBeliminarActionPerformed - // TODO add your handling code here: - jBagregar.setSelected(false); - jBmodificar.setSelected(false); - jBeliminar.setSelected(true); - - jPcontenedor.setVisible(false); - jPcontenedor.setVisible(true); - - EmpleadoListaGUI panelE = new EmpleadoListaGUI(); - jPcontenedor.removeAll(); - jPcontenedor.add(panelE); - jPcontenedor.revalidate(); - jPcontenedor.repaint(); - - - - }//GEN-LAST:event_jBeliminarActionPerformed - - public void seleccionarPrimero(){ - jBeliminar.setSelected(false); + public void seleccionarPrimero(EmpleadoFormulario formulario){ + formulario.limpiarCampos(); + formulario.setValidar("agregar"); +// jBeliminar.setSelected(false); jBmodificar.setSelected(false); jBagregar.setSelected(true); - EmpleadoAgregarModificarGUI panelE = new EmpleadoAgregarModificarGUI(); + jPcontenedor.removeAll(); - jPcontenedor.add(panelE); + jPcontenedor.add(formulario); jPcontenedor.revalidate(); jPcontenedor.repaint(); jPcontenedor.setVisible(true); @@ -144,16 +165,15 @@ private void jBagregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIR // TODO add your handling code here: jPcontenedor.removeAll(); - seleccionarPrimero(); + seleccionarPrimero(formulario); }//GEN-LAST:event_jBagregarActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jBagregar; - private javax.swing.JButton jBeliminar; private javax.swing.JButton jBmodificar; - private javax.swing.JLabel jLmenuCrud; + private javax.swing.JLabel jLabel1; private javax.swing.JPanel jPcontenedor; // End of variables declaration//GEN-END:variables } diff --git a/HotelAdmin/src/Vistas/Jframe/Habitacion.form b/HotelAdmin/src/Vistas/Jframe/Habitacion.form deleted file mode 100644 index 39a48a3..0000000 --- a/HotelAdmin/src/Vistas/Jframe/Habitacion.form +++ /dev/null @@ -1,309 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/HotelAdmin/src/Vistas/Jframe/Habitacion.java b/HotelAdmin/src/Vistas/Jframe/Habitacion.java deleted file mode 100644 index cb8309d..0000000 --- a/HotelAdmin/src/Vistas/Jframe/Habitacion.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Vistas.Jframe; - -import Vistas.Jpanel.HabitacionAgregarModificarGUI; -import java.awt.Toolkit; - -/** - * - * @author nicol - */ -public class Habitacion extends javax.swing.JFrame { - - /** - * Creates new form Habitación - */ - public Habitacion() { - super( "Administrador"); - initComponents(); - setResizable(false); - this.setLocationRelativeTo(null); - setIconImage(Toolkit.getDefaultToolkit().getImage(this.getClass() - .getResource("/imagenes/Logo.png"))); - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - jPanel1 = new javax.swing.JPanel(); - jPcontenedor = new javax.swing.JPanel(); - jBhabitaciones = new javax.swing.JButton(); - jBclientes = new javax.swing.JButton(); - jBempleados = new javax.swing.JButton(); - jBcerrarSesion = new javax.swing.JButton(); - jBagregar = new javax.swing.JButton(); - jBeliminar = new javax.swing.JButton(); - jBmodificar = new javax.swing.JButton(); - jLmenuCrud = new javax.swing.JLabel(); - jLfondoGris = new javax.swing.JLabel(); - jLfondoAzul = new javax.swing.JLabel(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - - jPanel1.setBackground(new java.awt.Color(241, 242, 246)); - jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - - jPcontenedor.setOpaque(false); - jPcontenedor.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - jPanel1.add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 180, 730, 420)); - - jBhabitaciones.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/SinSelección-habi.png"))); // NOI18N - jBhabitaciones.setBorder(null); - jBhabitaciones.setBorderPainted(false); - jBhabitaciones.setContentAreaFilled(false); - jBhabitaciones.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBhabitaciones.setMargin(new java.awt.Insets(0, 0, 0, 0)); - jBhabitaciones.setMaximumSize(new java.awt.Dimension(0, 0)); - jBhabitaciones.setMinimumSize(new java.awt.Dimension(0, 0)); - jBhabitaciones.setPreferredSize(new java.awt.Dimension(0, 129)); - jBhabitaciones.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-habi.png"))); // NOI18N - jBhabitaciones.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBhabitacionesActionPerformed(evt); - } - }); - jPanel1.add(jBhabitaciones, new org.netbeans.lib.awtextra.AbsoluteConstraints(24, 150, 260, -1)); - - jBclientes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Sinseleccion-cli.png"))); // NOI18N - jBclientes.setBorder(null); - jBclientes.setBorderPainted(false); - jBclientes.setContentAreaFilled(false); - jBclientes.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBclientes.setMargin(new java.awt.Insets(0, 0, 0, 0)); - jBclientes.setMaximumSize(new java.awt.Dimension(0, 0)); - jBclientes.setMinimumSize(new java.awt.Dimension(0, 0)); - jBclientes.setPreferredSize(new java.awt.Dimension(0, 129)); - jBclientes.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-cli.png"))); // NOI18N - jBclientes.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBclientesActionPerformed(evt); - } - }); - jPanel1.add(jBclientes, new org.netbeans.lib.awtextra.AbsoluteConstraints(24, 249, 260, 130)); - - jBempleados.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/SinSeleccionar-emp.png"))); // NOI18N - jBempleados.setBorder(null); - jBempleados.setBorderPainted(false); - jBempleados.setContentAreaFilled(false); - jBempleados.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBempleados.setMargin(new java.awt.Insets(0, 0, 0, 0)); - jBempleados.setMaximumSize(new java.awt.Dimension(0, 0)); - jBempleados.setMinimumSize(new java.awt.Dimension(0, 0)); - jBempleados.setPreferredSize(new java.awt.Dimension(0, 129)); - jBempleados.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-empl_1.png"))); // NOI18N - jBempleados.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBempleadosActionPerformed(evt); - } - }); - jPanel1.add(jBempleados, new org.netbeans.lib.awtextra.AbsoluteConstraints(24, 355, 260, -1)); - - jBcerrarSesion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/botonSalida.png"))); // NOI18N - jBcerrarSesion.setBorder(null); - jBcerrarSesion.setBorderPainted(false); - jBcerrarSesion.setContentAreaFilled(false); - jBcerrarSesion.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBcerrarSesion.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBcerrarSesionActionPerformed(evt); - } - }); - jPanel1.add(jBcerrarSesion, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 590, -1, -1)); - - jBagregar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-agregarGris.png"))); // NOI18N - jBagregar.setBorder(null); - jBagregar.setBorderPainted(false); - jBagregar.setContentAreaFilled(false); - jBagregar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBagregar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-agregar.png"))); // NOI18N - jBagregar.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBagregarActionPerformed(evt); - } - }); - jPanel1.add(jBagregar, new org.netbeans.lib.awtextra.AbsoluteConstraints(576, 97, -1, -1)); - - jBeliminar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-eliminarGris.png"))); // NOI18N - jBeliminar.setBorder(null); - jBeliminar.setBorderPainted(false); - jBeliminar.setContentAreaFilled(false); - jBeliminar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBeliminar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/seleccion-eliminar.png"))); // NOI18N - jPanel1.add(jBeliminar, new org.netbeans.lib.awtextra.AbsoluteConstraints(756, 97, 100, 40)); - - jBmodificar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-modificarGris.png"))); // NOI18N - jBmodificar.setBorder(null); - jBmodificar.setBorderPainted(false); - jBmodificar.setContentAreaFilled(false); - jBmodificar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBmodificar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-modificar.png"))); // NOI18N - jPanel1.add(jBmodificar, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 97, 90, -1)); - - jLmenuCrud.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Menu-crud.png"))); // NOI18N - jPanel1.add(jLmenuCrud, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 90, -1, -1)); - - jLfondoGris.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/fondo-principal.png"))); // NOI18N - jPanel1.add(jLfondoGris, new org.netbeans.lib.awtextra.AbsoluteConstraints(218, 0, 900, 690)); - - jLfondoAzul.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/panel-azul.png"))); // NOI18N - jPanel1.add(jLfondoAzul, new org.netbeans.lib.awtextra.AbsoluteConstraints(-10, 0, 290, 690)); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 680, Short.MAX_VALUE) - ); - - pack(); - }// //GEN-END:initComponents - - private void jBhabitacionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBhabitacionesActionPerformed - // TODO add your handling code here: - jBhabitaciones.setEnabled(true); - }//GEN-LAST:event_jBhabitacionesActionPerformed - - private void jBclientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBclientesActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_jBclientesActionPerformed - - private void jBempleadosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBempleadosActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_jBempleadosActionPerformed - - private void jBagregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBagregarActionPerformed - // TODO add your handling code here: - - /* HabitacionAgregarModificarGUI panelAM = new HabitacionAgregarModificarGUI(); - - jPcontenedor.setSize(735,429); - jPcontenedor.removeAll(); - jPcontenedor.add(panelAM); - jPcontenedor.revalidate(); - jPcontenedor.repaint();*/ - - }//GEN-LAST:event_jBagregarActionPerformed - - private void jBcerrarSesionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcerrarSesionActionPerformed - // TODO add your handling code here: - setVisible(false); - new Login().setVisible(true); - }//GEN-LAST:event_jBcerrarSesionActionPerformed - - /** - * @param args the command line arguments - */ - public static void main(String args[]) { - /* Set the Nimbus look and feel */ - // - /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. - * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html - */ - try { - for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { - if ("Nimbus".equals(info.getName())) { - javax.swing.UIManager.setLookAndFeel(info.getClassName()); - break; - } - } - } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(Habitacion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(Habitacion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(Habitacion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(Habitacion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } - // - // - - /* Create and display the form */ - java.awt.EventQueue.invokeLater(new Runnable() { - public void run() { - new Habitacion().setVisible(true); - } - }); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JButton jBagregar; - private javax.swing.JButton jBcerrarSesion; - private javax.swing.JButton jBclientes; - private javax.swing.JButton jBeliminar; - private javax.swing.JButton jBempleados; - private javax.swing.JButton jBhabitaciones; - private javax.swing.JButton jBmodificar; - private javax.swing.JLabel jLfondoAzul; - private javax.swing.JLabel jLfondoGris; - private javax.swing.JLabel jLmenuCrud; - private javax.swing.JPanel jPanel1; - private javax.swing.JPanel jPcontenedor; - // End of variables declaration//GEN-END:variables -} diff --git a/HotelAdmin/src/Vistas/Jframe/Habitaciones.form b/HotelAdmin/src/Vistas/Jframe/Habitaciones.form index 548dcea..b0fbb6b 100644 --- a/HotelAdmin/src/Vistas/Jframe/Habitaciones.form +++ b/HotelAdmin/src/Vistas/Jframe/Habitaciones.form @@ -2,7 +2,9 @@
- + + + @@ -14,7 +16,7 @@ - + @@ -24,7 +26,7 @@ - + @@ -35,7 +37,7 @@ - + @@ -43,14 +45,14 @@ - + - + @@ -61,7 +63,7 @@ - + @@ -69,14 +71,14 @@ - + - + @@ -87,7 +89,7 @@ - + @@ -95,33 +97,39 @@ - + - + - - + + - + - - + + + + - + + + + + + + - + - - - + diff --git a/HotelAdmin/src/Vistas/Jframe/Habitaciones.java b/HotelAdmin/src/Vistas/Jframe/Habitaciones.java index 27a644b..b0d5889 100644 --- a/HotelAdmin/src/Vistas/Jframe/Habitaciones.java +++ b/HotelAdmin/src/Vistas/Jframe/Habitaciones.java @@ -9,6 +9,11 @@ import Vistas.Jpanel.HabitacionListaGUI; import Vistas.Jpanel.jPhabitacion; import javax.swing.Icon; +import Controladores.*; +import Modelo.*; +import javax.swing.JButton; +import javax.swing.JOptionPane; +import javax.swing.JPanel; /** * @@ -19,9 +24,92 @@ public class Habitaciones extends javax.swing.JPanel { /** * Creates new form HabitacionGUI */ + HabitacionAgregarModificarGUI panelAgregar; + HabitacionListaGUI panelModificar; + HabitacionListaGUI panelEliminar; + ControllerHabitacion controladorHabitacion; + public Habitaciones() { initComponents(); - seleccionarPrimero(); + panelAgregar = new HabitacionAgregarModificarGUI(); + panelModificar = new HabitacionListaGUI(this); + panelEliminar = new HabitacionListaGUI(this); + mostrarPanelAgregar(); + + } + + public HabitacionAgregarModificarGUI getPanelAgregar() { + return panelAgregar; + } + + public HabitacionListaGUI getPanelModificar() { + return panelModificar; + } + + public HabitacionListaGUI getPanelEliminar() { + return panelEliminar; + } + + public JButton getjBeliminar() { + return jBeliminar; + } + + public JButton getjBmodificar() { + return jBmodificar; + } + + public JButton getjBagregar() { + return jBagregar; + } + + public JPanel getjPcontenedor() { + return jPcontenedor; + } + + public void setControladorHabitacion(ControllerHabitacion controladorHabitacion) { + this.controladorHabitacion = controladorHabitacion; + } + + public ControllerHabitacion getControladorHabitacion() { + return controladorHabitacion; + } + + + + public void mostrarPanelModificar() + { + jBagregar.setSelected(false); + jBeliminar.setSelected(false); + jBmodificar.setSelected(true); + jPcontenedor.removeAll(); + jPcontenedor.add(panelModificar); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + } + + + public void mostrarPanelAgregar(){ + jBeliminar.setSelected(false); + jBmodificar.setSelected(false); + jBagregar.setSelected(true); + jPcontenedor.removeAll(); + jPcontenedor.add(panelAgregar); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + } + + public void mostrarPanelEliminar() + { + jBeliminar.setSelected(true); + jBmodificar.setSelected(false); + jBagregar.setSelected(false); + jPcontenedor.removeAll(); + jPcontenedor.add(panelEliminar); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); } /** @@ -36,113 +124,116 @@ private void initComponents() { jBmodificar = new javax.swing.JButton(); jBeliminar = new javax.swing.JButton(); jBagregar = new javax.swing.JButton(); - jLmenuCrud = new javax.swing.JLabel(); jPcontenedor = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); - setOpaque(false); + setBackground(new java.awt.Color(239, 239, 239)); setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - jBmodificar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-modificarGris.png"))); // NOI18N + jBmodificar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonModificarSinSele.png"))); // NOI18N jBmodificar.setBorder(null); jBmodificar.setBorderPainted(false); jBmodificar.setContentAreaFilled(false); jBmodificar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBmodificar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-modificar.png"))); // NOI18N + jBmodificar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonModificarSele.png"))); // NOI18N jBmodificar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBmodificarActionPerformed(evt); } }); - add(jBmodificar, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 30, 90, -1)); + add(jBmodificar, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 115, 56, 30)); - jBeliminar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-eliminarGris.png"))); // NOI18N + jBeliminar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonEliminarSinSele.png"))); // NOI18N jBeliminar.setBorder(null); jBeliminar.setBorderPainted(false); jBeliminar.setContentAreaFilled(false); jBeliminar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBeliminar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/seleccion-eliminar.png"))); // NOI18N + jBeliminar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonEliminarSele.png"))); // NOI18N jBeliminar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBeliminarActionPerformed(evt); } }); - add(jBeliminar, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 30, 100, 40)); + add(jBeliminar, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 115, 48, 30)); - jBagregar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-agregarGris.png"))); // NOI18N + jBagregar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonAgregarSinSele.png"))); // NOI18N jBagregar.setBorder(null); jBagregar.setBorderPainted(false); jBagregar.setContentAreaFilled(false); jBagregar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBagregar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-agregar.png"))); // NOI18N + jBagregar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonAgregarSele.png"))); // NOI18N jBagregar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBagregarActionPerformed(evt); } }); - add(jBagregar, new org.netbeans.lib.awtextra.AbsoluteConstraints(242, 30, -1, -1)); - - jLmenuCrud.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Menu-crud.png"))); // NOI18N - add(jLmenuCrud, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 23, -1, -1)); + add(jBagregar, new org.netbeans.lib.awtextra.AbsoluteConstraints(79, 115, 49, 30)); - jPcontenedor.setOpaque(false); + jPcontenedor.setBackground(new java.awt.Color(255, 255, 255)); jPcontenedor.setLayout(new java.awt.BorderLayout()); - add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 80, 770, 480)); + add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 146, 1021, 534)); + + jLabel1.setFont(new java.awt.Font("Decker", 0, 20)); // NOI18N + jLabel1.setForeground(new java.awt.Color(112, 112, 112)); + jLabel1.setText("Habitación"); + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 50, -1, -1)); }// //GEN-END:initComponents private void jBmodificarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBmodificarActionPerformed // TODO add your handling code here: - jBagregar.setSelected(false); - jBeliminar.setSelected(false); - jBmodificar.setSelected(true); - - jPcontenedor.setVisible(false); - jPcontenedor.setVisible(true); - - HabitacionListaGUI panelE = new HabitacionListaGUI(); - jPcontenedor.removeAll(); - jPcontenedor.add(panelE); - jPcontenedor.revalidate(); - jPcontenedor.repaint(); - jPhabitacion habi = new jPhabitacion("modificar"); +// jBagregar.setSelected(false); +// jBeliminar.setSelected(false); +// jBmodificar.setSelected(true); +// jPcontenedor.setVisible(false); +// jPcontenedor.setVisible(true); +// panelM = new HabitacionListaGUI(); +// jPcontenedor.removeAll(); +// jPcontenedor.add(panelM); +// jPcontenedor.revalidate(); +// jPcontenedor.repaint(); +// jPhabitacion habi = new jPhabitacion("modificar"); +// HabitacionesDAO modelohabitacion = new HabitacionesDAO(); +// ControllerHabitacion controladorHabitacion = new ControllerHabitacion(this, modelohabitacion); +// controladorHabitacion.leerHabitaciones(); }//GEN-LAST:event_jBmodificarActionPerformed private void jBeliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBeliminarActionPerformed // TODO add your handling code here: - jBagregar.setSelected(false); - jBmodificar.setSelected(false); - jBeliminar.setSelected(true); - - jPcontenedor.setVisible(false); - jPcontenedor.setVisible(true); - - HabitacionListaGUI panelE = new HabitacionListaGUI(); - jPcontenedor.removeAll(); - jPcontenedor.add(panelE); - jPcontenedor.revalidate(); - jPcontenedor.repaint(); - - jPhabitacion habi = new jPhabitacion("eliminar"); - - +// jBagregar.setSelected(false); +// jBmodificar.setSelected(false); +// jBeliminar.setSelected(true); +// jPcontenedor.setVisible(false); +// jPcontenedor.setVisible(true); +// panelM = new HabitacionListaGUI(); +// jPcontenedor.removeAll(); +// jPcontenedor.add(panelM); +// jPcontenedor.revalidate(); +// jPcontenedor.repaint(); +// +// jPhabitacion habi = new jPhabitacion("eliminar"); +// +// HabitacionesDAO modelohabitacion = new HabitacionesDAO(); +// ControllerHabitacion controladorHabitacion = new ControllerHabitacion(this, modelohabitacion); +// controladorHabitacion.leerHabitaciones(); }//GEN-LAST:event_jBeliminarActionPerformed - public void seleccionarPrimero(){ - jBeliminar.setSelected(false); - jBmodificar.setSelected(false); - jBagregar.setSelected(true); - HabitacionAgregarModificarGUI panelAM = new HabitacionAgregarModificarGUI(); - jPcontenedor.removeAll(); - jPcontenedor.add(panelAM); - jPcontenedor.revalidate(); - jPcontenedor.repaint(); - jPcontenedor.setVisible(true); - } +// public void MostrarPanelAgregar(){ +// jBeliminar.setSelected(false); +// jBmodificar.setSelected(false); +// jBagregar.setSelected(true); +// jPcontenedor.removeAll(); +// jPcontenedor.add(panelA); +// jPcontenedor.revalidate(); +// jPcontenedor.repaint(); +// jPcontenedor.setVisible(true); +// } private void jBagregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBagregarActionPerformed // TODO add your handling code here: - jPcontenedor.removeAll(); - seleccionarPrimero(); +// jPcontenedor.removeAll(); +// seleccionarPrimero(); + }//GEN-LAST:event_jBagregarActionPerformed @@ -151,7 +242,7 @@ private void jBagregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIR private javax.swing.JButton jBagregar; private javax.swing.JButton jBeliminar; private javax.swing.JButton jBmodificar; - private javax.swing.JLabel jLmenuCrud; + private javax.swing.JLabel jLabel1; private javax.swing.JPanel jPcontenedor; // End of variables declaration//GEN-END:variables } diff --git a/HotelAdmin/src/Vistas/Jframe/Login.form b/HotelAdmin/src/Vistas/Jframe/Login.form index 94fb699..0d528f8 100644 --- a/HotelAdmin/src/Vistas/Jframe/Login.form +++ b/HotelAdmin/src/Vistas/Jframe/Login.form @@ -3,9 +3,6 @@
- - - @@ -137,7 +134,7 @@ - + @@ -145,32 +142,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -180,34 +152,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -215,31 +162,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -247,41 +170,16 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -297,7 +195,7 @@ - + @@ -306,10 +204,12 @@ + + - + @@ -321,7 +221,7 @@ - + @@ -335,7 +235,7 @@ - + @@ -361,24 +261,15 @@ - - - - - - - - - - - - + + + @@ -397,18 +288,6 @@ - - - - - - - - - - - - @@ -433,30 +312,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -501,7 +356,7 @@ - + @@ -513,6 +368,7 @@ + @@ -536,6 +392,7 @@ + diff --git a/HotelAdmin/src/Vistas/Jframe/Login.java b/HotelAdmin/src/Vistas/Jframe/Login.java index 040cbc0..9f826f4 100644 --- a/HotelAdmin/src/Vistas/Jframe/Login.java +++ b/HotelAdmin/src/Vistas/Jframe/Login.java @@ -5,8 +5,11 @@ */ package Vistas.Jframe; +import Controladores.LoginControlador; +import Modelo.LoginModelo; import java.awt.Toolkit; import java.awt.event.KeyEvent; +import java.util.ArrayList; import javax.swing.JOptionPane; /** @@ -23,68 +26,102 @@ public Login() { initComponents(); this.setLocationRelativeTo(null); jPRegistro.setVisible(false); - - + setIconImage(Toolkit.getDefaultToolkit(). - getImage(this.getClass().getResource("/imagenes/Logo.png"))); + getImage(this.getClass().getResource("/imagenes/Logo.png"))); setResizable(false); } - public void ingresar(){ //-------------------------------------------- _Verifica los campos para procionar el acceso dependiendo del tipo de usuario - try{ - - - String usuario=jTusername.getText(); - String contraseña=jPcontraseña.getText(); - if(usuario.equalsIgnoreCase("") ||contraseña.equalsIgnoreCase("")){ - - JOptionPane.showMessageDialog(null, "Campos vacios"); - }else - if(usuario.equalsIgnoreCase("admin") && - contraseña.equalsIgnoreCase("admin")) - { - + public void ingresar() { + try { + boolean found = false; + + String usuario = jTusername.getText().trim(); + String contrasena = jPcontraseña.getText().trim(); + if (usuario.equalsIgnoreCase("Usuario") + || contrasena.equalsIgnoreCase("Contraseña")) { + JOptionPane.showMessageDialog(null, "Hay campos vacios!"); + + }else if (usuario.equalsIgnoreCase("admin") + && contrasena.equalsIgnoreCase("admin")) { + + found = true; Principal pri = new Principal(); pri.setVisible(true); dispose(); - } else { - JOptionPane.showMessageDialog(null, - "Usuario o contraseña incorrecta"); - //----------------------------------------------------------------------------------------- Aqui debe ir el codigo para validar una contraseña y acceder al menu de empleados - } - - - }catch(Exception ex){ - JOptionPane.showMessageDialog( - null,"Ah ocurrido un error durante la verificacion " - + "\nError :" + ex.getMessage()); - } + }else if(usuario.length()>10){ + JOptionPane.showMessageDialog(null, + "El usuario no debe de tener mas de 10 caracateres."); + + } else { + LoginControlador login = new LoginControlador(); + + ArrayList usuarios = new ArrayList<>(); + + usuarios = login.listadoLogin(0); + + for (int i = 0; i < usuarios.size(); i++) { + if (usuarios.get(i).getUsuario().equalsIgnoreCase(usuario) + && usuarios.get(i).getContrasena() + .equalsIgnoreCase(contrasena)) { + + // LoginModelo usu = usuarios.get(i); + // Principal c= new Principal(uau); + //Principal pri = new Principal(); + //pri.setVisible(true); + int numUser = Integer.parseInt(usuario); + Recepcionista recep = new Recepcionista(numUser); + recep.setVisible(true); + dispose(); + found = true; + break; + + } + } + } + + if (!found) { + JOptionPane.showMessageDialog(null, "Datos incorrectos"); + } + } catch (Exception ex) { + JOptionPane.showMessageDialog( + null, "Ha ocurrido un error durante la verificacion " + + "\nError :" + ex.getMessage()); + } } - public void registrar(){//----------------PERMITE REGISTRAR UN NUEVO USUARIO DE LA BASE DE DATOS + public void registrar(){ try{ String usuario = jTusuario.getText(); - String contraseña = jPcontraseñaRe.getText(); - String telefono = jTtelefono.getText(); - String nombre = jTnombre.getText(); - String direccion = jTdireccion.getText(); - String correo = jTcorreo.getText(); - String cedula = jTcedula.getText(); - String cargo = jTcargo.getText(); + String contrasena = jPcontraseñaRe.getText(); + String ccontrasena = jTconfirmarContraseña.getText(); + String cadmin = jTcontraseñaAdmin.getText(); - if(usuario.equalsIgnoreCase("Usuario") - ||contraseña.equalsIgnoreCase("Contraseña") - ||telefono.equalsIgnoreCase("Telefono") - ||nombre.equalsIgnoreCase("Nombre") - ||direccion.equalsIgnoreCase("Direccion") - ||correo.equalsIgnoreCase("Correo") - ||cedula.equalsIgnoreCase("Cedula") - ||cargo.equalsIgnoreCase("Cargo")){ - + if(usuario.equalsIgnoreCase("Identificación del empleado") + ||contrasena.equalsIgnoreCase("Contraseña") + ||ccontrasena.equalsIgnoreCase("Confirmar contraseña") + ||cadmin.equalsIgnoreCase("Contraseña administrador")){ JOptionPane.showMessageDialog(null,"Hay campos vacios!"); - }else { - JOptionPane.showMessageDialog(null,"¡Se ha registrado con exito!"); + + }else if(usuario.length()>10){ + JOptionPane.showMessageDialog(null, + "El usuario no debe de tener mas de 10 caracateres."); + + }else if(!cadmin.equalsIgnoreCase("admin")){ + JOptionPane.showMessageDialog(null,"La contraseña del administrador" + + " no es correcta"); + } + else if(!ccontrasena.equalsIgnoreCase(contrasena)){ + JOptionPane.showMessageDialog(null,"Las contraseñas no coinciden"); + } + else { + LoginModelo lm = new LoginModelo(usuario,contrasena); + LoginControlador lc = new LoginControlador(); + int i = lc.grabarLogin(lm); + if(i==1){ + JOptionPane.showMessageDialog(null,"¡Se ha registrado con exito!"); + } } }catch(Exception ex){ JOptionPane.showMessageDialog(null @@ -93,8 +130,8 @@ public void registrar(){//----------------PERMITE REGISTRAR UN NUEVO USUARIO DE } } - public void enter(KeyEvent evt){//------------------------------------------------------------------------------Al hacer enter se accede - int key = evt.getKeyCode(); + public void enter(KeyEvent evt){ + int key = evt.getKeyCode(); if(key == KeyEvent.VK_ENTER){ ingresar(); } @@ -115,23 +152,15 @@ private void initComponents() { Menu = new javax.swing.JLabel(); jLlogo = new javax.swing.JLabel(); jPRegistro = new javax.swing.JPanel(); - jTdireccion = new javax.swing.JTextField(); - jTcedula = new javax.swing.JTextField(); - jTtelefono = new javax.swing.JTextField(); - jTcorreo = new javax.swing.JTextField(); - jTnombre = new javax.swing.JTextField(); - jTcargo = new javax.swing.JTextField(); + jTcontraseñaAdmin = new javax.swing.JTextField(); + jTconfirmarContraseña = new javax.swing.JTextField(); jTusuario = new javax.swing.JTextField(); jPcontraseñaRe = new javax.swing.JPasswordField(); jBrgistrar = new javax.swing.JButton(); - jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); - jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); - jLabel7 = new javax.swing.JLabel(); - jLabel9 = new javax.swing.JLabel(); jLfondo1 = new javax.swing.JLabel(); jPiniciarSesion = new javax.swing.JPanel(); jPcontraseña = new javax.swing.JPasswordField(); @@ -141,7 +170,6 @@ private void initComponents() { jLfondo = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - setPreferredSize(new java.awt.Dimension(1118, 680)); getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jPanel1.setBackground(new java.awt.Color(69, 170, 242)); @@ -181,125 +209,50 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jPRegistro.setBackground(new java.awt.Color(69, 170, 242)); jPRegistro.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - jTdireccion.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTdireccion.setForeground(new java.awt.Color(204, 204, 204)); - jTdireccion.setText("Dirección"); - jTdireccion.setBorder(null); - jTdireccion.setOpaque(false); - jTdireccion.addFocusListener(new java.awt.event.FocusAdapter() { + jTcontraseñaAdmin.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jTcontraseñaAdmin.setForeground(new java.awt.Color(204, 204, 204)); + jTcontraseñaAdmin.setText("Contraseña administrador"); + jTcontraseñaAdmin.setBorder(null); + jTcontraseñaAdmin.setOpaque(false); + jTcontraseñaAdmin.setSelectedTextColor(new java.awt.Color(69, 170, 242)); + jTcontraseñaAdmin.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { - jTdireccionFocusGained(evt); + jTcontraseñaAdminFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { - jTdireccionFocusLost(evt); + jTcontraseñaAdminFocusLost(evt); } }); - jTdireccion.addActionListener(new java.awt.event.ActionListener() { + jTcontraseñaAdmin.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { - jTdireccionActionPerformed(evt); + jTcontraseñaAdminActionPerformed(evt); } }); - jPRegistro.add(jTdireccion, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 230, 190, 30)); - - jTcedula.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTcedula.setForeground(new java.awt.Color(204, 204, 204)); - jTcedula.setText("Cédula"); - jTcedula.setBorder(null); - jTcedula.setOpaque(false); - jTcedula.setSelectedTextColor(new java.awt.Color(69, 170, 242)); - jTcedula.addFocusListener(new java.awt.event.FocusAdapter() { + jPRegistro.add(jTcontraseñaAdmin, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 180, 190, 30)); + + jTconfirmarContraseña.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jTconfirmarContraseña.setForeground(new java.awt.Color(204, 204, 204)); + jTconfirmarContraseña.setText("Confirmar contraseña"); + jTconfirmarContraseña.setBorder(null); + jTconfirmarContraseña.setOpaque(false); + jTconfirmarContraseña.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { - jTcedulaFocusGained(evt); + jTconfirmarContraseñaFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { - jTcedulaFocusLost(evt); + jTconfirmarContraseñaFocusLost(evt); } }); - jTcedula.addActionListener(new java.awt.event.ActionListener() { + jTconfirmarContraseña.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { - jTcedulaActionPerformed(evt); + jTconfirmarContraseñaActionPerformed(evt); } }); - jPRegistro.add(jTcedula, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 130, 190, 30)); - - jTtelefono.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTtelefono.setForeground(new java.awt.Color(204, 204, 204)); - jTtelefono.setText("Télefono"); - jTtelefono.setBorder(null); - jTtelefono.setOpaque(false); - jTtelefono.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTtelefonoFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - jTtelefonoFocusLost(evt); - } - }); - jTtelefono.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jTtelefonoActionPerformed(evt); - } - }); - jPRegistro.add(jTtelefono, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 180, 190, 30)); - - jTcorreo.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTcorreo.setForeground(new java.awt.Color(204, 204, 204)); - jTcorreo.setText("Correo"); - jTcorreo.setBorder(null); - jTcorreo.setOpaque(false); - jTcorreo.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTcorreoFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - jTcorreoFocusLost(evt); - } - }); - jPRegistro.add(jTcorreo, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 230, 190, 30)); - - jTnombre.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTnombre.setForeground(new java.awt.Color(204, 204, 204)); - jTnombre.setText("Nombre"); - jTnombre.setBorder(null); - jTnombre.setOpaque(false); - jTnombre.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTnombreFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - jTnombreFocusLost(evt); - } - }); - jTnombre.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jTnombreActionPerformed(evt); - } - }); - jPRegistro.add(jTnombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 130, 190, 30)); - - jTcargo.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTcargo.setForeground(new java.awt.Color(204, 204, 204)); - jTcargo.setText("Cargo"); - jTcargo.setBorder(null); - jTcargo.setOpaque(false); - jTcargo.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTcargoFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - jTcargoFocusLost(evt); - } - }); - jTcargo.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jTcargoActionPerformed(evt); - } - }); - jPRegistro.add(jTcargo, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 180, 190, 30)); + jPRegistro.add(jTconfirmarContraseña, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 180, 190, 30)); jTusuario.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N jTusuario.setForeground(new java.awt.Color(204, 204, 204)); - jTusuario.setText("Usuario"); + jTusuario.setText("Identificación del empleado"); jTusuario.setBorder(null); jTusuario.setOpaque(false); jTusuario.addFocusListener(new java.awt.event.FocusAdapter() { @@ -310,10 +263,21 @@ public void focusLost(java.awt.event.FocusEvent evt) { jTusuarioFocusLost(evt); } }); - jPRegistro.add(jTusuario, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 280, 190, 30)); + jTusuario.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTusuarioActionPerformed(evt); + } + }); + jTusuario.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyTyped(java.awt.event.KeyEvent evt) { + jTusuarioKeyTyped(evt); + } + }); + jPRegistro.add(jTusuario, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 130, 190, 30)); jPcontraseñaRe.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N jPcontraseñaRe.setForeground(new java.awt.Color(204, 204, 204)); + jPcontraseñaRe.setEchoChar((char)0); jPcontraseñaRe.setText("Contraseña"); jPcontraseñaRe.setBorder(null); jPcontraseñaRe.setOpaque(false); @@ -335,7 +299,7 @@ public void keyPressed(java.awt.event.KeyEvent evt) { jPcontraseñaReKeyPressed(evt); } }); - jPRegistro.add(jPcontraseñaRe, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 280, 200, 30)); + jPRegistro.add(jPcontraseñaRe, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 130, 200, 30)); jBrgistrar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Registro-select.png"))); // NOI18N jBrgistrar.setBorder(null); @@ -348,30 +312,23 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { }); jPRegistro.add(jBrgistrar, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 340, -1, -1)); - jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N - jPRegistro.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 220, -1, -1)); - jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N + jLabel3.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusLost(java.awt.event.FocusEvent evt) { + jLabel3FocusLost(evt); + } + }); jPRegistro.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 120, -1, -1)); jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N jPRegistro.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 170, -1, -1)); - jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N - jPRegistro.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 270, -1, -1)); - jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N jPRegistro.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 120, -1, -1)); jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N jPRegistro.add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 170, -1, -1)); - jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N - jPRegistro.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 220, -1, -1)); - - jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/inputText.png"))); // NOI18N - jPRegistro.add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 270, -1, -1)); - jLfondo1.setBackground(new java.awt.Color(69, 170, 242)); jLfondo1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Fondo-registro.png"))); // NOI18N jLfondo1.setAlignmentX(327.0F); @@ -386,6 +343,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jPcontraseña.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N jPcontraseña.setForeground(new java.awt.Color(204, 204, 204)); + jPcontraseña.setEchoChar((char)0); jPcontraseña.setText("Contraseña"); jPcontraseña.setBorder(null); jPcontraseña.setCaretColor(new java.awt.Color(204, 204, 204)); @@ -402,6 +360,11 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jPcontraseñaActionPerformed(evt); } }); + jPcontraseña.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyPressed(java.awt.event.KeyEvent evt) { + jPcontraseñaKeyPressed(evt); + } + }); jPiniciarSesion.add(jPcontraseña, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 210, 260, 20)); jTusername.setFont(new java.awt.Font("Decker", 0, 16)); // NOI18N @@ -416,6 +379,11 @@ public void focusLost(java.awt.event.FocusEvent evt) { jTusernameFocusLost(evt); } }); + jTusername.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyPressed(java.awt.event.KeyEvent evt) { + jTusernameKeyPressed(evt); + } + }); jPiniciarSesion.add(jTusername, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 150, 270, 20)); jLinput.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Input.png"))); // NOI18N @@ -469,90 +437,10 @@ private void jBregistrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-F jPRegistro.setVisible(true); }//GEN-LAST:event_jBregistrarActionPerformed - - private void jTtelefonoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTtelefonoActionPerformed - // TODO add your handling code here: - jTtelefono.selectAll(); - }//GEN-LAST:event_jTtelefonoActionPerformed - - private void jTcedulaFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcedulaFocusGained - // TODO add your handling code here: - jTcedula.setText(""); - }//GEN-LAST:event_jTcedulaFocusGained - - private void jTtelefonoFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTtelefonoFocusGained - // TODO add your handling code here: - jTtelefono.setText(""); - }//GEN-LAST:event_jTtelefonoFocusGained - - private void jTcorreoFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcorreoFocusGained - // TODO add your handling code here: - jTcorreo.setText(""); - }//GEN-LAST:event_jTcorreoFocusGained - - private void jTnombreFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTnombreFocusGained - // TODO add your handling code here: - jTnombre.setText(""); - }//GEN-LAST:event_jTnombreFocusGained - - private void jTcargoFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcargoFocusGained - // TODO add your handling code here: - jTcargo.setText(""); - }//GEN-LAST:event_jTcargoFocusGained - - private void jTdireccionFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTdireccionFocusGained - // TODO add your handling code here: - jTdireccion.setText(""); - }//GEN-LAST:event_jTdireccionFocusGained - - private void jTcedulaFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcedulaFocusLost - // TODO add your handling code here: - if(jTcedula.getText().equalsIgnoreCase("")){ - jTcedula.setText("Cédula"); - } - }//GEN-LAST:event_jTcedulaFocusLost - - private void jTtelefonoFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTtelefonoFocusLost - // TODO add your handling code here: - if(jTtelefono.getText().equalsIgnoreCase("")){ - jTtelefono.setText("Teléfono"); - } - }//GEN-LAST:event_jTtelefonoFocusLost - - private void jTcorreoFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcorreoFocusLost - // TODO add your handling code here: - if(jTcorreo.getText().equalsIgnoreCase("")){ - jTcorreo.setText("Correo eléctronico"); - } - }//GEN-LAST:event_jTcorreoFocusLost - - private void jTnombreFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTnombreFocusLost - // TODO add your handling code here: - if(jTnombre.getText().equalsIgnoreCase("")){ - jTnombre.setText("Nombre"); - } - }//GEN-LAST:event_jTnombreFocusLost - - private void jTcargoFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcargoFocusLost - // TODO add your handling code here: - if(jTcargo.getText().equalsIgnoreCase("")){ - jTcargo.setText("Cargo"); - } - }//GEN-LAST:event_jTcargoFocusLost - - private void jTdireccionFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTdireccionFocusLost - // TODO add your handling code here: - if(jTdireccion.getText().equalsIgnoreCase("")){ - jTdireccion.setText("Dirección"); - } - }//GEN-LAST:event_jTdireccionFocusLost private void jBrgistrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBrgistrarActionPerformed - - // --> FALTA AQUÍ EL LLAMADO A LAS VALIDACIONES - registrar(); - jPRegistro.setVisible(false); - jPiniciarSesion.setVisible(true); + + registrar(); }//GEN-LAST:event_jBrgistrarActionPerformed @@ -583,20 +471,15 @@ private void jTusernameFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:eve }//GEN-LAST:event_jPcontraseñaFocusLost private void jBiniciarSesionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBiniciarSesionActionPerformed - - - //--> FALTA VALIDACIONES + - if(jTusuario.getText().equalsIgnoreCase("") - || jTcargo.getText().equalsIgnoreCase("")){ + if(jTusuario.getText().equalsIgnoreCase("")){ JOptionPane.showMessageDialog(null, "Campos vacios");}else{ - //-------------------------------------------------------------------------------------------BOTON ACCEDER + ingresar(); } - setVisible(false); - new Principal().setVisible(true); }//GEN-LAST:event_jBiniciarSesionActionPerformed @@ -608,7 +491,7 @@ private void jTusuarioFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:ev private void jTusuarioFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTusuarioFocusLost // TODO add your handling code here: if(jTusuario.getText().equalsIgnoreCase("")){ - jTusuario.setText("Usuario"); + jTusuario.setText("Identificación del empleado"); } }//GEN-LAST:event_jTusuarioFocusLost @@ -627,35 +510,73 @@ private void jTusuarioFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:even } }//GEN-LAST:event_jPcontraseñaReFocusLost - private void jTcedulaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTcedulaActionPerformed + private void jPcontraseñaReActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jPcontraseñaReActionPerformed // TODO add your handling code here: - jTcedula.selectAll(); - }//GEN-LAST:event_jTcedulaActionPerformed + jPcontraseña.selectAll(); + }//GEN-LAST:event_jPcontraseñaReActionPerformed - private void jTnombreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTnombreActionPerformed + private void jPcontraseñaReKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jPcontraseñaReKeyPressed // TODO add your handling code here: - jTnombre.selectAll(); - }//GEN-LAST:event_jTnombreActionPerformed + enter(evt); + }//GEN-LAST:event_jPcontraseñaReKeyPressed + + private void jPcontraseñaKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jPcontraseñaKeyPressed + int key = evt.getKeyCode(); + if(key == KeyEvent.VK_ENTER){ + ingresar(); + } + }//GEN-LAST:event_jPcontraseñaKeyPressed + + private void jTusernameKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTusernameKeyPressed - private void jTcargoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTcargoActionPerformed + }//GEN-LAST:event_jTusernameKeyPressed + + private void jTconfirmarContraseñaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTconfirmarContraseñaActionPerformed // TODO add your handling code here: - jTcargo.selectAll(); - }//GEN-LAST:event_jTcargoActionPerformed + jTconfirmarContraseña.selectAll(); + }//GEN-LAST:event_jTconfirmarContraseñaActionPerformed - private void jTdireccionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTdireccionActionPerformed + private void jTconfirmarContraseñaFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTconfirmarContraseñaFocusLost // TODO add your handling code here: - jTdireccion.selectAll(); - }//GEN-LAST:event_jTdireccionActionPerformed + if(jTconfirmarContraseña.getText().equalsIgnoreCase("")){ + jTconfirmarContraseña.setText("Confirmar contraeña"); + } + }//GEN-LAST:event_jTconfirmarContraseñaFocusLost - private void jPcontraseñaReActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jPcontraseñaReActionPerformed + private void jTconfirmarContraseñaFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTconfirmarContraseñaFocusGained // TODO add your handling code here: - jPcontraseña.selectAll(); - }//GEN-LAST:event_jPcontraseñaReActionPerformed + jTconfirmarContraseña.setText(""); + }//GEN-LAST:event_jTconfirmarContraseñaFocusGained - private void jPcontraseñaReKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jPcontraseñaReKeyPressed + private void jTcontraseñaAdminActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTcontraseñaAdminActionPerformed // TODO add your handling code here: - enter(evt); - }//GEN-LAST:event_jPcontraseñaReKeyPressed + jTcontraseñaAdmin.selectAll(); + }//GEN-LAST:event_jTcontraseñaAdminActionPerformed + + private void jTcontraseñaAdminFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcontraseñaAdminFocusLost + // TODO add your handling code here: + if(jTcontraseñaAdmin.getText().equalsIgnoreCase("")){ + jTcontraseñaAdmin.setText("Contraseña administrador"); + } + }//GEN-LAST:event_jTcontraseñaAdminFocusLost + + private void jTcontraseñaAdminFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcontraseñaAdminFocusGained + // TODO add your handling code here: + jTcontraseñaAdmin.setText(""); + }//GEN-LAST:event_jTcontraseñaAdminFocusGained + + private void jTusuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTusuarioActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTusuarioActionPerformed + + private void jTusuarioKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTusuarioKeyTyped + char car = evt.getKeyChar(); + if((car<'0' || car>'9')) evt.consume(); + }//GEN-LAST:event_jTusuarioKeyTyped + + private void jLabel3FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jLabel3FocusLost + // TODO add your handling code here: + }//GEN-LAST:event_jLabel3FocusLost @@ -702,14 +623,10 @@ public void run() { private javax.swing.JButton jBiniciarSesion; private javax.swing.JButton jBregistrar; private javax.swing.JButton jBrgistrar; - private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; - private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; - private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; - private javax.swing.JLabel jLabel9; private javax.swing.JLabel jLfondo; private javax.swing.JLabel jLfondo1; private javax.swing.JLabel jLinput; @@ -719,12 +636,8 @@ public void run() { private javax.swing.JPasswordField jPcontraseña; private javax.swing.JPasswordField jPcontraseñaRe; private javax.swing.JPanel jPiniciarSesion; - private javax.swing.JTextField jTcargo; - private javax.swing.JTextField jTcedula; - private javax.swing.JTextField jTcorreo; - private javax.swing.JTextField jTdireccion; - private javax.swing.JTextField jTnombre; - private javax.swing.JTextField jTtelefono; + private javax.swing.JTextField jTconfirmarContraseña; + private javax.swing.JTextField jTcontraseñaAdmin; private javax.swing.JTextField jTusername; private javax.swing.JTextField jTusuario; // End of variables declaration//GEN-END:variables diff --git a/HotelAdmin/src/Vistas/Jframe/Principal.form b/HotelAdmin/src/Vistas/Jframe/Principal.form index a88757e..1828a5d 100644 --- a/HotelAdmin/src/Vistas/Jframe/Principal.form +++ b/HotelAdmin/src/Vistas/Jframe/Principal.form @@ -3,6 +3,12 @@ + + + + + + @@ -18,53 +24,33 @@ + - - - - - - - - - - - + + - + + + + + + - - - - - - - - - - - - - - - - - - + - + @@ -87,22 +73,22 @@ - + - + - + - + - + @@ -125,22 +111,22 @@ - + - + - + - + @@ -163,7 +149,7 @@ - + @@ -171,14 +157,14 @@ - + - + - + @@ -201,15 +187,15 @@ - + - + - + @@ -232,57 +218,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jframe/Principal.java b/HotelAdmin/src/Vistas/Jframe/Principal.java index 87cbe16..3374838 100644 --- a/HotelAdmin/src/Vistas/Jframe/Principal.java +++ b/HotelAdmin/src/Vistas/Jframe/Principal.java @@ -4,7 +4,11 @@ * and open the template in the editor. */ package Vistas.Jframe; - +import Controladores.ControladorEmpleado; +import Controladores.ControllerServicios; +import Modelo.RoomServicesDAO; +import Controladores.ControllerHabitacion; +import Modelo.HabitacionDAO; import Vistas.Jpanel.HabitacionAgregarModificarGUI; import Vistas.Jpanel.HabitacionListaGUI; import Vistas.Jpanel.jPhabitacion; @@ -12,7 +16,9 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseListener; - +import Vistas.Jpanel.EmpleadoFormulario; +import Vistas.Jpanel.EmpleadoPanelListar; +import java.awt.Toolkit; /** * * @author nicol @@ -22,13 +28,22 @@ public class Principal extends javax.swing.JFrame { /** * Creates new form Habitación */ + Habitaciones Jframehabitaciones; + Services JframeServices; public Principal() { initComponents(); this.setLocationRelativeTo(null); seleccionarPrimero(); + setResizable(false); + setIconImage(Toolkit.getDefaultToolkit(). + getImage(this.getClass().getResource("/imagenes/Logo.png"))); + HabitacionDAO modelohabitacion = new HabitacionDAO(); + ControllerHabitacion controladorHabitacion + = new ControllerHabitacion(Jframehabitaciones, modelohabitacion); + Jframehabitaciones.setControladorHabitacion(controladorHabitacion); } @@ -43,45 +58,22 @@ public Principal() { private void initComponents() { jPanel1 = new javax.swing.JPanel(); - jPcontenedor = new javax.swing.JPanel(); - jBservicios = new javax.swing.JButton(); jBhabitaciones = new javax.swing.JButton(); - jBclientes = new javax.swing.JButton(); jBempleados = new javax.swing.JButton(); + jBclientes = new javax.swing.JButton(); + jBservicios = new javax.swing.JButton(); jBcerrarSesion = new javax.swing.JButton(); - jLabel1 = new javax.swing.JLabel(); - jLnombre = new javax.swing.JLabel(); - jLfondoGris = new javax.swing.JLabel(); - jLfondoAzul = new javax.swing.JLabel(); + jPcontenedor = new javax.swing.JPanel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setBackground(new java.awt.Color(51, 51, 255)); + setMinimumSize(new java.awt.Dimension(1118, 680)); + getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - jPanel1.setBackground(new java.awt.Color(241, 242, 246)); + jPanel1.setBackground(new java.awt.Color(72, 159, 229)); jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - jPcontenedor.setBackground(new java.awt.Color(241, 242, 246)); - jPcontenedor.setPreferredSize(new java.awt.Dimension(739, 429)); - jPcontenedor.setLayout(new java.awt.BorderLayout()); - jPanel1.add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 50, 766, 559)); - - jBservicios.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/SinSeleccionar.png"))); // NOI18N - jBservicios.setBorder(null); - jBservicios.setBorderPainted(false); - jBservicios.setContentAreaFilled(false); - jBservicios.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBservicios.setMargin(new java.awt.Insets(0, 0, 0, 0)); - jBservicios.setMaximumSize(new java.awt.Dimension(0, 0)); - jBservicios.setMinimumSize(new java.awt.Dimension(0, 0)); - jBservicios.setPreferredSize(new java.awt.Dimension(0, 129)); - jBservicios.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccionar-ser.png"))); // NOI18N - jBservicios.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jBserviciosActionPerformed(evt); - } - }); - jPanel1.add(jBservicios, new org.netbeans.lib.awtextra.AbsoluteConstraints(23, 400, 260, -1)); - - jBhabitaciones.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/SinSelección-habi.png"))); // NOI18N + jBhabitaciones.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/HabitacionBotonSinSele.png"))); // NOI18N jBhabitaciones.setBorder(null); jBhabitaciones.setBorderPainted(false); jBhabitaciones.setContentAreaFilled(false); @@ -90,15 +82,32 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jBhabitaciones.setMaximumSize(new java.awt.Dimension(0, 0)); jBhabitaciones.setMinimumSize(new java.awt.Dimension(0, 0)); jBhabitaciones.setPreferredSize(new java.awt.Dimension(0, 129)); - jBhabitaciones.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-habi.png"))); // NOI18N + jBhabitaciones.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/HabitacionBotonSele.png"))); // NOI18N jBhabitaciones.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBhabitacionesActionPerformed(evt); } }); - jPanel1.add(jBhabitaciones, new org.netbeans.lib.awtextra.AbsoluteConstraints(23, 100, 260, -1)); + jPanel1.add(jBhabitaciones, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 121, 97, 57)); - jBclientes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Sinseleccion-cli.png"))); // NOI18N + jBempleados.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/EmpleadosBotonSinSele.png"))); // NOI18N + jBempleados.setBorder(null); + jBempleados.setBorderPainted(false); + jBempleados.setContentAreaFilled(false); + jBempleados.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBempleados.setMargin(new java.awt.Insets(0, 0, 0, 0)); + jBempleados.setMaximumSize(new java.awt.Dimension(0, 0)); + jBempleados.setMinimumSize(new java.awt.Dimension(0, 0)); + jBempleados.setPreferredSize(new java.awt.Dimension(0, 129)); + jBempleados.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/EmpleadosBotonSele.png"))); // NOI18N + jBempleados.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBempleadosActionPerformed(evt); + } + }); + jPanel1.add(jBempleados, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 301, 97, 57)); + + jBclientes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/CheckInBoton.png"))); // NOI18N jBclientes.setBorder(null); jBclientes.setBorderPainted(false); jBclientes.setContentAreaFilled(false); @@ -107,30 +116,30 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jBclientes.setMaximumSize(new java.awt.Dimension(0, 0)); jBclientes.setMinimumSize(new java.awt.Dimension(0, 0)); jBclientes.setPreferredSize(new java.awt.Dimension(0, 129)); - jBclientes.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-cli.png"))); // NOI18N + jBclientes.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/CheckInBotonSele.png"))); // NOI18N jBclientes.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBclientesActionPerformed(evt); } }); - jPanel1.add(jBclientes, new org.netbeans.lib.awtextra.AbsoluteConstraints(23, 200, 260, -1)); + jPanel1.add(jBclientes, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 218, 97, 57)); - jBempleados.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/SinSeleccionar-emp.png"))); // NOI18N - jBempleados.setBorder(null); - jBempleados.setBorderPainted(false); - jBempleados.setContentAreaFilled(false); - jBempleados.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - jBempleados.setMargin(new java.awt.Insets(0, 0, 0, 0)); - jBempleados.setMaximumSize(new java.awt.Dimension(0, 0)); - jBempleados.setMinimumSize(new java.awt.Dimension(0, 0)); - jBempleados.setPreferredSize(new java.awt.Dimension(0, 129)); - jBempleados.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Seleccion-empl_1.png"))); // NOI18N - jBempleados.addActionListener(new java.awt.event.ActionListener() { + jBservicios.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/serviciosBoton.png"))); // NOI18N + jBservicios.setBorder(null); + jBservicios.setBorderPainted(false); + jBservicios.setContentAreaFilled(false); + jBservicios.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBservicios.setMargin(new java.awt.Insets(0, 0, 0, 0)); + jBservicios.setMaximumSize(new java.awt.Dimension(0, 0)); + jBservicios.setMinimumSize(new java.awt.Dimension(0, 0)); + jBservicios.setPreferredSize(new java.awt.Dimension(0, 129)); + jBservicios.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/serviciosBotonSele.png"))); // NOI18N + jBservicios.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { - jBempleadosActionPerformed(evt); + jBserviciosActionPerformed(evt); } }); - jPanel1.add(jBempleados, new org.netbeans.lib.awtextra.AbsoluteConstraints(23, 300, 260, -1)); + jPanel1.add(jBservicios, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 396, 97, 57)); jBcerrarSesion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/botonSalida.png"))); // NOI18N jBcerrarSesion.setBorder(null); @@ -142,49 +151,19 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jBcerrarSesionActionPerformed(evt); } }); - jPanel1.add(jBcerrarSesion, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 590, -1, -1)); - - jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/user-2-icon.png"))); // NOI18N - jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(1050, 10, 40, 40)); - jPanel1.add(jLnombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(880, 20, 160, 20)); + jPanel1.add(jBcerrarSesion, new org.netbeans.lib.awtextra.AbsoluteConstraints(34, 610, 30, 30)); - jLfondoGris.setBackground(new java.awt.Color(241, 242, 246)); - jLfondoGris.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/fondo-principal.png"))); // NOI18N - jPanel1.add(jLfondoGris, new org.netbeans.lib.awtextra.AbsoluteConstraints(218, 0, 900, 690)); + getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 97, 680)); - jLfondoAzul.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/panel-azul.png"))); // NOI18N - jPanel1.add(jLfondoAzul, new org.netbeans.lib.awtextra.AbsoluteConstraints(-10, 0, 290, 690)); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 680, Short.MAX_VALUE) - ); + jPcontenedor.setLayout(new java.awt.BorderLayout()); + getContentPane().add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(97, 0, 1021, 680)); pack(); }// //GEN-END:initComponents - public void seleccionarPrimero(){ - jBservicios.setSelected(false); - jBempleados.setSelected(false); - jBclientes.setSelected(false); - jBhabitaciones.setSelected(true); - Habitaciones habi = new Habitaciones() ; - jPcontenedor.removeAll(); - jPcontenedor.add(habi); - jPcontenedor.revalidate(); - jPcontenedor.repaint(); - jPcontenedor.setVisible(true); - } - private void jBhabitacionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBhabitacionesActionPerformed // TODO add your handling code here: - /* jBservicios.setSelected(false); + /* jBservicios.setSelected(false); jBempleados.setSelected(false); jBclientes.setSelected(false); jBhabitaciones.setSelected(true); @@ -195,16 +174,37 @@ private void jBhabitacionesActionPerformed(java.awt.event.ActionEvent evt) {//GE jPcontenedor.repaint(); jPcontenedor.setVisible(true);*/ seleccionarPrimero(); - + HabitacionDAO modelohabitacion = new HabitacionDAO(); + ControllerHabitacion controladorHabitacion + = new ControllerHabitacion(Jframehabitaciones, modelohabitacion); + Jframehabitaciones.setControladorHabitacion(controladorHabitacion); }//GEN-LAST:event_jBhabitacionesActionPerformed + private void jBempleadosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBempleadosActionPerformed + // TODO add your handling code here: + jBservicios.setSelected(false); + jBclientes.setSelected(false); + jBhabitaciones.setSelected(false); + jBempleados.setSelected(true); + + jPcontenedor.setVisible(false); + ControladorEmpleado controladorEmp = new ControladorEmpleado(); + Empleados emp = new Empleados(); + emp.setControladorEmpleado(controladorEmp); + jPcontenedor.removeAll(); + jPcontenedor.add(emp); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + }//GEN-LAST:event_jBempleadosActionPerformed + private void jBclientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBclientesActionPerformed // TODO add your handling code here: jBservicios.setSelected(false); jBempleados.setSelected(false); jBhabitaciones.setSelected(false); jBclientes.setSelected(true); - + jPcontenedor.setVisible(false); Clientes cli = new Clientes() ; jPcontenedor.removeAll(); @@ -214,45 +214,44 @@ private void jBclientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI jPcontenedor.setVisible(true); }//GEN-LAST:event_jBclientesActionPerformed - private void jBcerrarSesionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcerrarSesionActionPerformed + private void jBserviciosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBserviciosActionPerformed // TODO add your handling code here: - setVisible(false); - new Login().setVisible(true); - }//GEN-LAST:event_jBcerrarSesionActionPerformed - private void jBempleadosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBempleadosActionPerformed - // TODO add your handling code here: - jBservicios.setSelected(false); + jBempleados.setSelected(false); jBclientes.setSelected(false); jBhabitaciones.setSelected(false); - jBempleados.setSelected(true); - + jBservicios.setSelected(true); + jPcontenedor.setVisible(false); - Empleados emp = new Empleados() ; + + RoomServicesDAO modelo = new RoomServicesDAO(); + JframeServices = new Services(); jPcontenedor.removeAll(); - jPcontenedor.add(emp); + jPcontenedor.add(JframeServices); jPcontenedor.revalidate(); jPcontenedor.repaint(); jPcontenedor.setVisible(true); - }//GEN-LAST:event_jBempleadosActionPerformed + }//GEN-LAST:event_jBserviciosActionPerformed - private void jBserviciosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBserviciosActionPerformed + private void jBcerrarSesionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcerrarSesionActionPerformed // TODO add your handling code here: - + setVisible(false); + new Login().setVisible(true); + }//GEN-LAST:event_jBcerrarSesionActionPerformed + + public void seleccionarPrimero(){ + jBservicios.setSelected(false); jBempleados.setSelected(false); jBclientes.setSelected(false); - jBhabitaciones.setSelected(false); - jBservicios.setSelected(true); - - jPcontenedor.setVisible(false); - Servicios ser = new Servicios() ; + jBhabitaciones.setSelected(true); + Jframehabitaciones = new Habitaciones() ; jPcontenedor.removeAll(); - jPcontenedor.add(ser); + jPcontenedor.add(Jframehabitaciones); jPcontenedor.revalidate(); jPcontenedor.repaint(); jPcontenedor.setVisible(true); - }//GEN-LAST:event_jBserviciosActionPerformed - + } + /** * @param args the command line arguments */ @@ -286,6 +285,14 @@ public static void main(String args[]) { // // // + // + // + // + // + // + // + // + // /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { @@ -301,10 +308,6 @@ public void run() { private javax.swing.JButton jBempleados; private javax.swing.JButton jBhabitaciones; private javax.swing.JButton jBservicios; - private javax.swing.JLabel jLabel1; - private javax.swing.JLabel jLfondoAzul; - private javax.swing.JLabel jLfondoGris; - private javax.swing.JLabel jLnombre; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPcontenedor; // End of variables declaration//GEN-END:variables diff --git a/HotelAdmin/src/Vistas/Jframe/Recepcionista.form b/HotelAdmin/src/Vistas/Jframe/Recepcionista.form new file mode 100644 index 0000000..23ab82f --- /dev/null +++ b/HotelAdmin/src/Vistas/Jframe/Recepcionista.form @@ -0,0 +1,229 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/HotelAdmin/src/Vistas/Jframe/Recepcionista.java b/HotelAdmin/src/Vistas/Jframe/Recepcionista.java new file mode 100644 index 0000000..722e0e4 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jframe/Recepcionista.java @@ -0,0 +1,313 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jframe; + +import Controladores.*; +import Modelo.ReservaDAO; +import java.awt.Toolkit; + + +/** + * + * @author nicol + */ + +public class Recepcionista extends javax.swing.JFrame { + + /** + * Creates new form Recepcionista + */ + Reservas JframeReservas; + int numEmpleado; + + public Recepcionista(int numEmpleado) { + this.numEmpleado = numEmpleado; + initComponents(); + seleccionarPrimero(); + + setIconImage(Toolkit.getDefaultToolkit(). + getImage(this.getClass().getResource("/imagenes/Logo.png"))); + setResizable(false); + } + //-------------------------------------------------------------------------- + public int getNumEmpleado(){ + return numEmpleado; + } + //-------------------------------------------------------------------------- + public void seleccionarPrimero(){ + jBclientes.setSelected(false); + jBcheckOut.setSelected(false); + jBclientes.setSelected(false); + jBreservar.setSelected(false); + jBservicios.setSelected(false); + jBcheckIn.setSelected(true); + CheckIn check = new CheckIn(numEmpleado); + jPcontenedor.removeAll(); + jPcontenedor.add(check); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + } + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jPanel2 = new javax.swing.JPanel(); + jPanel1 = new javax.swing.JPanel(); + jBreservar = new javax.swing.JButton(); + jBclientes = new javax.swing.JButton(); + jBcheckIn = new javax.swing.JButton(); + jBcheckOut = new javax.swing.JButton(); + jBservicios = new javax.swing.JButton(); + jBcerrarSesion = new javax.swing.JButton(); + jPcontenedor = new javax.swing.JPanel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setMinimumSize(new java.awt.Dimension(1118, 680)); + getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jPanel2.setMinimumSize(new java.awt.Dimension(1118, 680)); + jPanel2.setPreferredSize(new java.awt.Dimension(1118, 680)); + jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jPanel1.setBackground(new java.awt.Color(72, 159, 229)); + jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jBreservar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/reservarBoton.png"))); // NOI18N + jBreservar.setToolTipText(""); + jBreservar.setBorder(null); + jBreservar.setContentAreaFilled(false); + jBreservar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBreservar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/reservarBotonSele.png"))); // NOI18N + jBreservar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBreservarActionPerformed(evt); + } + }); + jPanel1.add(jBreservar, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 396, -1, -1)); + + jBclientes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ClienteBoton.png"))); // NOI18N + jBclientes.setBorder(null); + jBclientes.setContentAreaFilled(false); + jBclientes.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBclientes.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ClienteBotonSele.png"))); // NOI18N + jBclientes.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBclientesActionPerformed(evt); + } + }); + jPanel1.add(jBclientes, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 121, -1, -1)); + + jBcheckIn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/CheckInBoton.png"))); // NOI18N + jBcheckIn.setBorder(null); + jBcheckIn.setContentAreaFilled(false); + jBcheckIn.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBcheckIn.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/CheckInBotonSele.png"))); // NOI18N + jBcheckIn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBcheckInActionPerformed(evt); + } + }); + jPanel1.add(jBcheckIn, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 218, -1, -1)); + + jBcheckOut.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/CheckoutBoton.png"))); // NOI18N + jBcheckOut.setBorder(null); + jBcheckOut.setContentAreaFilled(false); + jBcheckOut.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBcheckOut.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/CheckoutBotonSele.png"))); // NOI18N + jBcheckOut.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBcheckOutActionPerformed(evt); + } + }); + jPanel1.add(jBcheckOut, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 301, -1, -1)); + + jBservicios.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/serviciosBoton.png"))); // NOI18N + jBservicios.setBorder(null); + jBservicios.setContentAreaFilled(false); + jBservicios.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBservicios.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/serviciosBotonSele.png"))); // NOI18N + jBservicios.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBserviciosActionPerformed(evt); + } + }); + jPanel1.add(jBservicios, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 468, -1, -1)); + + jBcerrarSesion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/botonSalida.png"))); // NOI18N + jBcerrarSesion.setBorder(null); + jBcerrarSesion.setBorderPainted(false); + jBcerrarSesion.setContentAreaFilled(false); + jBcerrarSesion.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBcerrarSesion.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBcerrarSesionActionPerformed(evt); + } + }); + jPanel1.add(jBcerrarSesion, new org.netbeans.lib.awtextra.AbsoluteConstraints(34, 610, 30, 30)); + + jPanel2.add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 97, 680)); + + jPcontenedor.setLayout(new java.awt.BorderLayout()); + jPanel2.add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(97, 0, 1118, 680)); + + getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1118, 680)); + + pack(); + }// //GEN-END:initComponents + + private void jBcheckInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcheckInActionPerformed + // TODO add your handling code here: + seleccionarPrimero(); + /*jPcontenedor.setVisible(false); + CheckIn check = new CheckIn(); + jPcontenedor.removeAll(); + jPcontenedor.add(check); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true);*/ + }//GEN-LAST:event_jBcheckInActionPerformed + + private void jBreservarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBreservarActionPerformed + // TODO add your handling code here: + + jBclientes.setSelected(false); + jBcheckOut.setSelected(false); + jBclientes.setSelected(false); + jBservicios.setSelected(false); + jBcheckIn.setSelected(false); + jBreservar.setSelected(true); + jPcontenedor.setVisible(false); + Reservas JframeReservas; + JframeReservas = new Reservas(); + jPcontenedor.removeAll(); + jPcontenedor.add(JframeReservas); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + ControllerReserva.setNumEmpleado(numEmpleado); + + }//GEN-LAST:event_jBreservarActionPerformed + + private void jBclientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBclientesActionPerformed + // TODO add your handling code here: + + jBcheckOut.setSelected(false); + jBclientes.setSelected(false); + jBservicios.setSelected(false); + jBcheckIn.setSelected(false); + jBreservar.setSelected(false); + jBclientes.setSelected(true); + + jPcontenedor.setVisible(false); + ClienteRecepcionista cli = new ClienteRecepcionista(); + jPcontenedor.removeAll(); + jPcontenedor.add(cli); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + + }//GEN-LAST:event_jBclientesActionPerformed + + private void jBcheckOutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcheckOutActionPerformed + // TODO add your handling code here: + + jBclientes.setSelected(false); + jBservicios.setSelected(false); + jBcheckIn.setSelected(false); + jBreservar.setSelected(false); + jBclientes.setSelected(false); + jBcheckOut.setSelected(true); + + jPcontenedor.setVisible(false); + CheckOut check = new CheckOut(numEmpleado); + jPcontenedor.removeAll(); + jPcontenedor.add(check); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + }//GEN-LAST:event_jBcheckOutActionPerformed + + private void jBserviciosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBserviciosActionPerformed + // TODO add your handling code here: + jBclientes.setSelected(false); + jBcheckIn.setSelected(false); + jBreservar.setSelected(false); + jBclientes.setSelected(false); + jBcheckOut.setSelected(false); + jBservicios.setSelected(true); + + jPcontenedor.setVisible(false); + ServiciosRecepcionista ser = new ServiciosRecepcionista (); + jPcontenedor.removeAll(); + jPcontenedor.add(ser); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + + }//GEN-LAST:event_jBserviciosActionPerformed + + private void jBcerrarSesionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcerrarSesionActionPerformed + // TODO add your handling code here: + setVisible(false); + new Login().setVisible(true); + }//GEN-LAST:event_jBcerrarSesionActionPerformed + + + + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Recepcionista.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Recepcionista.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Recepcionista.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Recepcionista.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Recepcionista(123).setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBcerrarSesion; + private javax.swing.JButton jBcheckIn; + private javax.swing.JButton jBcheckOut; + private javax.swing.JButton jBclientes; + private javax.swing.JButton jBreservar; + private javax.swing.JButton jBservicios; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JPanel jPcontenedor; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jframe/Reservas.form b/HotelAdmin/src/Vistas/Jframe/Reservas.form new file mode 100644 index 0000000..6dde52e --- /dev/null +++ b/HotelAdmin/src/Vistas/Jframe/Reservas.form @@ -0,0 +1,112 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jframe/Reservas.java b/HotelAdmin/src/Vistas/Jframe/Reservas.java new file mode 100644 index 0000000..5358641 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jframe/Reservas.java @@ -0,0 +1,130 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jframe; + + +import Vistas.Jpanel.ListaReservasGUI; +import Vistas.Jpanel.RealizarReservaGUI; + + +/** + * + * @author nicol + */ +public class Reservas extends javax.swing.JPanel { + + /** + * Creates new form Reserva + */ + + + public Reservas() { + initComponents(); + PanelRealizarReserva(); + } + + + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jMonthChooser1 = new com.toedter.calendar.JMonthChooser(); + jPcontenedor = new javax.swing.JPanel(); + jBrrealizarReserva = new javax.swing.JButton(); + jBlistaReserva = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setBackground(new java.awt.Color(239, 239, 239)); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jPcontenedor.setBackground(new java.awt.Color(255, 255, 255)); + jPcontenedor.setVerifyInputWhenFocusTarget(false); + jPcontenedor.setLayout(new java.awt.BorderLayout()); + add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 146, 1021, 534)); + + jBrrealizarReserva.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/RealizarReserva.png"))); // NOI18N + jBrrealizarReserva.setBorder(null); + jBrrealizarReserva.setContentAreaFilled(false); + jBrrealizarReserva.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBrrealizarReserva.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/RealizarReservaSele.png"))); // NOI18N + jBrrealizarReserva.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBrrealizarReservaActionPerformed(evt); + } + }); + add(jBrrealizarReserva, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 115, -1, -1)); + + jBlistaReserva.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ListaReserva.png"))); // NOI18N + jBlistaReserva.setBorder(null); + jBlistaReserva.setContentAreaFilled(false); + jBlistaReserva.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBlistaReserva.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ListaReservaSele.png"))); // NOI18N + jBlistaReserva.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBlistaReservaActionPerformed(evt); + } + }); + add(jBlistaReserva, new org.netbeans.lib.awtextra.AbsoluteConstraints(196, 115, -1, -1)); + + jLabel1.setFont(new java.awt.Font("Decker", 0, 20)); // NOI18N + jLabel1.setForeground(new java.awt.Color(112, 112, 112)); + jLabel1.setText("Reserva"); + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 50, -1, -1)); + }// //GEN-END:initComponents + + private void jBrrealizarReservaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBrrealizarReservaActionPerformed + PanelRealizarReserva(); + }//GEN-LAST:event_jBrrealizarReservaActionPerformed + + private void jBlistaReservaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBlistaReservaActionPerformed + panelListarReserva(); + }//GEN-LAST:event_jBlistaReservaActionPerformed + + public void panelListarReserva(){ + jBrrealizarReserva.setSelected(false); + jBlistaReserva.setSelected(true); + jPcontenedor.setVisible(true); + jPcontenedor.removeAll(); + ListaReservasGUI pListareserva; + pListareserva = new ListaReservasGUI(this); + jPcontenedor.add(pListareserva); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + } + + + public RealizarReservaGUI PanelRealizarReserva(){ + + jBlistaReserva.setSelected(false); + jBrrealizarReserva.setSelected(true); + jPcontenedor.removeAll(); + RealizarReservaGUI pRealizarReserva; + pRealizarReserva = new RealizarReservaGUI(this); + pRealizarReserva.establecerInterfaz(); + pRealizarReserva.resetListRooms(); + jPcontenedor.add(pRealizarReserva); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + return pRealizarReserva; + } + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBlistaReserva; + private javax.swing.JButton jBrrealizarReserva; + private javax.swing.JLabel jLabel1; + private com.toedter.calendar.JMonthChooser jMonthChooser1; + private javax.swing.JPanel jPcontenedor; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jframe/Services.form b/HotelAdmin/src/Vistas/Jframe/Services.form new file mode 100644 index 0000000..f90786c --- /dev/null +++ b/HotelAdmin/src/Vistas/Jframe/Services.form @@ -0,0 +1,109 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jframe/Services.java b/HotelAdmin/src/Vistas/Jframe/Services.java new file mode 100644 index 0000000..2fb103b --- /dev/null +++ b/HotelAdmin/src/Vistas/Jframe/Services.java @@ -0,0 +1,160 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jframe; + +import Controladores.ControllerServicios; +import Modelo.RoomServices; +import Modelo.RoomServicesDAO; +import Vistas.Jpanel.EmpleadoFormulario; +import Vistas.Jpanel.panelAgregarServicio; +import Vistas.Jpanel.panelModificarServicio; +import Vistas.Jpanel.jPservicio; +import Vistas.Jframe.*; +import java.awt.Color; +import java.awt.Font; +import javax.swing.JButton; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JTextField; +/** + * + * @author nicol + */ +public class Services extends javax.swing.JPanel { + + /** + * Creates new form Servicios + */ + + panelAgregarServicio panelFormulario; + + + + + public Services() { + initComponents(); + panelFormulario = new panelAgregarServicio(this); + mostrarPanelFormulario(""); + } + + public void setControladorServicios(ControllerServicios controladorServicios) { + + } + + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jBmodificar = new javax.swing.JButton(); + jBagregar = new javax.swing.JButton(); + jPcontenedor = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + + setBackground(new java.awt.Color(239, 239, 239)); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jBmodificar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonModificarSinSele.png"))); // NOI18N + jBmodificar.setBorder(null); + jBmodificar.setBorderPainted(false); + jBmodificar.setContentAreaFilled(false); + jBmodificar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBmodificar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonModificarSele.png"))); // NOI18N + jBmodificar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBmodificarActionPerformed(evt); + } + }); + add(jBmodificar, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 115, 56, 30)); + + jBagregar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonAgregarSinSele.png"))); // NOI18N + jBagregar.setBorder(null); + jBagregar.setBorderPainted(false); + jBagregar.setContentAreaFilled(false); + jBagregar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBagregar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonAgregarSele.png"))); // NOI18N + jBagregar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBagregarActionPerformed(evt); + } + }); + add(jBagregar, new org.netbeans.lib.awtextra.AbsoluteConstraints(79, 115, 49, -1)); + + jPcontenedor.setBackground(new java.awt.Color(255, 255, 255)); + jPcontenedor.setLayout(new java.awt.BorderLayout()); + add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 146, 1021, 534)); + + jLabel1.setFont(new java.awt.Font("Decker", 0, 20)); // NOI18N + jLabel1.setForeground(new java.awt.Color(112, 112, 112)); + jLabel1.setText("Servicio"); + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 50, -1, -1)); + }// //GEN-END:initComponents + + private void jBmodificarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBmodificarActionPerformed + mostrarPanelLista(); + }//GEN-LAST:event_jBmodificarActionPerformed + + + private void jBagregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBagregarActionPerformed + mostrarPanelFormulario(""); + ControllerServicios.setOpcionEjec("guardar"); + panelFormulario.setearCampos(); + }//GEN-LAST:event_jBagregarActionPerformed + + + public void mostrarPanelLista(){ + jBagregar.setSelected(false); + jBmodificar.setSelected(true); + jPcontenedor.removeAll(); + panelModificarServicio panelLista; + panelLista = new panelModificarServicio(this); + jPcontenedor.add(panelLista); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + } + + + public void mostrarPanelFormulario(String msjValidador){ + if(msjValidador.equals("actualizar")){ + jBmodificar.setSelected(true); + jBagregar.setSelected(false); + }else{ + jBmodificar.setSelected(false); + jBagregar.setSelected(true); + } + jPcontenedor.removeAll(); + jPcontenedor.add(panelFormulario); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + } + + public void gestionMensajes(String mensaje, String titulo, int icono) { + JOptionPane.showMessageDialog(this, mensaje, titulo, icono); + } + + + + public void llenarFormulario(RoomServices roomService){ + panelFormulario.llenarFormulario(roomService); + } + + + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBagregar; + private javax.swing.JButton jBmodificar; + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel jPcontenedor; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jframe/Servicios.java b/HotelAdmin/src/Vistas/Jframe/Servicios.java index 89560ef..b3d6991 100644 --- a/HotelAdmin/src/Vistas/Jframe/Servicios.java +++ b/HotelAdmin/src/Vistas/Jframe/Servicios.java @@ -5,7 +5,7 @@ */ package Vistas.Jframe; -import Vistas.Jpanel.EmpleadoAgregarModificarGUI; +import Vistas.Jpanel.EmpleadoFormulario; import Vistas.Jpanel.ServiciosAgregarModificarGUI; import Vistas.Jpanel.ServiciosListaGUI; import Vistas.Jpanel.jPservicio; diff --git a/HotelAdmin/src/Vistas/Jframe/ServiciosRecepcionista.form b/HotelAdmin/src/Vistas/Jframe/ServiciosRecepcionista.form new file mode 100644 index 0000000..560ba0c --- /dev/null +++ b/HotelAdmin/src/Vistas/Jframe/ServiciosRecepcionista.form @@ -0,0 +1,81 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jframe/ServiciosRecepcionista.java b/HotelAdmin/src/Vistas/Jframe/ServiciosRecepcionista.java new file mode 100644 index 0000000..49fd155 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jframe/ServiciosRecepcionista.java @@ -0,0 +1,74 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jframe; + +import Vistas.Jpanel.AgregarServicioRecepGUI; + +/** + * + * @author nicol + */ +public class ServiciosRecepcionista extends javax.swing.JPanel { + + /** + * Creates new form ServiciosRecep + */ + public ServiciosRecepcionista() { + initComponents(); + seleccionar(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jPcontenedor = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + jBagregarServicio = new javax.swing.JButton(); + + setBackground(new java.awt.Color(239, 239, 239)); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jPcontenedor.setBackground(new java.awt.Color(255, 255, 255)); + jPcontenedor.setVerifyInputWhenFocusTarget(false); + jPcontenedor.setLayout(new java.awt.BorderLayout()); + add(jPcontenedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 146, 1021, 534)); + + jLabel1.setFont(new java.awt.Font("Decker", 0, 20)); // NOI18N + jLabel1.setForeground(new java.awt.Color(112, 112, 112)); + jLabel1.setText("Servicio"); + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 50, -1, -1)); + + jBagregarServicio.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/botonAregarServicioSinSele.png"))); // NOI18N + jBagregarServicio.setBorder(null); + jBagregarServicio.setContentAreaFilled(false); + jBagregarServicio.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBagregarServicio.setSelected(true); + jBagregarServicio.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/botonAregarServicio.png"))); // NOI18N + add(jBagregarServicio, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 115, -1, -1)); + }// //GEN-END:initComponents + + private void seleccionar(){ + jBagregarServicio.setSelected(true); + AgregarServicioRecepGUI servi= new AgregarServicioRecepGUI(); + jPcontenedor.removeAll(); + jPcontenedor.add(servi); + jPcontenedor.revalidate(); + jPcontenedor.repaint(); + jPcontenedor.setVisible(true); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBagregarServicio; + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel jPcontenedor; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/AgregarServicioRecepGUI.form b/HotelAdmin/src/Vistas/Jpanel/AgregarServicioRecepGUI.form new file mode 100644 index 0000000..a23d42f --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/AgregarServicioRecepGUI.form @@ -0,0 +1,270 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/AgregarServicioRecepGUI.java b/HotelAdmin/src/Vistas/Jpanel/AgregarServicioRecepGUI.java new file mode 100644 index 0000000..c114c6a --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/AgregarServicioRecepGUI.java @@ -0,0 +1,209 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package Vistas.Jpanel; + +/** + * + * @author nicol + */ +public class AgregarServicioRecepGUI extends javax.swing.JPanel { + + /** Creates new form AgregarServicioRecepGUI */ + public AgregarServicioRecepGUI() { + initComponents(); + AgregarListaHabitaciones(); + ServciosAgregarCantidad(); + listaServiciosAñadidos(); + } + + private void AgregarListaHabitaciones(){ + + //MOSTRAR HABITACIÓN POR SU TIPO + jPnumeroHabitacion habi = new jPnumeroHabitacion(01); + for(int i=0;i<10;i++){ + jPcontenido.add(habi); + jPcontenido.revalidate(); + jPcontenido.repaint(); + } + } + + private void ServciosAgregarCantidad(){ + + //AGREGAR CANTIDAD A SERVICIOS POR AÑADIR + jPserviciosRecepcionista ser = new jPserviciosRecepcionista("chocololate",55.000,9); + for(int i=0;i<10;i++){ + jPingresoCantidad.add(ser); + jPingresoCantidad.revalidate(); + jPingresoCantidad.repaint(); + } + //jCservicios.add(); + } + + private void listaServiciosAñadidos(){ + + //AGREGAR CANTIDAD A SERVICIOS POR AÑADIR + jPserviciosRecepcionista2 ser = new jPserviciosRecepcionista2("chocololate",55.000,9); + for(int i=0;i<10;i++){ + jPlistaServicios.add(ser); + jPlistaServicios.revalidate(); + jPlistaServicios.repaint(); + } + //jCservicios.add(); + } + /** This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jScrollPane4 = new javax.swing.JScrollPane(); + jPcontenido = new javax.swing.JPanel(); + jScrollPane3 = new javax.swing.JScrollPane(); + jPlistaServicios = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + jScrollPane5 = new javax.swing.JScrollPane(); + jPingresoCantidad = new javax.swing.JPanel(); + jCtipoHabitacion = new javax.swing.JComboBox(); + jBañadir = new javax.swing.JButton(); + jLabel3 = new javax.swing.JLabel(); + jBcancelar = new javax.swing.JButton(); + jBguardar = new javax.swing.JButton(); + jLabel5 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jScrollPane4.setBorder(null); + jScrollPane4.setHorizontalScrollBar(null); + + jPcontenido.setBackground(new java.awt.Color(255, 255, 255)); + jPcontenido.setLayout(new java.awt.GridLayout(0, 3, 0, 1)); + jScrollPane4.setViewportView(jPcontenido); + + add(jScrollPane4, new org.netbeans.lib.awtextra.AbsoluteConstraints(86, 98, 530, 370)); + + jScrollPane3.setBorder(null); + jScrollPane3.setHorizontalScrollBar(null); + + jPlistaServicios.setBackground(new java.awt.Color(255, 255, 255)); + jPlistaServicios.setLayout(new java.awt.GridLayout(0, 3, 0, 1)); + jScrollPane3.setViewportView(jPlistaServicios); + + add(jScrollPane3, new org.netbeans.lib.awtextra.AbsoluteConstraints(730, 330, 204, 80)); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/marcoServiciosLista.png"))); // NOI18N + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(82, 92, -1, -1)); + + jScrollPane5.setBorder(null); + jScrollPane5.setHorizontalScrollBar(null); + + jPingresoCantidad.setBackground(new java.awt.Color(255, 255, 255)); + jPingresoCantidad.setLayout(new java.awt.GridLayout(0, 3, 0, 1)); + jScrollPane5.setViewportView(jPingresoCantidad); + + add(jScrollPane5, new org.netbeans.lib.awtextra.AbsoluteConstraints(740, 114, 171, 90)); + + jCtipoHabitacion.setFont(new java.awt.Font("Decker", 0, 13)); // NOI18N + jCtipoHabitacion.setForeground(new java.awt.Color(204, 204, 204)); + jCtipoHabitacion.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Simple" })); + jCtipoHabitacion.setBorder(null); + jCtipoHabitacion.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jCtipoHabitacionActionPerformed(evt); + } + }); + add(jCtipoHabitacion, new org.netbeans.lib.awtextra.AbsoluteConstraints(238, 37, 122, 20)); + + jBañadir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BotonAñadir.png"))); // NOI18N + jBañadir.setBorder(null); + jBañadir.setContentAreaFilled(false); + jBañadir.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBañadir.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBañadirActionPerformed(evt); + } + }); + add(jBañadir, new org.netbeans.lib.awtextra.AbsoluteConstraints(855, 203, -1, -1)); + + jLabel3.setFont(new java.awt.Font("Decker", 0, 13)); // NOI18N + jLabel3.setForeground(new java.awt.Color(165, 165, 165)); + jLabel3.setText("Habitaciones :"); + add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(143, 37, -1, -1)); + + jBcancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-sinSeleccion.png"))); // NOI18N + jBcancelar.setContentAreaFilled(false); + jBcancelar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBcancelar.setInheritsPopupMenu(true); + jBcancelar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-seleccionado.png"))); // NOI18N + jBcancelar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBcancelarActionPerformed(evt); + } + }); + add(jBcancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(693, 441, 130, 50)); + + jBguardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar-SinSele.png"))); // NOI18N + jBguardar.setBorder(null); + jBguardar.setContentAreaFilled(false); + jBguardar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBguardar.setInheritsPopupMenu(true); + jBguardar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/GuardarSele.png"))); // NOI18N + jBguardar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBguardarActionPerformed(evt); + } + }); + add(jBguardar, new org.netbeans.lib.awtextra.AbsoluteConstraints(826, 441, 140, -1)); + + jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ListaServiciosAgregar.png"))); // NOI18N + add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(693, 45, -1, -1)); + + jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ListaServicios2.png"))); // NOI18N + add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(693, 258, -1, -1)); + }// //GEN-END:initComponents + + private void jCtipoHabitacionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCtipoHabitacionActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jCtipoHabitacionActionPerformed + + private void jBcancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcancelarActionPerformed + // TODO add your handling code here: + + }//GEN-LAST:event_jBcancelarActionPerformed + + private void jBguardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBguardarActionPerformed + // TODO add your handling code here: + + }//GEN-LAST:event_jBguardarActionPerformed + + private void jBañadirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBañadirActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jBañadirActionPerformed + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBañadir; + private javax.swing.JButton jBcancelar; + private javax.swing.JButton jBguardar; + private javax.swing.JComboBox jCtipoHabitacion; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel5; + private javax.swing.JPanel jPcontenido; + private javax.swing.JPanel jPingresoCantidad; + private javax.swing.JPanel jPlistaServicios; + private javax.swing.JScrollPane jScrollPane3; + private javax.swing.JScrollPane jScrollPane4; + private javax.swing.JScrollPane jScrollPane5; + // End of variables declaration//GEN-END:variables + +} diff --git a/HotelAdmin/src/Vistas/Jpanel/CheckInReservaPreviaGUI.form b/HotelAdmin/src/Vistas/Jpanel/CheckInReservaPreviaGUI.form new file mode 100644 index 0000000..af9a700 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/CheckInReservaPreviaGUI.form @@ -0,0 +1,277 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/CheckInReservaPreviaGUI.java b/HotelAdmin/src/Vistas/Jpanel/CheckInReservaPreviaGUI.java new file mode 100644 index 0000000..452b5cd --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/CheckInReservaPreviaGUI.java @@ -0,0 +1,353 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + +import java.awt.event.KeyEvent; +import Modelo.Reserva; +import Controladores.ControladorHospedaje; +import Modelo.Hospedaje; +import Controladores.ControladorCheckout; +import Controladores.ControllerHabitacion; +import Modelo.Checkout; +import Controladores.ControllerReserva; +import javax.swing.JOptionPane; +import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.text.ParseException; +/** + * + * @author nicol + */ +public class CheckInReservaPreviaGUI extends javax.swing.JPanel { + /*int idReserva; + int idHabitacion; + int idCliente; + int idEmpleado; + int numeroPersonas; + String fechaReserva; + String fechaIngreso; + String fechSalida; + */ + int numEmpleado; + int comprobacion; + /** + * Creates new form CheckInReservaPreviaGUI + */ + public CheckInReservaPreviaGUI(int ie) { + numEmpleado = ie; + initComponents(); + } + + private void agregarDatosReserva(){ + + ControllerReserva rc = new ControllerReserva(); + String id = jTbuscador.getText().trim(); + Reserva r = new Reserva(); + int idcliente; + if(id.equalsIgnoreCase("")|| + id.equalsIgnoreCase("Buscar reserva por ID de cliente")){ + JOptionPane.showMessageDialog(null, + " Debe ingresar la identificacion de un cliente " + + "para encontrar la reserva"); + vaciarCampos(); + }else if(id.length()>10){ + JOptionPane.showMessageDialog(null, + "La identificación no debe de tener mas de 10 caracateres."); + vaciarCampos(); + } + else{ + idcliente = Integer.parseInt(id); + r = rc.getReserva(idcliente); + if(r.getNumero_reserva()!=0){ + jLnumeroReserva.setText(r.getNumero_reserva()+""); + jLidHabitacion.setText(r.getNum_Habitacion()+""); + jLidCliente.setText(r.getNumCliente()+""); + jLidEmpleado.setText(r.getNum_Empleado()+""); + jLnumeroPersonas.setText(r.getNum_Personas()+""); + jLfechaReserva.setText(r.getFecha_reserva()+""); + jLfechaIngreso.setText(r.getFecha_ingreso()+""); + jLfechaSalida.setText(r.getFecha_salida()+""); + }else { + JOptionPane.showMessageDialog(null, + "No se encontro ninguna reserva con este ID," + + " verifique si fue ingresado correctamente"); + vaciarCampos(); + } + } + } + + private void hacerHospedaje(){ + Hospedaje h = new Hospedaje(); + ControladorHospedaje ch = new ControladorHospedaje(); + + h.setIdHabitacion(Integer.parseInt(jLidHabitacion.getText())); + h.setIdCliente(Integer.parseInt(jLidCliente.getText())); + h.setNumeroPesonas(Integer.parseInt(jLnumeroPersonas.getText())); + h.setFechaIngreso(Timestamp.valueOf (jLfechaIngreso.getText())); + h.setFechaSalida(Timestamp.valueOf (jLfechaSalida.getText())); + h.setEstado(true); + h.setIdEmpleado(numEmpleado); + h.setId_reserva(Integer.parseInt(jLnumeroReserva.getText())); + + int i = ch.grabarHospedaje(h); + crearCheckout(ch.extraerId());//--------------- + if(i==1){ + JOptionPane.showMessageDialog(null, + "Hospedaje registrado con exito."); + vaciarCampos(); + } + else { + JOptionPane.showMessageDialog(null, + "Ocurrio un error al realizar el Hospedaje."); + vaciarCampos(); + } + } + + private void vaciarCampos(){ + jLnumeroReserva.setText(" "); + jLidHabitacion.setText(" "); + jLidCliente.setText(" "); + jLidEmpleado.setText(" "); + jLnumeroPersonas.setText(" "); + jLfechaReserva.setText(" "); + jLfechaIngreso.setText(" "); + jLfechaSalida.setText(" "); + } + //---------------------------- + private void crearCheckout(int idhospedaje){ + Checkout c = new Checkout(); + ControladorCheckout co = new ControladorCheckout(); + ControllerHabitacion ch = new ControllerHabitacion(); + + int valorTotal = numDias()* + ch.getPrecioHabitacion(Integer.parseInt(jLidHabitacion.getText())); + c.setIdHospedaje(idhospedaje); + c.setValorTotal(valorTotal); + co.grabarChekout(c); + } + private int numDias(){ + int dias=0; + try { + String fi = jLfechaIngreso.getText(); + String fs = jLfechaSalida.getText(); + fi = fi.substring(0, fi.indexOf(" ")); + fs = fs.substring(0, fs.indexOf(" ")); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); + Date fechaInicial = dateFormat.parse(fi); + Date fechaFinal = dateFormat.parse(fs); + dias=(int) ((fechaFinal.getTime()-fechaInicial.getTime())/86400000); + } catch(ParseException e){ + JOptionPane.showMessageDialog(null, + "Ocurrio un error al realizar el Hospedaje"); + } finally { + return dias; + } + } + //---------------------------- + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jLidHabitacion = new javax.swing.JLabel(); + jLidCliente = new javax.swing.JLabel(); + jLidEmpleado = new javax.swing.JLabel(); + jLfechaReserva = new javax.swing.JLabel(); + jLfechaIngreso = new javax.swing.JLabel(); + jLfechaSalida = new javax.swing.JLabel(); + jLnumeroPersonas = new javax.swing.JLabel(); + jLnumeroReserva = new javax.swing.JLabel(); + jLabel10 = new javax.swing.JLabel(); + jButton1 = new javax.swing.JButton(); + jTbuscador = new javax.swing.JTextField(); + jBcancelar = new javax.swing.JButton(); + jBcheckIn = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setBackground(new java.awt.Color(255, 255, 255)); + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jLidHabitacion.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jLidHabitacion.setForeground(new java.awt.Color(112, 112, 112)); + jLidHabitacion.setText(" "); + add(jLidHabitacion, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 185, 190, -1)); + + jLidCliente.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jLidCliente.setForeground(new java.awt.Color(112, 112, 112)); + jLidCliente.setText(" "); + add(jLidCliente, new org.netbeans.lib.awtextra.AbsoluteConstraints(505, 215, 300, -1)); + + jLidEmpleado.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jLidEmpleado.setForeground(new java.awt.Color(112, 112, 112)); + jLidEmpleado.setText(" "); + add(jLidEmpleado, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 245, 300, -1)); + + jLfechaReserva.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jLfechaReserva.setForeground(new java.awt.Color(112, 112, 112)); + jLfechaReserva.setText(" "); + add(jLfechaReserva, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 275, 255, -1)); + + jLfechaIngreso.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jLfechaIngreso.setForeground(new java.awt.Color(112, 112, 112)); + jLfechaIngreso.setText(" "); + add(jLfechaIngreso, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 305, 260, -1)); + + jLfechaSalida.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jLfechaSalida.setForeground(new java.awt.Color(112, 112, 112)); + jLfechaSalida.setText(" "); + add(jLfechaSalida, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 335, 260, -1)); + + jLnumeroPersonas.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jLnumeroPersonas.setForeground(new java.awt.Color(112, 112, 112)); + jLnumeroPersonas.setText(" "); + add(jLnumeroPersonas, new org.netbeans.lib.awtextra.AbsoluteConstraints(605, 365, 220, -1)); + + jLnumeroReserva.setFont(new java.awt.Font("Decker", 1, 17)); // NOI18N + jLnumeroReserva.setForeground(new java.awt.Color(112, 112, 112)); + jLnumeroReserva.setText(" "); + add(jLnumeroReserva, new org.netbeans.lib.awtextra.AbsoluteConstraints(639, 143, 60, -1)); + + jLabel10.setFont(new java.awt.Font("Decker", 1, 17)); // NOI18N + jLabel10.setForeground(new java.awt.Color(112, 112, 112)); + jLabel10.setText("Reserva"); + add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(567, 143, 70, -1)); + + jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/buscar-azul.png"))); // NOI18N + jButton1.setBorder(null); + jButton1.setContentAreaFilled(false); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(79, 44, 24, 24)); + + jTbuscador.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jTbuscador.setForeground(new java.awt.Color(191, 191, 191)); + jTbuscador.setText("Buscar reserva por ID de cliente"); + jTbuscador.setBorder(null); + jTbuscador.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTbuscadorFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jTbuscadorFocusLost(evt); + } + }); + jTbuscador.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTbuscadorActionPerformed(evt); + } + }); + jTbuscador.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyPressed(java.awt.event.KeyEvent evt) { + jTbuscadorKeyPressed(evt); + } + public void keyTyped(java.awt.event.KeyEvent evt) { + jTbuscadorKeyTyped(evt); + } + }); + add(jTbuscador, new org.netbeans.lib.awtextra.AbsoluteConstraints(118, 47, 210, -1)); + + jBcancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-sinSeleccion.png"))); // NOI18N + jBcancelar.setBorder(null); + jBcancelar.setBorderPainted(false); + jBcancelar.setContentAreaFilled(false); + jBcancelar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-seleccionado.png"))); // NOI18N + jBcancelar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBcancelarActionPerformed(evt); + } + }); + add(jBcancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(355, 440, 125, 40)); + + jBcheckIn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Check-inBoton.png"))); // NOI18N + jBcheckIn.setBorder(null); + jBcheckIn.setContentAreaFilled(false); + jBcheckIn.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Check-in-seleccionado.png"))); // NOI18N + jBcheckIn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBcheckInActionPerformed(evt); + } + }); + add(jBcheckIn, new org.netbeans.lib.awtextra.AbsoluteConstraints(518, 440, 125, 40)); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/MostrarReserva.png"))); // NOI18N + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(181, 114, 660, -1)); + }// //GEN-END:initComponents + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + agregarDatosReserva(); + }//GEN-LAST:event_jButton1ActionPerformed + + private void jTbuscadorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTbuscadorActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTbuscadorActionPerformed + + private void jTbuscadorFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTbuscadorFocusGained + + jTbuscador.setText(""); + }//GEN-LAST:event_jTbuscadorFocusGained + + private void jTbuscadorFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTbuscadorFocusLost + if(jTbuscador.getText().equalsIgnoreCase("")){ + jTbuscador.setText("Buscar reserva por ID de cliente"); + } + }//GEN-LAST:event_jTbuscadorFocusLost + + private void jTbuscadorKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTbuscadorKeyPressed + int key = evt.getKeyCode(); + if(key == KeyEvent.VK_ENTER){ + agregarDatosReserva(); + } + }//GEN-LAST:event_jTbuscadorKeyPressed + + private void jBcancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcancelarActionPerformed + + vaciarCampos(); + }//GEN-LAST:event_jBcancelarActionPerformed + + private void jTbuscadorKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTbuscadorKeyTyped + char car = evt.getKeyChar(); + if((car<'0' || car>'9')) evt.consume(); + }//GEN-LAST:event_jTbuscadorKeyTyped + + private void jBcheckInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcheckInActionPerformed + if(!jLnumeroReserva.getText().equalsIgnoreCase(" ")){ + hacerHospedaje(); + }else{ + JOptionPane.showMessageDialog(null, + "Debe buscar una reserva primero."); + vaciarCampos(); + } + }//GEN-LAST:event_jBcheckInActionPerformed + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBcancelar; + private javax.swing.JButton jBcheckIn; + private javax.swing.JButton jButton1; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel10; + private javax.swing.JLabel jLfechaIngreso; + private javax.swing.JLabel jLfechaReserva; + private javax.swing.JLabel jLfechaSalida; + private javax.swing.JLabel jLidCliente; + private javax.swing.JLabel jLidEmpleado; + private javax.swing.JLabel jLidHabitacion; + private javax.swing.JLabel jLnumeroPersonas; + private javax.swing.JLabel jLnumeroReserva; + private javax.swing.JTextField jTbuscador; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/CheckInSinReservaGUI.form b/HotelAdmin/src/Vistas/Jpanel/CheckInSinReservaGUI.form new file mode 100644 index 0000000..a3c90c9 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/CheckInSinReservaGUI.form @@ -0,0 +1,366 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/CheckInSinReservaGUI.java b/HotelAdmin/src/Vistas/Jpanel/CheckInSinReservaGUI.java new file mode 100644 index 0000000..d8def7c --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/CheckInSinReservaGUI.java @@ -0,0 +1,374 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; +import Controladores.ControllerReserva; +import Modelo.Habitacion; +import Servicios.Fecha; +import java.awt.event.KeyEvent; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Date; + +/** + * + * @author nicol + */ +public class CheckInSinReservaGUI extends javax.swing.JPanel { + + /** + * Creates new form CheckInSinReserva + */ + + + String validaOperacion; + + + public CheckInSinReservaGUI() { + initComponents(); + establecerInterfaz(); + Timestamp fi = Fecha.formatearFechaIngreso(jdFechaIngreso.getDate()); + Timestamp fs = Fecha.formatearFechaSalida(jdFechaSalida.getDate()); + cargarHabitaciones(ControllerReserva. + loadListRooms(fi,fs,"save",0)); + } + + + + public void establecerInterfaz(){ + Timestamp fechaActual = Fecha.crearFechaTimestamp(); + jdFechaIngreso.setMinSelectableDate(fechaActual); + jdFechaIngreso.setMaxSelectableDate(fechaActual); + jdFechaSalida.setMinSelectableDate(fechaActual); + jdFechaIngreso.setDate(Fecha.crearFechaTimestamp()); + jdFechaSalida.setDate(Fecha.dateTomorrow(Fecha.crearFechaTimestamp())); + } + + + + /*private void agregarHabitaciones(){ + + // jPcontenido.removeAll(); + for (int i=0;i<9;i++){ + jPhabitacionCheckIn jp = new jPhabitacionCheckIn(05,"Simple",56,02); + jPcontenido.add(jp); + + } + jPcontenido.revalidate(); + jPcontenido.repaint(); + + }*/ + + + public void cargarHabitaciones(ArrayList lista) { + jPcontenido.removeAll(); + for(int i = 0; i < lista.size(); i++) { + int num = lista.get(i).getId_habitacion(); + int prec = lista.get(i).getPrecio_hab(); + int capac = lista.get(i).getCantidadPersonas(); + String Tipo = lista.get(i).getTipo_habitacion(); + if(jComboBox1.getSelectedItem().equals(Tipo)){ + jPhabitacionCheckIn jp; + jp = new jPhabitacionCheckIn(num,Tipo,prec,capac); + jp.setjThabitacion(jTidHabitacion); + jPcontenido.add(jp); + } + } + jPcontenido.revalidate(); + jPcontenido.repaint(); + } + + + public void setearCampos() { + jTidCliente.setText("Cliente"); + jTidHabitacion.setText(""); + jTcantidadPersonas.setText("Cantidad de personas"); + jdFechaIngreso.setDate(Fecha.crearFechaTimestamp()); + jdFechaSalida.setDate(Fecha.dateTomorrow(Fecha.crearFechaTimestamp())); + } + + + public void reestablecerBorderPanel(){ + //Despinta el borde del panel de la habitacion que fue deseleccionada + for(int i = 0; i < jPcontenido.getComponentCount();i++){ + jPhabitacionCheckIn jp; + jp = (jPhabitacionCheckIn)jPcontenido.getComponent(i); + if(jp.getjButton1().getBorder() != null){ + jp.getjButton1().setBorder(null); + i = jPcontenido.getComponentCount(); + } + } + } + + public void validaNumero(char c, KeyEvent evt) { + if (!Character.isDigit(c)) { + evt.consume(); + } + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jTidCliente = new javax.swing.JTextField(); + jTcantidadPersonas = new javax.swing.JTextField(); + jScrollPane1 = new javax.swing.JScrollPane(); + jPcontenido = new javax.swing.JPanel(); + jBbuscar = new javax.swing.JButton(); + jBcancelar = new javax.swing.JButton(); + jBcheckIn = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + jLabel3 = new javax.swing.JLabel(); + jdFechaIngreso = new com.toedter.calendar.JDateChooser(); + jLabel4 = new javax.swing.JLabel(); + jdFechaSalida = new com.toedter.calendar.JDateChooser(); + jComboBox1 = new javax.swing.JComboBox(); + jLabel2 = new javax.swing.JLabel(); + jLabel5 = new javax.swing.JLabel(); + jTidHabitacion = new javax.swing.JTextField(); + jLformulario = new javax.swing.JLabel(); + + setBackground(new java.awt.Color(255, 255, 255)); + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jTidCliente.setFont(new java.awt.Font("Decker", 0, 16)); // NOI18N + jTidCliente.setForeground(new java.awt.Color(191, 191, 191)); + jTidCliente.setText("Cliente"); + jTidCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(191, 191, 191))); + jTidCliente.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTidClienteFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jTidClienteFocusLost(evt); + } + }); + jTidCliente.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyTyped(java.awt.event.KeyEvent evt) { + jTidClienteKeyTyped(evt); + } + }); + add(jTidCliente, new org.netbeans.lib.awtextra.AbsoluteConstraints(554, 265, 276, 25)); + + jTcantidadPersonas.setFont(new java.awt.Font("Decker", 0, 16)); // NOI18N + jTcantidadPersonas.setForeground(new java.awt.Color(191, 191, 191)); + jTcantidadPersonas.setText("Cantidad de personas"); + jTcantidadPersonas.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(191, 191, 191))); + jTcantidadPersonas.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTcantidadPersonasFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jTcantidadPersonasFocusLost(evt); + } + }); + jTcantidadPersonas.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyTyped(java.awt.event.KeyEvent evt) { + jTcantidadPersonasKeyTyped(evt); + } + }); + add(jTcantidadPersonas, new org.netbeans.lib.awtextra.AbsoluteConstraints(554, 310, 276, 25)); + + jScrollPane1.setBackground(new java.awt.Color(255, 255, 255)); + jScrollPane1.setBorder(null); + jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + jScrollPane1.setToolTipText(""); + jScrollPane1.setOpaque(false); + + jPcontenido.setBackground(new java.awt.Color(255, 255, 255)); + jPcontenido.setLayout(new java.awt.GridLayout(0, 1, 0, 1)); + jScrollPane1.setViewportView(jPcontenido); + jPcontenido.getAccessibleContext().setAccessibleDescription(""); + + add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(82, 119, 300, 360)); + + jBbuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/buscar-azul.png"))); // NOI18N + jBbuscar.setBorder(null); + jBbuscar.setContentAreaFilled(false); + jBbuscar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + add(jBbuscar, new org.netbeans.lib.awtextra.AbsoluteConstraints(837, 265, 24, 24)); + + jBcancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-sinSeleccion.png"))); // NOI18N + jBcancelar.setBorder(null); + jBcancelar.setBorderPainted(false); + jBcancelar.setContentAreaFilled(false); + jBcancelar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-seleccionado.png"))); // NOI18N + jBcancelar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBcancelarActionPerformed(evt); + } + }); + add(jBcancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 405, 125, 40)); + + jBcheckIn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Check-inBoton.png"))); // NOI18N + jBcheckIn.setBorder(null); + jBcheckIn.setContentAreaFilled(false); + jBcheckIn.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Check-in-seleccionado.png"))); // NOI18N + add(jBcheckIn, new org.netbeans.lib.awtextra.AbsoluteConstraints(706, 405, 125, 40)); + + jLabel1.setBackground(new java.awt.Color(112, 112, 112)); + jLabel1.setFont(new java.awt.Font("Decker", 1, 12)); // NOI18N + jLabel1.setForeground(new java.awt.Color(112, 112, 112)); + jLabel1.setText("Número Tipo Precio Capacidad"); + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(123, 89, -1, -1)); + + jLabel3.setFont(new java.awt.Font("Decker", 0, 16)); // NOI18N + jLabel3.setForeground(new java.awt.Color(191, 191, 191)); + jLabel3.setText("Fecha ingreso:"); + add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(554, 175, 110, 23)); + + jdFechaIngreso.setBackground(new java.awt.Color(255, 255, 255)); + jdFechaIngreso.setForeground(new java.awt.Color(191, 191, 191)); + jdFechaIngreso.setFont(new java.awt.Font("Decker", 0, 11)); // NOI18N + jdFechaIngreso.setMinSelectableDate(new java.util.Date(-62135747907000L)); + jdFechaIngreso.addPropertyChangeListener(new java.beans.PropertyChangeListener() { + public void propertyChange(java.beans.PropertyChangeEvent evt) { + jdFechaIngresoPropertyChange(evt); + } + }); + add(jdFechaIngreso, new org.netbeans.lib.awtextra.AbsoluteConstraints(668, 175, 160, 25)); + + jLabel4.setFont(new java.awt.Font("Decker", 0, 16)); // NOI18N + jLabel4.setForeground(new java.awt.Color(191, 191, 191)); + jLabel4.setText("Fecha Salida:"); + add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(554, 220, 110, 23)); + + jdFechaSalida.setBackground(new java.awt.Color(255, 255, 255)); + jdFechaSalida.setForeground(new java.awt.Color(191, 191, 191)); + jdFechaSalida.addPropertyChangeListener(new java.beans.PropertyChangeListener() { + public void propertyChange(java.beans.PropertyChangeEvent evt) { + jdFechaSalidaPropertyChange(evt); + } + }); + add(jdFechaSalida, new org.netbeans.lib.awtextra.AbsoluteConstraints(668, 220, 160, 25)); + + jComboBox1.setFont(new java.awt.Font("Decker", 0, 13)); // NOI18N + jComboBox1.setForeground(new java.awt.Color(204, 204, 204)); + jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SIMPLE", "DOBLE", "MATRIMONIAL", "SUITES" })); + jComboBox1.setBorder(null); + jComboBox1.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(java.awt.event.ItemEvent evt) { + jComboBox1ItemStateChanged(evt); + } + }); + jComboBox1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jComboBox1ActionPerformed(evt); + } + }); + add(jComboBox1, new org.netbeans.lib.awtextra.AbsoluteConstraints(238, 37, 122, 20)); + + jLabel2.setFont(new java.awt.Font("Decker", 0, 13)); // NOI18N + jLabel2.setForeground(new java.awt.Color(165, 165, 165)); + jLabel2.setText("Habitaciones :"); + add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(143, 37, -1, -1)); + + jLabel5.setFont(new java.awt.Font("Corbel", 1, 14)); // NOI18N + jLabel5.setForeground(new java.awt.Color(191, 191, 191)); + jLabel5.setText("NUMERO DE HABITACIÓN"); + add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(554, 355, 180, 25)); + + jTidHabitacion.setEditable(false); + jTidHabitacion.setBackground(new java.awt.Color(204, 204, 204)); + jTidHabitacion.setFont(new java.awt.Font("DialogInput", 1, 14)); // NOI18N + add(jTidHabitacion, new org.netbeans.lib.awtextra.AbsoluteConstraints(750, 355, 80, 25)); + + jLformulario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/MarcoCheckin.png"))); // NOI18N + add(jLformulario, new org.netbeans.lib.awtextra.AbsoluteConstraints(401, 85, 575, 397)); + }// //GEN-END:initComponents + + private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jComboBox1ActionPerformed + + private void jdFechaIngresoPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jdFechaIngresoPropertyChange + if(jdFechaIngreso.getDate() != null){ + + + } + }//GEN-LAST:event_jdFechaIngresoPropertyChange + + private void jdFechaSalidaPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jdFechaSalidaPropertyChange + if(jdFechaIngreso.getDate() != null && jdFechaSalida.getDate() != null){ + + Timestamp fi = Fecha.formatearFechaIngreso(jdFechaIngreso.getDate()); + Timestamp fs = Fecha.formatearFechaSalida(jdFechaSalida.getDate()); + cargarHabitaciones(ControllerReserva. + loadListRooms(fi,fs,"save",0)); + jTidHabitacion.setText(""); + } + }//GEN-LAST:event_jdFechaSalidaPropertyChange + + private void jComboBox1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jComboBox1ItemStateChanged + + Timestamp fi = Fecha.formatearFechaIngreso(jdFechaIngreso.getDate()); + Timestamp fs = Fecha.formatearFechaSalida(jdFechaSalida.getDate()); + cargarHabitaciones(ControllerReserva. + loadListRooms(fi,fs,"save",0)); + jTidHabitacion.setText(""); + + }//GEN-LAST:event_jComboBox1ItemStateChanged + + private void jTidClienteFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTidClienteFocusGained + jTidCliente.setText(""); + }//GEN-LAST:event_jTidClienteFocusGained + + private void jTcantidadPersonasFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcantidadPersonasFocusGained + jTcantidadPersonas.setText(""); + }//GEN-LAST:event_jTcantidadPersonasFocusGained + + private void jTcantidadPersonasFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcantidadPersonasFocusLost + if(jTcantidadPersonas.getText().equals("")){ + jTcantidadPersonas.setText("Cantidad de personas"); + } + }//GEN-LAST:event_jTcantidadPersonasFocusLost + + private void jTidClienteFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTidClienteFocusLost + if(jTidCliente.getText().equals("")){ + jTidCliente.setText("Cliente"); + } + }//GEN-LAST:event_jTidClienteFocusLost + + private void jBcancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcancelarActionPerformed + setearCampos(); + reestablecerBorderPanel(); + }//GEN-LAST:event_jBcancelarActionPerformed + + private void jTidClienteKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTidClienteKeyTyped + validaNumero(evt.getKeyChar(), evt); + }//GEN-LAST:event_jTidClienteKeyTyped + + private void jTcantidadPersonasKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTcantidadPersonasKeyTyped + validaNumero(evt.getKeyChar(), evt); + }//GEN-LAST:event_jTcantidadPersonasKeyTyped + + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBbuscar; + private javax.swing.JButton jBcancelar; + private javax.swing.JButton jBcheckIn; + private javax.swing.JComboBox jComboBox1; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLformulario; + private javax.swing.JPanel jPcontenido; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JTextField jTcantidadPersonas; + private javax.swing.JTextField jTidCliente; + private javax.swing.JTextField jTidHabitacion; + private com.toedter.calendar.JDateChooser jdFechaIngreso; + private com.toedter.calendar.JDateChooser jdFechaSalida; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/ClienteListaGUI.form b/HotelAdmin/src/Vistas/Jpanel/ClienteListaGUI.form index 34da0a7..a32097c 100644 --- a/HotelAdmin/src/Vistas/Jpanel/ClienteListaGUI.form +++ b/HotelAdmin/src/Vistas/Jpanel/ClienteListaGUI.form @@ -14,48 +14,37 @@ - + - + - - - - - - - - - + + - - - - + - + - + + + - - - - + @@ -76,22 +65,32 @@ - + - - + + + + + + + + + + + + - + - + @@ -104,7 +103,7 @@ - + diff --git a/HotelAdmin/src/Vistas/Jpanel/ClienteListaGUI.java b/HotelAdmin/src/Vistas/Jpanel/ClienteListaGUI.java index 2252688..5408088 100644 --- a/HotelAdmin/src/Vistas/Jpanel/ClienteListaGUI.java +++ b/HotelAdmin/src/Vistas/Jpanel/ClienteListaGUI.java @@ -6,20 +6,29 @@ package Vistas.Jpanel; import java.util.ArrayList; +import Controladores.ControladorCliente; +import Modelo.Cliente; +import Vistas.Jframe.Clientes; +import javax.swing.JOptionPane; /** * * @author nicol */ public class ClienteListaGUI extends javax.swing.JPanel { - private ArrayList clientes; + + ControladorCliente controladorCliente = new ControladorCliente(); + private ArrayList clientes; + Clientes panel_prin; + /** * Creates new form ClienteListaGUI */ - public ClienteListaGUI() { + public ClienteListaGUI(Clientes c) { + this.panel_prin = c; clientes = new ArrayList<>(); initComponents(); - CargarLista(); + CargarLista(0); } /** @@ -31,76 +40,102 @@ public ClienteListaGUI() { // //GEN-BEGIN:initComponents private void initComponents() { - jTbuscador = new javax.swing.JTextField(); - jScrollPane2 = new javax.swing.JScrollPane(); + jLabel2 = new javax.swing.JLabel(); + jScrollPane3 = new javax.swing.JScrollPane(); jPmensajes = new javax.swing.JPanel(); - jLabel1 = new javax.swing.JLabel(); + jTbuscador = new javax.swing.JTextField(); jBbuscar = new javax.swing.JButton(); setOpaque(false); setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - jTbuscador.setFont(new java.awt.Font("Decker", 0, 12)); // NOI18N - jTbuscador.setForeground(new java.awt.Color(204, 204, 204)); - jTbuscador.setText("Buscador..."); - jTbuscador.setBorder(null); - jTbuscador.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jTbuscadorActionPerformed(evt); - } - }); - add(jTbuscador, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 20, 360, 20)); + jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ContornoHabitacion.png"))); // NOI18N + add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(148, 84, -1, -1)); - jScrollPane2.setToolTipText(""); - jScrollPane2.setHorizontalScrollBar(null); - jScrollPane2.setMaximumSize(new java.awt.Dimension(706, 374)); + jScrollPane3.setBorder(null); + jScrollPane3.setHorizontalScrollBar(null); jPmensajes.setBackground(new java.awt.Color(255, 255, 255)); jPmensajes.setLayout(new java.awt.GridLayout(0, 3, 0, 1)); - jScrollPane2.setViewportView(jPmensajes); + jScrollPane3.setViewportView(jPmensajes); - add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, 730, 400)); + add(jScrollPane3, new org.netbeans.lib.awtextra.AbsoluteConstraints(156, 90, 710, 340)); - jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Buscador.png"))); // NOI18N - add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 10, -1, -1)); + jTbuscador.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jTbuscador.setForeground(new java.awt.Color(191, 191, 191)); + jTbuscador.setText("Buscar cliente por ID"); + jTbuscador.setBorder(null); + jTbuscador.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTbuscadorActionPerformed(evt); + } + }); + add(jTbuscador, new org.netbeans.lib.awtextra.AbsoluteConstraints(118, 47, 174, 19)); - jBbuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/lupa.png"))); // NOI18N + jBbuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/buscar-azul.png"))); // NOI18N jBbuscar.setBorder(null); jBbuscar.setBorderPainted(false); jBbuscar.setContentAreaFilled(false); jBbuscar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - add(jBbuscar, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 20, 40, 30)); + add(jBbuscar, new org.netbeans.lib.awtextra.AbsoluteConstraints(79, 44, 24, 24)); }// //GEN-END:initComponents private void jTbuscadorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTbuscadorActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jTbuscadorActionPerformed - public void CargarLista(){ - - //TODA LOS CLIENTES SON AGREGADAS AL JPANEL - //EN DONDE SE MUESTRA LOS DATOS PRINCIPALES DE LOS CLIENTES - - //AÑADE CADA CLIENTE A UNA LISTA - for(int i=0;i<100;i++){ - jPcliente jp = new jPcliente(12435643,1234567,"Laura","Aragon.2020@hotmail.com"); - clientes.add(jp); - - } - - //LA LISTA ES CARGADA EN UN JPANEL - for(int i=0;i listaClientes = new ArrayList<>(); + listaClientes = ControladorCliente.listClients(0); + + for (int i = 0; i < listaClientes.size(); i++) { + int cedula = listaClientes.get(i).getID(); + + String telefono = listaClientes.get(i).getTelefono(); + + String nombre = listaClientes.get(i).getNombre() + " " + + listaClientes.get(i).getApellido(); + String correo = listaClientes.get(i).getCorreo(); + jPcliente jp = new jPcliente(listaClientes.get(i), panel_prin); + if (id == 0) { + clientes.add(jp); + } else { + if (id == cedula) { + cleanLista(); + clientes.add(jp); + break; + } else { + cleanLista(); + jPmensajes.add( + new jPmensaje("Tu búsqueda no tuvo resultados!")); + } + } + + } + + //LA LISTA ES CARGADA EN UN JPANEL + for (int i = 0; i < clientes.size(); i++) { + jPmensajes.add(clientes.get(i)); + jPmensajes.revalidate(); + jPmensajes.repaint(); + } } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jBbuscar; - private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; private javax.swing.JPanel jPmensajes; - private javax.swing.JScrollPane jScrollPane2; + private javax.swing.JScrollPane jScrollPane3; private javax.swing.JTextField jTbuscador; // End of variables declaration//GEN-END:variables } diff --git a/HotelAdmin/src/Vistas/Jpanel/ClientesAgregarModificarGUI.form b/HotelAdmin/src/Vistas/Jpanel/ClientesAgregarModificarGUI.form index e0ffb9a..65c2e0f 100644 --- a/HotelAdmin/src/Vistas/Jpanel/ClientesAgregarModificarGUI.form +++ b/HotelAdmin/src/Vistas/Jpanel/ClientesAgregarModificarGUI.form @@ -14,7 +14,7 @@ - + @@ -24,7 +24,7 @@ - + @@ -32,7 +32,7 @@ - + @@ -40,7 +40,7 @@ - + @@ -59,15 +59,12 @@ - + - - - @@ -82,17 +79,17 @@
+ + + - +
- - - @@ -107,23 +104,24 @@
+ + + - +
- + - - - + @@ -132,17 +130,19 @@ + + + + + - + - - - @@ -157,17 +157,18 @@
+ + + + - + - - - @@ -182,17 +183,18 @@ + + + + - + - + - - - @@ -207,16 +209,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -224,7 +341,7 @@ - + diff --git a/HotelAdmin/src/Vistas/Jpanel/ClientesAgregarModificarGUI.java b/HotelAdmin/src/Vistas/Jpanel/ClientesAgregarModificarGUI.java index 309b244..367abc9 100644 --- a/HotelAdmin/src/Vistas/Jpanel/ClientesAgregarModificarGUI.java +++ b/HotelAdmin/src/Vistas/Jpanel/ClientesAgregarModificarGUI.java @@ -5,17 +5,229 @@ */ package Vistas.Jpanel; +import Controladores.ControladorCliente; +import Modelo.Cliente; +import Modelo.ClientDAO; +import Vistas.Jframe.ClienteRecepcionista; +import Vistas.Jframe.Clientes; +import java.awt.Color; +import java.awt.event.KeyEvent; +import java.util.ArrayList; +import javax.swing.JOptionPane; +import javax.swing.JTextField; + /** * * @author nicol */ public class ClientesAgregarModificarGUI extends javax.swing.JPanel { + ClientDAO clientDAO = new ClientDAO(); + ControladorCliente Controladorcliente = new ControladorCliente(); + ClienteRecepcionista panel_prin; + Clientes panel_admin; + String validar_panel; + + public String getValidar_panel() { + return validar_panel; + } + + public void setValidar_panel(String value) { + this.validar_panel = value; + } + /** * Creates new form ClientesAgregarModificarGUI */ public ClientesAgregarModificarGUI() { + + initComponents(); + + } + + public ClientesAgregarModificarGUI(ClienteRecepcionista cr) { + this.panel_prin = cr; + initComponents(); + + } + + public ClientesAgregarModificarGUI(Clientes cli) { + this.panel_admin = cli; initComponents(); + + } + + public void llenarValores(Cliente cliente) { + + String Cedula = String.valueOf(cliente.getID()); + jTCedula.setText(Cedula); + jTnombre.setText(cliente.getNombre()); + jTapellido.setText(cliente.getApellido()); + jTcorreo.setText(cliente.getCorreo()); + jTtelefono.setText(cliente.getTelefono()); + jTdireccion.setText(cliente.getDireccion()); + } + + public Cliente getData() { + int cedula, telefono; + String nombre, apellido, correo, direccion; + + // Se extrae la info de los campos y se guardan en una var(gClient) que cambiará de valor cada vez + // que se oprima "Guardar", luego en añadir se enviará toda esta info a la BD + Cliente gClient = new Cliente(); + //Extraer el nombre y apellido de jTnombre + String[] names = jTnombre.getText().split(" "); + gClient.setNombre(names[0]); + if (names.length > 1) { + gClient.setApellido(names[1]); + } else { + apellido = ""; + } + + gClient.setID(Integer.parseInt(jTCedula.getText().trim())); + gClient.setApellido(jTapellido.getText().trim()); + gClient.setCorreo(jTcorreo.getText().trim()); + gClient.setDireccion(jTdireccion.getText().trim()); + gClient.setTelefono(jTtelefono.getText().trim()); + + return gClient; + + } + + public boolean idFound(Integer id) { + ArrayList listadoCli = new ArrayList<>(); + listadoCli = Controladorcliente.listClients(0); + boolean found = false; + + for (int i = 0; i < listadoCli.size(); i++) { + if (id == listadoCli.get(i).getID()) { + found = true; + } + } + + return found; + + } + + public void saveData() { + try { + Cliente cliente = getData(); + if (idFound(cliente.getID())) { + if (verifyData(cliente)) { + clientDAO.modifyClient(cliente); + JOptionPane.showMessageDialog(null, "Cliente modificado!"); + } + } else { + if (verifyData(cliente)) { + clientDAO.addClient(cliente); + JOptionPane.showMessageDialog(null, "Cliente agregado!"); + } + } + } catch (Exception e) { + } + } + + public boolean verifyData(Cliente gClient) { + int cedula, telefono; + String nombre, apellido, correo, direccion; + String regexEmail = "^[\\w!#$%&'*+/=?`{|}~^-]+(?:\\.[\\w!#$%&'*+/=?`{|" + + "}~^-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$"; + correo = ""; + try { + cedula = gClient.getID(); + try { + telefono = Integer.parseInt(gClient.getTelefono()); + } catch (Exception e) { + // TODO :: Add the report of an invalid field on a notification + telefono = 999101999; + System.out.println("Error // Phone:" + e.toString()); + }; + + nombre = gClient.getNombre(); + apellido = gClient.getApellido(); + try { + if (gClient.getCorreo().matches(regexEmail)) { + correo = gClient.getCorreo(); + } + + } catch (Exception e) { + } + direccion = gClient.getDireccion(); + + } catch (Exception e) { + System.out.println("Error: " + e.toString()); + return false; + } + + return true; + } + + public void limpiarCampos() { + jTCedula.setText(""); + jTnombre.setText(""); + jTapellido.setText(""); + jTcorreo.setText(""); + jTtelefono.setText(""); + jTdireccion.setText(""); + } + + public int validarCampos() { + int rtdo = 1; + + if (jTCedula.getText().equals("") || jTCedula.getText().equals("***")) { + + rtdo = 0; + mostrarCamposVacios(jTCedula); + + } + if (jTcorreo.getText().equals("") || jTcorreo.getText().equals("***")) { + rtdo = 0; + + mostrarCamposVacios(jTcorreo); + } + if (jTnombre.getText().equals("") || jTnombre.getText().equals("***")) { + rtdo = 0; + + mostrarCamposVacios(jTnombre); + } + if (jTtelefono.getText().equals("") || jTtelefono.getText().equals("***")) { + rtdo = 0; + + mostrarCamposVacios(jTtelefono); + } + if (jTapellido.getText().equals("") || jTapellido.getText().equals("***")) { + rtdo = 0; + + mostrarCamposVacios(jTapellido); + } + if (jTdireccion.getText().equals("") || jTdireccion.getText().equals("***")) { + rtdo = 0; + + mostrarCamposVacios(jTdireccion); + } + if(jTCedula.getText().length()>10){ + JOptionPane.showMessageDialog(null, + "La identificación no debe de tener mas de 10 caracateres."); + rtdo = 0; + } + + return rtdo; + } + + public void mostrarCamposVacios(JTextField jt) { + jt.setForeground(Color.black); + jt.setText("***"); + } + + public void validaNumero(char c, KeyEvent evt) { + if (!Character.isDigit(c)) { + evt.consume(); + } + } + + public void setearFormato(JTextField t) { + t.setForeground(new Color(153, 153, 153)); + t.setText(""); } /** @@ -31,26 +243,33 @@ private void initComponents() { jBcancelar = new javax.swing.JButton(); jTdireccion = new javax.swing.JTextField(); jTnombre = new javax.swing.JTextField(); - jTcedula2 = new javax.swing.JTextField(); + jTCedula = new javax.swing.JTextField(); jTcorreo = new javax.swing.JTextField(); jTtelefono = new javax.swing.JTextField(); - jTcedula5 = new javax.swing.JTextField(); + jTapellido = new javax.swing.JTextField(); + jLabel1 = new javax.swing.JLabel(); + jLcedula = new javax.swing.JLabel(); + jLnombre = new javax.swing.JLabel(); + jLapellido = new javax.swing.JLabel(); + jLdirección = new javax.swing.JLabel(); + jLtelefono = new javax.swing.JLabel(); + jLtcorreo = new javax.swing.JLabel(); jLfondo = new javax.swing.JLabel(); setOpaque(false); setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - jBguardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar-blanco.png"))); // NOI18N + jBguardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar-SinSele.png"))); // NOI18N jBguardar.setBorder(null); jBguardar.setBorderPainted(false); jBguardar.setContentAreaFilled(false); - jBguardar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar-seleccionado.png"))); // NOI18N + jBguardar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/GuardarSele.png"))); // NOI18N jBguardar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBguardarActionPerformed(evt); } }); - add(jBguardar, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 400, -1, -1)); + add(jBguardar, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 371, -1, -1)); jBcancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-sinSeleccion.png"))); // NOI18N jBcancelar.setContentAreaFilled(false); @@ -60,64 +279,243 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jBcancelarActionPerformed(evt); } }); - add(jBcancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 400, 130, 50)); + add(jBcancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(362, 371, 130, 50)); - jTdireccion.setBackground(new java.awt.Color(241, 242, 246)); jTdireccion.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N jTdireccion.setForeground(new java.awt.Color(153, 153, 153)); jTdireccion.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); - add(jTdireccion, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 220, 190, 30)); + jTdireccion.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTdireccionFocusGained(evt); + } + }); + add(jTdireccion, new org.netbeans.lib.awtextra.AbsoluteConstraints(528, 310, 276, 25)); - jTnombre.setBackground(new java.awt.Color(241, 242, 246)); jTnombre.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N jTnombre.setForeground(new java.awt.Color(153, 153, 153)); jTnombre.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); - add(jTnombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 220, 190, 30)); + jTnombre.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTnombreFocusGained(evt); + } + }); + add(jTnombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 246, 276, 25)); - jTcedula2.setBackground(new java.awt.Color(241, 242, 246)); - jTcedula2.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTcedula2.setForeground(new java.awt.Color(153, 153, 153)); - jTcedula2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); - add(jTcedula2, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 150, 190, 30)); + jTCedula.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jTCedula.setForeground(new java.awt.Color(153, 153, 153)); + jTCedula.setToolTipText(""); + jTCedula.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); + jTCedula.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTCedulaFocusGained(evt); + } + }); + jTCedula.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTCedulaActionPerformed(evt); + } + }); + jTCedula.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyTyped(java.awt.event.KeyEvent evt) { + jTCedulaKeyTyped(evt); + } + }); + add(jTCedula, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 188, 276, 25)); - jTcorreo.setBackground(new java.awt.Color(241, 242, 246)); jTcorreo.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N jTcorreo.setForeground(new java.awt.Color(153, 153, 153)); jTcorreo.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); - add(jTcorreo, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 280, 190, 30)); + jTcorreo.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTcorreoFocusGained(evt); + } + }); + jTcorreo.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTcorreoActionPerformed(evt); + } + }); + add(jTcorreo, new org.netbeans.lib.awtextra.AbsoluteConstraints(528, 188, 276, 25)); - jTtelefono.setBackground(new java.awt.Color(241, 242, 246)); jTtelefono.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N jTtelefono.setForeground(new java.awt.Color(153, 153, 153)); jTtelefono.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); - add(jTtelefono, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 150, 190, 30)); + jTtelefono.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTtelefonoFocusGained(evt); + } + }); + jTtelefono.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTtelefonoActionPerformed(evt); + } + }); + add(jTtelefono, new org.netbeans.lib.awtextra.AbsoluteConstraints(528, 246, 276, 25)); + + jTapellido.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jTapellido.setForeground(new java.awt.Color(153, 153, 153)); + jTapellido.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); + jTapellido.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTapellidoFocusGained(evt); + } + }); + add(jTapellido, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 310, 276, 25)); + + jLabel1.setFont(new java.awt.Font("Decker", 0, 17)); // NOI18N + jLabel1.setForeground(new java.awt.Color(112, 112, 112)); + jLabel1.setText("Cliente"); + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 111, 85, 21)); + + jLcedula.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jLcedula.setForeground(new java.awt.Color(191, 191, 191)); + jLcedula.setText("Cédula"); + add(jLcedula, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 162, 180, 20)); - jTcedula5.setBackground(new java.awt.Color(241, 242, 246)); - jTcedula5.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTcedula5.setForeground(new java.awt.Color(153, 153, 153)); - jTcedula5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); - add(jTcedula5, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 150, 190, 30)); + jLnombre.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jLnombre.setForeground(new java.awt.Color(191, 191, 191)); + jLnombre.setText("Nombre"); + add(jLnombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 220, 180, 20)); - jLfondo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/fondo-cli.png"))); // NOI18N + jLapellido.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jLapellido.setForeground(new java.awt.Color(191, 191, 191)); + jLapellido.setText("Apellido"); + add(jLapellido, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 284, 180, 20)); + + jLdirección.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jLdirección.setForeground(new java.awt.Color(191, 191, 191)); + jLdirección.setText("Dirección"); + add(jLdirección, new org.netbeans.lib.awtextra.AbsoluteConstraints(528, 284, 180, 20)); + + jLtelefono.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jLtelefono.setForeground(new java.awt.Color(191, 191, 191)); + jLtelefono.setText("Teléfono"); + add(jLtelefono, new org.netbeans.lib.awtextra.AbsoluteConstraints(528, 220, 180, 20)); + + jLtcorreo.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jLtcorreo.setForeground(new java.awt.Color(191, 191, 191)); + jLtcorreo.setText("Correo"); + add(jLtcorreo, new org.netbeans.lib.awtextra.AbsoluteConstraints(528, 162, 180, 20)); + + jLfondo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ContornoHabitacion.png"))); // NOI18N jLfondo.setPreferredSize(new java.awt.Dimension(739, 429)); - add(jLfondo, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, -1, -1)); + add(jLfondo, new org.netbeans.lib.awtextra.AbsoluteConstraints(148, 84, 726, 354)); }// //GEN-END:initComponents private void jBguardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBguardarActionPerformed - // TODO add your handling code here: + + if (validarCampos() == 1) { + if (!idFound(getData().getID())) { + //saveData(); + ControladorCliente.addClient(getData()); + JOptionPane.showMessageDialog + (null, "Cliente agregado exitosamente"); + limpiarCampos(); + } else { + + try { + ControladorCliente.modificarCliente(getData()); + + } catch (Error error) { + JOptionPane.showMessageDialog(null, "Se ha producido un error " + + "modificando"); + } + JOptionPane.showMessageDialog(null, "Se ha modificado con " + + "éxito"); + limpiarCampos(); + } + } else { + JOptionPane.showMessageDialog(null, "Ingrese Todos los " + + "Campos Requeridos"); + } + //saveData(); // Se ejecuta, se envia la data a la BD + //jBcancelarActionPerformed(evt); + }//GEN-LAST:event_jBguardarActionPerformed + private void jBcancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcancelarActionPerformed - // TODO add your handling code here: + limpiarCampos(); }//GEN-LAST:event_jBcancelarActionPerformed + private void jTCedulaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTCedulaActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTCedulaActionPerformed + + private void jTtelefonoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTtelefonoActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTtelefonoActionPerformed + + private void jTcorreoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTcorreoActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTcorreoActionPerformed + + private void jTCedulaKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTCedulaKeyTyped + + validaNumero(evt.getKeyChar(), evt); + + }//GEN-LAST:event_jTCedulaKeyTyped + + private void jTCedulaFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTCedulaFocusGained + + if (jTCedula.getText().equalsIgnoreCase("***")) { + setearFormato(jTCedula); + } + }//GEN-LAST:event_jTCedulaFocusGained + + private void jTcorreoFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcorreoFocusGained + + if (jTcorreo.getText().equalsIgnoreCase("***")) { + setearFormato(jTcorreo); + } + + }//GEN-LAST:event_jTcorreoFocusGained + + private void jTnombreFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTnombreFocusGained + + if (jTnombre.getText().equalsIgnoreCase("***")) { + setearFormato(jTnombre); + } + + }//GEN-LAST:event_jTnombreFocusGained + + private void jTtelefonoFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTtelefonoFocusGained + + if (jTtelefono.getText().equalsIgnoreCase("***")) { + setearFormato(jTtelefono); + } + + }//GEN-LAST:event_jTtelefonoFocusGained + + private void jTapellidoFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTapellidoFocusGained + + if (jTapellido.getText().equalsIgnoreCase("***")) { + setearFormato(jTapellido); + } + }//GEN-LAST:event_jTapellidoFocusGained + + private void jTdireccionFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTdireccionFocusGained + + if (jTdireccion.getText().equalsIgnoreCase("***")) { + setearFormato(jTdireccion); + } + + }//GEN-LAST:event_jTdireccionFocusGained + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jBcancelar; private javax.swing.JButton jBguardar; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLapellido; + private javax.swing.JLabel jLcedula; + private javax.swing.JLabel jLdirección; private javax.swing.JLabel jLfondo; - private javax.swing.JTextField jTcedula2; - private javax.swing.JTextField jTcedula5; + private javax.swing.JLabel jLnombre; + private javax.swing.JLabel jLtcorreo; + private javax.swing.JLabel jLtelefono; + private javax.swing.JTextField jTCedula; + private javax.swing.JTextField jTapellido; private javax.swing.JTextField jTcorreo; private javax.swing.JTextField jTdireccion; private javax.swing.JTextField jTnombre; diff --git a/HotelAdmin/src/Vistas/Jpanel/ClientesRegistradosGUI.form b/HotelAdmin/src/Vistas/Jpanel/ClientesRegistradosGUI.form new file mode 100644 index 0000000..28ba19b --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/ClientesRegistradosGUI.form @@ -0,0 +1,121 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/ClientesRegistradosGUI.java b/HotelAdmin/src/Vistas/Jpanel/ClientesRegistradosGUI.java new file mode 100644 index 0000000..a1a3aff --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/ClientesRegistradosGUI.java @@ -0,0 +1,222 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + +import Controladores.ControladorCliente; +import Modelo.Cliente; +import Vistas.Jframe.ClienteRecepcionista; +import Vistas.Jpanel.jPmensaje; +import java.awt.event.KeyEvent; +import java.util.ArrayList; +import javax.swing.JOptionPane; + +/** + * + * @author nicol + */ +public class ClientesRegistradosGUI extends javax.swing.JPanel { + + /** + * Creates new form ClientesRegistradosGUI + */ + + ControladorCliente Controladorcliente = new ControladorCliente(); + ClienteRecepcionista panel_prin; + private ArrayList clientes; + + + public ClientesRegistradosGUI(ClienteRecepcionista cr) { + this.panel_prin = cr; + clientes = new ArrayList<>(); + initComponents(); + cargarLista(0); + } + + public void cargarLista(Integer id) { + try{ + ArrayList listadoCli = new ArrayList<>(); + listadoCli = Controladorcliente.listClients(0); + + jPcontenido.removeAll(); + for (int i = 0; i < listadoCli.size(); i++) { + jPclienteRecepcionista jpcli = new + jPclienteRecepcionista(listadoCli.get(i), panel_prin); + if(id==0 || jTbuscador.getText()==""){ + clientes.add(jpcli); + }else{ + if (id==listadoCli.get(i).getID()) { + cleanLista(); + clientes.add(jpcli); + break; + } else { + cleanLista(); + jPcontenido.add( + new jPmensaje + ("Tu búsqueda no tuvo resultados!")); + } + } + + + } + for (int i = 0; i < clientes.size(); i++) { + jPcontenido.add(clientes.get(i)); + jPcontenido.revalidate(); + jPcontenido.repaint(); + } + } + catch(Exception e){} + + } + + private void cleanLista(){ + + clientes.clear(); + jPcontenido.removeAll(); + jPcontenido.revalidate(); + jPcontenido.repaint(); + + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jTbuscador = new javax.swing.JTextField(); + jBbuscar = new javax.swing.JButton(); + jScrollPane2 = new javax.swing.JScrollPane(); + jPcontenido = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jTbuscador.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jTbuscador.setForeground(new java.awt.Color(191, 191, 191)); + jTbuscador.setText("Buscar cliente por ID"); + jTbuscador.setBorder(null); + jTbuscador.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTbuscadorFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jTbuscadorFocusLost(evt); + } + }); + jTbuscador.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jTbuscadorMouseClicked(evt); + } + }); + jTbuscador.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTbuscadorActionPerformed(evt); + } + }); + jTbuscador.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyPressed(java.awt.event.KeyEvent evt) { + jTbuscadorKeyPressed(evt); + } + public void keyTyped(java.awt.event.KeyEvent evt) { + jTbuscadorKeyTyped(evt); + } + }); + add(jTbuscador, new org.netbeans.lib.awtextra.AbsoluteConstraints(118, 47, 174, 19)); + + jBbuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/buscar-azul.png"))); // NOI18N + jBbuscar.setBorder(null); + jBbuscar.setBorderPainted(false); + jBbuscar.setContentAreaFilled(false); + jBbuscar.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + jBbuscar.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jBbuscarMouseClicked(evt); + } + }); + add(jBbuscar, new org.netbeans.lib.awtextra.AbsoluteConstraints(79, 44, 24, 24)); + + jScrollPane2.setBackground(new java.awt.Color(255, 255, 255)); + jScrollPane2.setBorder(null); + jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + jScrollPane2.setOpaque(false); + + jPcontenido.setBackground(new java.awt.Color(255, 255, 255)); + jPcontenido.setLayout(new java.awt.GridLayout(0, 1, 0, 1)); + jScrollPane2.setViewportView(jPcontenido); + + add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(127, 120, 810, 340)); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/MarcoListaCli.png"))); // NOI18N + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(113, 77, 830, 400)); + }// //GEN-END:initComponents + + private void jTbuscadorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTbuscadorActionPerformed + + }//GEN-LAST:event_jTbuscadorActionPerformed + + private void jTbuscadorFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTbuscadorFocusLost + // TODO add your handling code here + }//GEN-LAST:event_jTbuscadorFocusLost + + private void jTbuscadorFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTbuscadorFocusGained + // TODO add your handling code here: + }//GEN-LAST:event_jTbuscadorFocusGained + + private void jBbuscarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jBbuscarMouseClicked + try { + + cleanLista(); + if (jTbuscador.getText().isEmpty()) { + cargarLista(0); + } + if (jTbuscador.getText().matches("[0-9]*")) { + cargarLista(Integer.parseInt(jTbuscador.getText())); + } else { + cleanLista(); + jPcontenido.add(new jPmensaje("Tu búsqueda no tuvo resultados!")); + } + + } catch (Exception e) { + } + + }//GEN-LAST:event_jBbuscarMouseClicked + + private void jTbuscadorKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTbuscadorKeyPressed + + }//GEN-LAST:event_jTbuscadorKeyPressed + + private void jTbuscadorMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTbuscadorMouseClicked + + if(jTbuscador.getText().equalsIgnoreCase("Buscar cliente por ID")){ + jTbuscador.setText(""); + } else{} + }//GEN-LAST:event_jTbuscadorMouseClicked + + private void jTbuscadorKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTbuscadorKeyTyped + int key = evt.getKeyCode(); + if(key == KeyEvent.VK_ENTER){ + if (jTbuscador.getText().isEmpty() || jTbuscador.getText() == "") { + cargarLista(0); + }else{ + cargarLista(Integer.parseInt(jTbuscador.getText())); + } + } + }//GEN-LAST:event_jTbuscadorKeyTyped + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBbuscar; + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel jPcontenido; + private javax.swing.JScrollPane jScrollPane2; + private javax.swing.JTextField jTbuscador; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/EmpleadoAgregarModificarGUI.form b/HotelAdmin/src/Vistas/Jpanel/EmpleadoAgregarModificarGUI.form index f8a52ea..49f9111 100644 --- a/HotelAdmin/src/Vistas/Jpanel/EmpleadoAgregarModificarGUI.form +++ b/HotelAdmin/src/Vistas/Jpanel/EmpleadoAgregarModificarGUI.form @@ -40,31 +40,6 @@
- - - - - - - - - - - - - - - - - - - - - - - - - @@ -266,6 +241,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/EmpleadoAgregarModificarGUI.java b/HotelAdmin/src/Vistas/Jpanel/EmpleadoAgregarModificarGUI.java index 5972697..eb76a3a 100644 --- a/HotelAdmin/src/Vistas/Jpanel/EmpleadoAgregarModificarGUI.java +++ b/HotelAdmin/src/Vistas/Jpanel/EmpleadoAgregarModificarGUI.java @@ -5,6 +5,8 @@ */ package Vistas.Jpanel; +import Modelo.Empleado; + /** * * @author nicol @@ -18,6 +20,32 @@ public EmpleadoAgregarModificarGUI() { initComponents(); } + + public void llenarValores(Empleado datos){ + + String Cedula = String.valueOf(datos.getID()); + jTcedula.setText(Cedula); + jTnombre.setText(datos.getNombre() + " " + datos.getApellido()); + jTcargo.setText(datos.getCargo()); + jTcorreo.setText(datos.getCorreo()); + jTtelefono.setText(datos.getTelefono()); + jTdireccion.setText(datos.getDireccion()); + if (datos.getEstado() == true) + { + jCestado.setSelectedItem("Activo"); + }else { + jCestado.setSelectedItem("Inactivo"); + } + + + + + + + + } + + /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always @@ -28,7 +56,6 @@ public EmpleadoAgregarModificarGUI() { private void initComponents() { jBcancelar = new javax.swing.JButton(); - jTestado = new javax.swing.JTextField(); jBguardar = new javax.swing.JButton(); jTcedula = new javax.swing.JTextField(); jTnombre = new javax.swing.JTextField(); @@ -37,6 +64,7 @@ private void initComponents() { jTcargo = new javax.swing.JTextField(); jTsalario = new javax.swing.JTextField(); jTcorreo = new javax.swing.JTextField(); + jCestado = new javax.swing.JComboBox<>(); jLfondo = new javax.swing.JLabel(); setOpaque(false); @@ -52,12 +80,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { }); add(jBcancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 400, 130, 50)); - jTestado.setBackground(new java.awt.Color(241, 242, 246)); - jTestado.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N - jTestado.setForeground(new java.awt.Color(153, 153, 153)); - jTestado.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); - add(jTestado, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 330, 190, 30)); - jBguardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar-blanco.png"))); // NOI18N jBguardar.setBorder(null); jBguardar.setBorderPainted(false); @@ -117,6 +139,11 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { }); add(jTcorreo, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 270, 190, 30)); + jCestado.setBackground(new java.awt.Color(241, 242, 246)); + jCestado.setForeground(new java.awt.Color(153, 153, 153)); + jCestado.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2" })); + add(jCestado, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 330, 190, 30)); + jLfondo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/fondo-emp.png"))); // NOI18N jLfondo.setPreferredSize(new java.awt.Dimension(739, 429)); add(jLfondo, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, -1, -1)); @@ -140,12 +167,12 @@ private void jTcorreoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jBcancelar; private javax.swing.JButton jBguardar; + private javax.swing.JComboBox jCestado; private javax.swing.JLabel jLfondo; private javax.swing.JTextField jTcargo; private javax.swing.JTextField jTcedula; private javax.swing.JTextField jTcorreo; private javax.swing.JTextField jTdireccion; - private javax.swing.JTextField jTestado; private javax.swing.JTextField jTnombre; private javax.swing.JTextField jTsalario; private javax.swing.JTextField jTtelefono; diff --git a/HotelAdmin/src/Vistas/Jpanel/EmpleadoFormulario.form b/HotelAdmin/src/Vistas/Jpanel/EmpleadoFormulario.form new file mode 100644 index 0000000..579f437 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/EmpleadoFormulario.form @@ -0,0 +1,343 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/EmpleadoFormulario.java b/HotelAdmin/src/Vistas/Jpanel/EmpleadoFormulario.java new file mode 100644 index 0000000..0c17635 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/EmpleadoFormulario.java @@ -0,0 +1,321 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + +import Controladores.ControladorEmpleado; +import Modelo.Empleado; +import Vistas.Jframe.Empleados; +import java.sql.Timestamp; +import javax.swing.JOptionPane; + +/** + * + * @author nicol + */ +public class EmpleadoFormulario extends javax.swing.JPanel { + + Empleados panel_prin; + String validar_panel; + + /** + * Creates new form EmpleadoAgregarModificarGUI + */ + public EmpleadoFormulario(Empleados s) { + + this.panel_prin = s; + initComponents(); + } + + public void setValidar(String value) + { + this.validar_panel = value; + } + + public String getValidar() + { + return validar_panel; + } + + + public void llenarValores(Empleado datos){ + + String Cedula = String.valueOf(datos.getID()); + jTcedula.setText(Cedula); + jTnombre.setText(datos.getNombre() + " " + datos.getApellido()); + jTcargo.setText(datos.getCargo()); + jTcorreo.setText(datos.getCorreo()); + jTtelefono.setText(datos.getTelefono()); + jTsalario.setText(datos.getSalario() + ""); + jTdireccion.setText(datos.getDireccion()); + jCestado.removeAllItems(); + jCestado.addItem("Activo"); + jCestado.addItem("Inactivo"); + if (datos.getEstado() == true) + { + jCestado.setSelectedIndex(0); + }else { + jCestado.setSelectedIndex(1); + } + } + + + public void limpiarCampos() + { + jTcedula.setText(""); + jTnombre.setText(""); + jTcargo.setText(""); + jTcorreo.setText(""); + jTtelefono.setText(""); + jTsalario.setText(""); + jTdireccion.setText(""); + jCestado.removeAllItems(); + jCestado.addItem("Activo"); + jCestado.addItem("Inactivo"); + } + + private Empleado registrarEmpleado() + { + int z = jCestado.getSelectedIndex(); + boolean h; + if (z == 0) + { + h = true; + } else + { + h = false; + } + + + Empleado empleado = new Empleado(); + empleado.setID(Integer.parseInt(jTcedula.getText())); + empleado.setNombre(jTnombre.getText()); + empleado.setApellido(""); + empleado.setCargo(jTcargo.getText()); + empleado.setCorreo(jTcorreo.getText()); + empleado.setTelefono(jTtelefono.getText()); + empleado.setSalario(Integer.parseInt(jTsalario.getText())); + empleado.setDireccion(jTdireccion.getText()); + empleado.setEstado(h); + Timestamp timestamp = new Timestamp(System.currentTimeMillis()); + empleado.setFechaIngreso(timestamp); + + return empleado; + } + + + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jBcancelar = new javax.swing.JButton(); + jBguardar = new javax.swing.JButton(); + jTcedula = new javax.swing.JTextField(); + jTnombre = new javax.swing.JTextField(); + jTtelefono = new javax.swing.JTextField(); + jTdireccion = new javax.swing.JTextField(); + jTapellido = new javax.swing.JTextField(); + jTcargo = new javax.swing.JTextField(); + jLabel2 = new javax.swing.JLabel(); + jLabel1 = new javax.swing.JLabel(); + jTsalario = new javax.swing.JTextField(); + jTcorreo = new javax.swing.JTextField(); + jCestado = new javax.swing.JComboBox<>(); + jLfondo = new javax.swing.JLabel(); + + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jBcancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-sinSeleccion.png"))); // NOI18N + jBcancelar.setContentAreaFilled(false); + jBcancelar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBcancelar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-seleccionado.png"))); // NOI18N + jBcancelar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBcancelarActionPerformed(evt); + } + }); + add(jBcancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(366, 405, 130, 50)); + + jBguardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar-SinSele.png"))); // NOI18N + jBguardar.setBorder(null); + jBguardar.setBorderPainted(false); + jBguardar.setContentAreaFilled(false); + jBguardar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBguardar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar-seleccionado.png"))); // NOI18N + jBguardar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBguardarActionPerformed(evt); + } + }); + add(jBguardar, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 405, -1, -1)); + + jTcedula.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jTcedula.setForeground(new java.awt.Color(153, 153, 153)); + jTcedula.setText("Cédula"); + jTcedula.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); + jTcedula.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTcedulaActionPerformed(evt); + } + }); + add(jTcedula, new org.netbeans.lib.awtextra.AbsoluteConstraints(213, 148, 276, 25)); + + jTnombre.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jTnombre.setForeground(new java.awt.Color(153, 153, 153)); + jTnombre.setText("Nombre"); + jTnombre.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); + add(jTnombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(213, 198, 276, 25)); + + jTtelefono.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jTtelefono.setForeground(new java.awt.Color(153, 153, 153)); + jTtelefono.setText("Teléfono"); + jTtelefono.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); + add(jTtelefono, new org.netbeans.lib.awtextra.AbsoluteConstraints(533, 148, 276, 25)); + + jTdireccion.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jTdireccion.setForeground(new java.awt.Color(153, 153, 153)); + jTdireccion.setText("Dirección"); + jTdireccion.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); + add(jTdireccion, new org.netbeans.lib.awtextra.AbsoluteConstraints(533, 198, 276, 25)); + + jTapellido.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jTapellido.setForeground(new java.awt.Color(153, 153, 153)); + jTapellido.setText("Apellido"); + jTapellido.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); + jTapellido.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTapellidoActionPerformed(evt); + } + }); + add(jTapellido, new org.netbeans.lib.awtextra.AbsoluteConstraints(213, 248, 276, 25)); + + jTcargo.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jTcargo.setForeground(new java.awt.Color(153, 153, 153)); + jTcargo.setText("Cargo"); + jTcargo.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); + add(jTcargo, new org.netbeans.lib.awtextra.AbsoluteConstraints(533, 248, 276, 25)); + + jLabel2.setFont(new java.awt.Font("Decker", 0, 17)); // NOI18N + jLabel2.setForeground(new java.awt.Color(112, 112, 112)); + jLabel2.setText("Empleado"); + add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(213, 94, -1, -1)); + + jLabel1.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jLabel1.setForeground(new java.awt.Color(153, 153, 153)); + jLabel1.setText("Estado"); + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(533, 302, -1, -1)); + + jTsalario.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jTsalario.setForeground(new java.awt.Color(153, 153, 153)); + jTsalario.setText("Salario"); + jTsalario.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); + jTsalario.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTsalarioActionPerformed(evt); + } + }); + add(jTsalario, new org.netbeans.lib.awtextra.AbsoluteConstraints(213, 298, 276, 25)); + + jTcorreo.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jTcorreo.setForeground(new java.awt.Color(153, 153, 153)); + jTcorreo.setText("Correo"); + jTcorreo.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); + jTcorreo.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTcorreoActionPerformed(evt); + } + }); + add(jTcorreo, new org.netbeans.lib.awtextra.AbsoluteConstraints(213, 348, 276, 25)); + + jCestado.setBackground(new java.awt.Color(241, 242, 246)); + jCestado.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jCestado.setForeground(new java.awt.Color(153, 153, 153)); + jCestado.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2" })); + add(jCestado, new org.netbeans.lib.awtextra.AbsoluteConstraints(589, 298, 220, 25)); + + jLfondo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/marcoEmpleado.png"))); // NOI18N + jLfondo.setPreferredSize(new java.awt.Dimension(739, 429)); + add(jLfondo, new org.netbeans.lib.awtextra.AbsoluteConstraints(163, 73, 695, 388)); + }// //GEN-END:initComponents + + private void jBcancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcancelarActionPerformed + + if(validar_panel == "agregar") + { + limpiarCampos(); + } else + { + panel_prin.btnModificar(); + } + + }//GEN-LAST:event_jBcancelarActionPerformed + + private void jBguardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBguardarActionPerformed + + if(validar_panel == "agregar") + { + ControladorEmpleado.grabarEmpleado(registrarEmpleado()); + JOptionPane.showMessageDialog(null, "Se ha agregado con éxito"); + + } else + { + try + { + ControladorEmpleado.modificarEmpleado(registrarEmpleado()); + + } + catch (Error error) + { + JOptionPane.showMessageDialog(null, "Se ha producido un error " + + "modificando"); + } + JOptionPane.showMessageDialog(null, "Se ha modificado con " + + "éxito"); + + } + + }//GEN-LAST:event_jBguardarActionPerformed + + private void jTcorreoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTcorreoActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTcorreoActionPerformed + + private void jTapellidoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTapellidoActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTapellidoActionPerformed + + private void jTsalarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTsalarioActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTsalarioActionPerformed + + private void jTcedulaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTcedulaActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTcedulaActionPerformed + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBcancelar; + private javax.swing.JButton jBguardar; + private javax.swing.JComboBox jCestado; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLfondo; + private javax.swing.JTextField jTapellido; + private javax.swing.JTextField jTcargo; + private javax.swing.JTextField jTcedula; + private javax.swing.JTextField jTcorreo; + private javax.swing.JTextField jTdireccion; + private javax.swing.JTextField jTnombre; + private javax.swing.JTextField jTsalario; + private javax.swing.JTextField jTtelefono; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/EmpleadoPanelListar.form b/HotelAdmin/src/Vistas/Jpanel/EmpleadoPanelListar.form new file mode 100644 index 0000000..944066e --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/EmpleadoPanelListar.form @@ -0,0 +1,111 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/EmpleadoListaGUI.java b/HotelAdmin/src/Vistas/Jpanel/EmpleadoPanelListar.java similarity index 63% rename from HotelAdmin/src/Vistas/Jpanel/EmpleadoListaGUI.java rename to HotelAdmin/src/Vistas/Jpanel/EmpleadoPanelListar.java index 296fc4f..b6a1ce7 100644 --- a/HotelAdmin/src/Vistas/Jpanel/EmpleadoListaGUI.java +++ b/HotelAdmin/src/Vistas/Jpanel/EmpleadoPanelListar.java @@ -6,17 +6,25 @@ package Vistas.Jpanel; import java.util.ArrayList; +import Controladores.ControladorEmpleado; +import Modelo.Empleado; +import Vistas.Jframe.Empleados; +import javax.swing.JOptionPane; /** * * @author nicol */ -public class EmpleadoListaGUI extends javax.swing.JPanel { +public class EmpleadoPanelListar extends javax.swing.JPanel { + + ControladorEmpleado ControladorEmp = new ControladorEmpleado(); + Empleados panel_prin; private ArrayList empleados; /** * Creates new form EmpleadoListaGUI */ - public EmpleadoListaGUI() { + public EmpleadoPanelListar(Empleados s) { + this.panel_prin = s; empleados = new ArrayList<>(); initComponents(); CargarLista(); @@ -31,45 +39,44 @@ public EmpleadoListaGUI() { // //GEN-BEGIN:initComponents private void initComponents() { - jTbuscador = new javax.swing.JTextField(); - jScrollPane2 = new javax.swing.JScrollPane(); + jScrollPane3 = new javax.swing.JScrollPane(); jPmensajes = new javax.swing.JPanel(); - jLabel1 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + jTbuscador = new javax.swing.JTextField(); jBbuscar = new javax.swing.JButton(); setOpaque(false); setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - jTbuscador.setFont(new java.awt.Font("Decker", 0, 12)); // NOI18N - jTbuscador.setForeground(new java.awt.Color(204, 204, 204)); - jTbuscador.setText("Buscador..."); + jScrollPane3.setBorder(null); + jScrollPane3.setHorizontalScrollBar(null); + + jPmensajes.setBackground(new java.awt.Color(255, 255, 255)); + jPmensajes.setLayout(new java.awt.GridLayout(0, 3, 0, 1)); + jScrollPane3.setViewportView(jPmensajes); + + add(jScrollPane3, new org.netbeans.lib.awtextra.AbsoluteConstraints(156, 90, 710, 340)); + + jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ContornoHabitacion.png"))); // NOI18N + add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(148, 84, -1, -1)); + + jTbuscador.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jTbuscador.setForeground(new java.awt.Color(191, 191, 191)); + jTbuscador.setText("Buscar empleado por ID"); jTbuscador.setBorder(null); jTbuscador.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTbuscadorActionPerformed(evt); } }); - add(jTbuscador, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 20, 360, 20)); + add(jTbuscador, new org.netbeans.lib.awtextra.AbsoluteConstraints(118, 47, 174, 19)); - jScrollPane2.setToolTipText(""); - jScrollPane2.setHorizontalScrollBar(null); - jScrollPane2.setMaximumSize(new java.awt.Dimension(706, 374)); - - jPmensajes.setBackground(new java.awt.Color(255, 255, 255)); - jPmensajes.setLayout(new java.awt.GridLayout(0, 3, 0, 1)); - jScrollPane2.setViewportView(jPmensajes); - - add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, 730, 400)); - - jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Buscador.png"))); // NOI18N - add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 10, -1, -1)); - - jBbuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/lupa.png"))); // NOI18N + jBbuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/buscar-azul.png"))); // NOI18N jBbuscar.setBorder(null); jBbuscar.setBorderPainted(false); jBbuscar.setContentAreaFilled(false); jBbuscar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - add(jBbuscar, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 20, 40, 30)); + add(jBbuscar, new org.netbeans.lib.awtextra.AbsoluteConstraints(79, 44, 24, 24)); }// //GEN-END:initComponents private void jTbuscadorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTbuscadorActionPerformed @@ -81,8 +88,13 @@ public void CargarLista(){ //TODA LOS EMPLEADOS SON AGREGADOS AL JPANEL //EN DONDE SE MUESTRA LOS DATOS PRINCIPALES DE LOS EMPLEADOS - for(int i=0;i<100;i++){ - jPempleado jp = new jPempleado(123,1234567890,"Laura","Recepcionista"); + ArrayList listadoEmp = new ArrayList<>(); + listadoEmp = ControladorEmp.listadoEmpleado(0); + + + jPmensajes.removeAll(); + for (int i=0;i
+ @@ -19,19 +20,135 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -41,15 +158,12 @@ - + - - - @@ -64,24 +178,31 @@
+ + + + - +
- + - + + + + - + @@ -89,7 +210,7 @@ - + @@ -107,9 +228,6 @@ - - - @@ -117,15 +235,12 @@ - + - - - @@ -140,9 +255,13 @@ + + + + - + @@ -160,22 +279,16 @@ - - - - + - - - @@ -190,17 +303,18 @@ + + + + - + - - - @@ -215,16 +329,20 @@ + + + + - + - + @@ -232,7 +350,7 @@ - + diff --git a/HotelAdmin/src/Vistas/Jpanel/HabitacionAgregarModificarGUI.java b/HotelAdmin/src/Vistas/Jpanel/HabitacionAgregarModificarGUI.java index b4bbd32..696db43 100644 --- a/HotelAdmin/src/Vistas/Jpanel/HabitacionAgregarModificarGUI.java +++ b/HotelAdmin/src/Vistas/Jpanel/HabitacionAgregarModificarGUI.java @@ -5,6 +5,17 @@ */ package Vistas.Jpanel; +import java.awt.Color; +import java.awt.event.ActionListener; +import java.awt.event.KeyEvent; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.DefaultComboBoxModel; +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JOptionPane; +import javax.swing.JTextField; + /** * * @author nicol @@ -14,10 +25,25 @@ public class HabitacionAgregarModificarGUI extends javax.swing.JPanel { /** * Creates new form HabitacionAgregarModificarGUI */ + String validador; + public HabitacionAgregarModificarGUI() { initComponents(); + cargarTipoHabitacion(); + cargarNumCamas(); + validador = "guardar"; + } + + public void setValidador(String validador) { + this.validador = validador; } + public String getValidador() { + return validador; + } + + + /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always @@ -27,6 +53,13 @@ public HabitacionAgregarModificarGUI() { // //GEN-BEGIN:initComponents private void initComponents() { + jLabel1 = new javax.swing.JLabel(); + jLidHabitacion = new javax.swing.JLabel(); + jLpiso = new javax.swing.JLabel(); + jLprecio = new javax.swing.JLabel(); + jLtipo = new javax.swing.JLabel(); + jLcapacidadPer = new javax.swing.JLabel(); + jLnumCamas = new javax.swing.JLabel(); jBcancelar = new javax.swing.JButton(); jTprecio = new javax.swing.JTextField(); jBguardar = new javax.swing.JButton(); @@ -38,77 +71,150 @@ private void initComponents() { jLfondo = new javax.swing.JLabel(); setBackground(new java.awt.Color(241, 242, 246)); + setOpaque(false); setPreferredSize(new java.awt.Dimension(739, 429)); setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + jLabel1.setFont(new java.awt.Font("Decker", 0, 17)); // NOI18N + jLabel1.setForeground(new java.awt.Color(112, 112, 112)); + jLabel1.setText("Habitación"); + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 111, 85, 21)); + + jLidHabitacion.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jLidHabitacion.setForeground(new java.awt.Color(191, 191, 191)); + jLidHabitacion.setText("Número de habitación"); + add(jLidHabitacion, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 162, 180, 20)); + + jLpiso.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jLpiso.setForeground(new java.awt.Color(191, 191, 191)); + jLpiso.setText("Piso"); + add(jLpiso, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 220, 180, 20)); + + jLprecio.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jLprecio.setForeground(new java.awt.Color(191, 191, 191)); + jLprecio.setText("Precio"); + add(jLprecio, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 284, 180, 20)); + + jLtipo.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jLtipo.setForeground(new java.awt.Color(191, 191, 191)); + jLtipo.setText("Tipo de habitación"); + add(jLtipo, new org.netbeans.lib.awtextra.AbsoluteConstraints(528, 162, 180, 20)); + + jLcapacidadPer.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jLcapacidadPer.setForeground(new java.awt.Color(191, 191, 191)); + jLcapacidadPer.setText("Capacidad de personas"); + add(jLcapacidadPer, new org.netbeans.lib.awtextra.AbsoluteConstraints(528, 220, 180, 20)); + + jLnumCamas.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jLnumCamas.setForeground(new java.awt.Color(191, 191, 191)); + jLnumCamas.setText("Número de camas"); + add(jLnumCamas, new org.netbeans.lib.awtextra.AbsoluteConstraints(528, 284, 180, 20)); + jBcancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-sinSeleccion.png"))); // NOI18N jBcancelar.setContentAreaFilled(false); + jBcancelar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBcancelar.setInheritsPopupMenu(true); jBcancelar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-seleccionado.png"))); // NOI18N jBcancelar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBcancelarActionPerformed(evt); } }); - add(jBcancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 400, 130, 50)); + add(jBcancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(362, 371, 130, 50)); - jTprecio.setBackground(new java.awt.Color(241, 242, 246)); jTprecio.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N jTprecio.setForeground(new java.awt.Color(153, 153, 153)); jTprecio.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); - add(jTprecio, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 330, 190, 30)); + jTprecio.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTprecioFocusGained(evt); + } + }); + jTprecio.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyTyped(java.awt.event.KeyEvent evt) { + jTprecioKeyTyped(evt); + } + }); + add(jTprecio, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 310, 276, 25)); - jBguardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar-blanco.png"))); // NOI18N + jBguardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar-SinSele.png"))); // NOI18N jBguardar.setBorder(null); - jBguardar.setBorderPainted(false); jBguardar.setContentAreaFilled(false); - jBguardar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar-seleccionado.png"))); // NOI18N + jBguardar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBguardar.setInheritsPopupMenu(true); + jBguardar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/GuardarSele.png"))); // NOI18N jBguardar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBguardarActionPerformed(evt); } }); - add(jBguardar, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 400, -1, -1)); + add(jBguardar, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 371, -1, -1)); jCnumeroCamas.setBackground(new java.awt.Color(241, 242, 246)); jCnumeroCamas.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N jCnumeroCamas.setForeground(new java.awt.Color(153, 153, 153)); - jCnumeroCamas.setBorder(null); jCnumeroCamas.setOpaque(false); jCnumeroCamas.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCnumeroCamasActionPerformed(evt); } }); - add(jCnumeroCamas, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 330, 190, 30)); + add(jCnumeroCamas, new org.netbeans.lib.awtextra.AbsoluteConstraints(528, 310, 276, 25)); - jTnumeroHabitacion.setBackground(new java.awt.Color(241, 242, 246)); jTnumeroHabitacion.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N jTnumeroHabitacion.setForeground(new java.awt.Color(153, 153, 153)); jTnumeroHabitacion.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); - add(jTnumeroHabitacion, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 160, 190, 30)); + jTnumeroHabitacion.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTnumeroHabitacionFocusGained(evt); + } + }); + jTnumeroHabitacion.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyTyped(java.awt.event.KeyEvent evt) { + jTnumeroHabitacionKeyTyped(evt); + } + }); + add(jTnumeroHabitacion, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 188, 276, 25)); jCtipoHabi.setBackground(new java.awt.Color(241, 242, 246)); jCtipoHabi.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N jCtipoHabi.setForeground(new java.awt.Color(153, 153, 153)); - jCtipoHabi.setBorder(null); jCtipoHabi.setOpaque(false); - add(jCtipoHabi, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 160, 190, 30)); + add(jCtipoHabi, new org.netbeans.lib.awtextra.AbsoluteConstraints(528, 188, 276, 25)); - jTcapacidad.setBackground(new java.awt.Color(241, 242, 246)); jTcapacidad.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N jTcapacidad.setForeground(new java.awt.Color(153, 153, 153)); jTcapacidad.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); - add(jTcapacidad, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 240, 190, 30)); + jTcapacidad.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTcapacidadFocusGained(evt); + } + }); + jTcapacidad.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyTyped(java.awt.event.KeyEvent evt) { + jTcapacidadKeyTyped(evt); + } + }); + add(jTcapacidad, new org.netbeans.lib.awtextra.AbsoluteConstraints(528, 246, 276, 25)); - jTpiso.setBackground(new java.awt.Color(241, 242, 246)); jTpiso.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N jTpiso.setForeground(new java.awt.Color(153, 153, 153)); jTpiso.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); - add(jTpiso, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 240, 190, 30)); + jTpiso.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTpisoFocusGained(evt); + } + }); + jTpiso.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyTyped(java.awt.event.KeyEvent evt) { + jTpisoKeyTyped(evt); + } + }); + add(jTpiso, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 246, 276, 25)); - jLfondo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Grupo 24.png"))); // NOI18N + jLfondo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ContornoHabitacion.png"))); // NOI18N jLfondo.setPreferredSize(new java.awt.Dimension(739, 429)); - add(jLfondo, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, -1, -1)); + add(jLfondo, new org.netbeans.lib.awtextra.AbsoluteConstraints(148, 84, 726, 354)); }// //GEN-END:initComponents private void jCnumeroCamasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCnumeroCamasActionPerformed @@ -125,6 +231,62 @@ private void jBcancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI }//GEN-LAST:event_jBcancelarActionPerformed + private void jTpisoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTpisoKeyTyped + // TODO add your handling code here: + validaNumero(evt.getKeyChar(), evt); + + }//GEN-LAST:event_jTpisoKeyTyped + + private void jTpisoFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTpisoFocusGained + // TODO add your handling code here: + if (jTpiso.getText().equalsIgnoreCase("****")){ + jTpiso.setForeground(Color.BLACK); + jTpiso.setText(""); + } + + }//GEN-LAST:event_jTpisoFocusGained + + private void jTcapacidadFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcapacidadFocusGained + // TODO add your handling code here: + if (jTcapacidad.getText().equalsIgnoreCase("****")){ + jTcapacidad.setForeground(Color.BLACK); + jTcapacidad.setText(""); + } + }//GEN-LAST:event_jTcapacidadFocusGained + + private void jTprecioFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTprecioFocusGained + // TODO add your handling code here: + if (jTprecio.getText().equalsIgnoreCase("****")){ + jTprecio.setForeground(Color.BLACK); + jTprecio.setText(""); + } + + }//GEN-LAST:event_jTprecioFocusGained + + private void jTnumeroHabitacionFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTnumeroHabitacionFocusGained + // TODO add your handling code here: + if (jTnumeroHabitacion.getText().equalsIgnoreCase("****")){ + jTnumeroHabitacion.setForeground(Color.BLACK); + jTnumeroHabitacion.setText(""); + } + + }//GEN-LAST:event_jTnumeroHabitacionFocusGained + + private void jTnumeroHabitacionKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTnumeroHabitacionKeyTyped + // TODO add your handling code here: + validaNumero(evt.getKeyChar(), evt); + }//GEN-LAST:event_jTnumeroHabitacionKeyTyped + + private void jTcapacidadKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTcapacidadKeyTyped + // TODO add your handling code here: + validaNumero(evt.getKeyChar(), evt); + }//GEN-LAST:event_jTcapacidadKeyTyped + + private void jTprecioKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTprecioKeyTyped + // TODO add your handling code here: + validaNumero(evt.getKeyChar(), evt); + }//GEN-LAST:event_jTprecioKeyTyped + /*public void Modificar(int numero_){ //SE BUSCA EN LA BASE DE DATOS EL NÚMERO DE HABITACIÓN Y SE COMPARA @@ -136,17 +298,179 @@ private void jBcancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI // } //} + + + public JButton getjBcancelar() { + return jBcancelar; + } + + public JButton getjBguardar() { + return jBguardar; + } + + public JTextField getjTcapacidad() { + return jTcapacidad; + } + + public JTextField getjTnumeroHabitacion() { + return jTnumeroHabitacion; + } + public JTextField getjTpiso() { + return jTpiso; + } + + public JTextField getjTprecio() { + return jTprecio; + } + + public JComboBox getjCnumeroCamas() { + return jCnumeroCamas; + } + + public JComboBox getjCtipoHabi() { + return jCtipoHabi; + } + + + //Mensajes + public void gestionMensajes(String mensaje, String titulo, int icono) { + JOptionPane.showMessageDialog(this, mensaje, titulo, icono); + } + + //Metodo para cargar Tipo de habitacion a un combo box + public void cargarTipoHabitacion (){ + DefaultComboBoxModel model; + + String [] arregloTipoHabitacion = new String [5]; + + arregloTipoHabitacion[0] = "Seleccione..."; + arregloTipoHabitacion[1] = "SIMPLE"; + arregloTipoHabitacion[2] = "DOBLE"; + arregloTipoHabitacion[3] = "MATRIMONIAL"; + arregloTipoHabitacion[4] = "SUITES"; + + model = new DefaultComboBoxModel (arregloTipoHabitacion); + + jCtipoHabi.setModel(model); + } + + //Método para cargar número de camas en un combobox + public void cargarNumCamas (){ + DefaultComboBoxModel model; + + String [] arregloNumeroCamas = new String [4]; + + arregloNumeroCamas[0] = "Seleccione..."; + arregloNumeroCamas[1] = "1"; + arregloNumeroCamas[2] = "2"; + arregloNumeroCamas[3] = "3"; + + model = new DefaultComboBoxModel (arregloNumeroCamas); + + jCnumeroCamas.setModel(model); + } + + public int validarCampos() { + int rtdo = 1; + + if (jTnumeroHabitacion.getText().equals("") || jTnumeroHabitacion.getText().equals("****")) { + + rtdo = 0; + mostrarCamposVacios(jTnumeroHabitacion); + + } + if (jTpiso.getText().equals("") || jTpiso.getText().equals("****")) { + + rtdo = 0; + mostrarCamposVacios(jTpiso); + + } + if (jTcapacidad.getText().equals("") || jTcapacidad.getText().equals("****")) { + + rtdo = 0; + mostrarCamposVacios(jTcapacidad); + } + if(jTprecio.getText().equals("") || jTprecio.getText().equals("****")) { + + rtdo = 0; + mostrarCamposVacios(jTprecio); + } + if(jCnumeroCamas.getSelectedItem().equals("Seleccione...") ){ + + rtdo= 0; + //animacionCombobox(); + } + + if(jCtipoHabi.getSelectedItem().equals("Seleccione...")){ + + rtdo= 0; + //animacionCombobox(); + } + + return rtdo; + } + + /*public void animacionCombobox(){ + + Thread obj = new Thread(); + + try { + jCtipoHabi.setBackground(Color.blue); + obj.sleep(3000); + jCtipoHabi.setBackground(Color.white); + obj.sleep(3000); + jCtipoHabi.setBackground(Color.blue); + obj.sleep(3000); + jCtipoHabi.setBackground(Color.yellow); + } catch (InterruptedException ex) { + Logger.getLogger(HabitacionAgregarModificarGUI.class.getName()).log(Level.SEVERE, null, ex); + } + }*/ + + + + public void mostrarCamposVacios(JTextField jt) { + jt.setForeground(Color.blue); + jt.setText("****"); + + } + + public void validaNumero(char c, KeyEvent evt) { + if (!Character.isDigit(c)) { + evt.consume(); + } + } + + public void setearCampos() { + + jTnumeroHabitacion.setText(""); + jTpiso.setText(""); + jTcapacidad.setText(""); + jTprecio.setText(""); + jCtipoHabi.setSelectedIndex(0); + jCnumeroCamas.setSelectedIndex(0); + + } + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jBcancelar; private javax.swing.JButton jBguardar; private javax.swing.JComboBox jCnumeroCamas; private javax.swing.JComboBox jCtipoHabi; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLcapacidadPer; private javax.swing.JLabel jLfondo; + private javax.swing.JLabel jLidHabitacion; + private javax.swing.JLabel jLnumCamas; + private javax.swing.JLabel jLpiso; + private javax.swing.JLabel jLprecio; + private javax.swing.JLabel jLtipo; private javax.swing.JTextField jTcapacidad; private javax.swing.JTextField jTnumeroHabitacion; private javax.swing.JTextField jTpiso; private javax.swing.JTextField jTprecio; // End of variables declaration//GEN-END:variables } + diff --git a/HotelAdmin/src/Vistas/Jpanel/HabitacionListaGUI.form b/HotelAdmin/src/Vistas/Jpanel/HabitacionListaGUI.form index b2fcf23..743093e 100644 --- a/HotelAdmin/src/Vistas/Jpanel/HabitacionListaGUI.form +++ b/HotelAdmin/src/Vistas/Jpanel/HabitacionListaGUI.form @@ -14,7 +14,7 @@ - + @@ -24,12 +24,12 @@ - + - + - + @@ -39,19 +39,22 @@ - + + + + - + @@ -72,22 +75,10 @@ - - - - - - - - - - - - - + @@ -100,7 +91,19 @@ - + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/HabitacionListaGUI.java b/HotelAdmin/src/Vistas/Jpanel/HabitacionListaGUI.java index b775d8d..0f9a1e6 100644 --- a/HotelAdmin/src/Vistas/Jpanel/HabitacionListaGUI.java +++ b/HotelAdmin/src/Vistas/Jpanel/HabitacionListaGUI.java @@ -5,24 +5,38 @@ */ package Vistas.Jpanel; +import Modelo.Habitacion; +import Vistas.Jframe.Habitaciones; import java.awt.event.MouseEvent; import java.util.ArrayList; +import java.util.Set; +import javax.swing.JComboBox; import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.table.DefaultTableModel; /** * * @author nicol */ public class HabitacionListaGUI extends javax.swing.JPanel { - private ArrayList habitaciones; + + // private ArrayList jphabitaciones; + //private ArrayList hab; /** * Creates new form HabitacionEliminarGUI */ - public HabitacionListaGUI() { - habitaciones = new ArrayList<>(); + Habitaciones frame_habitaciones; + jPhabitacion jp; + + public HabitacionListaGUI(Habitaciones frame_habitaciones) { + //jphabitaciones = new ArrayList<>(); + //hab = new ArrayList<>(); + this.frame_habitaciones = frame_habitaciones; + //frame_habitaciones = new Habitaciones(); + initComponents(); - - CargarLista(); + } /** @@ -37,48 +51,154 @@ private void initComponents() { jTbuscador = new javax.swing.JTextField(); jScrollPane3 = new javax.swing.JScrollPane(); jPmensajes = new javax.swing.JPanel(); - jLabel1 = new javax.swing.JLabel(); jBbuscar = new javax.swing.JButton(); + jLabel2 = new javax.swing.JLabel(); setOpaque(false); setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - jTbuscador.setFont(new java.awt.Font("Decker", 0, 12)); // NOI18N - jTbuscador.setForeground(new java.awt.Color(204, 204, 204)); - jTbuscador.setText("Buscador..."); + jTbuscador.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jTbuscador.setForeground(new java.awt.Color(191, 191, 191)); + jTbuscador.setText("Buscar habitación por ID"); jTbuscador.setBorder(null); jTbuscador.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTbuscadorActionPerformed(evt); } }); - add(jTbuscador, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 20, 360, 20)); + add(jTbuscador, new org.netbeans.lib.awtextra.AbsoluteConstraints(118, 47, 174, 19)); + jScrollPane3.setBorder(null); jScrollPane3.setHorizontalScrollBar(null); jPmensajes.setBackground(new java.awt.Color(255, 255, 255)); jPmensajes.setLayout(new java.awt.GridLayout(0, 3, 0, 1)); jScrollPane3.setViewportView(jPmensajes); - add(jScrollPane3, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, 730, 400)); + add(jScrollPane3, new org.netbeans.lib.awtextra.AbsoluteConstraints(156, 90, 710, 340)); - jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Buscador.png"))); // NOI18N - add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 10, -1, -1)); - - jBbuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/lupa.png"))); // NOI18N + jBbuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/buscar-azul.png"))); // NOI18N jBbuscar.setBorder(null); jBbuscar.setBorderPainted(false); jBbuscar.setContentAreaFilled(false); jBbuscar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - add(jBbuscar, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 20, 40, 30)); + add(jBbuscar, new org.netbeans.lib.awtextra.AbsoluteConstraints(79, 44, 24, 24)); + + jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ContornoHabitacion.png"))); // NOI18N + add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(148, 84, -1, -1)); }// //GEN-END:initComponents - - public void CargarLista(){ + + public void CargarLista + (ArrayList lista_habitacion, String validador) { + + //TODA LAS HABITACIONES SON AGREGADAS AL JPANEL + //EN DONDE SE MUESTRA LOS DATOS PRINCIPALES DE LAS HABITACIONES + jPmensajes.removeAll(); + ArrayList jphabitaciones = new ArrayList<>(); + + for (int i = 0; i < lista_habitacion.size(); i++) { + + int id_hab = lista_habitacion.get(i).getId_habitacion(); + String tipo_hab = lista_habitacion.get(i).getTipo_habitacion(); + String piso = lista_habitacion.get(i).getPiso(); + int cantidad_personas = lista_habitacion.get(i) + .getCantidadPersonas(); + int precio_hab = lista_habitacion.get(i).getPrecio_hab(); + boolean estado_hab = lista_habitacion.get(i).getEstado(); + + jp = new jPhabitacion(id_hab, tipo_hab, piso, cantidad_personas, + precio_hab, estado_hab, frame_habitaciones); + jp.setValidadorPanel(validador); + jphabitaciones.add(jp); + + } + + for (int i = 0; i < jphabitaciones.size(); i++) { + jPmensajes.add(jphabitaciones.get(i)); + + jPmensajes.revalidate(); + jPmensajes.repaint(); + } + } + + public JPanel getjPmensajes() { + return jPmensajes; + } + + public void llenarFormulario(Habitacion habitacion) { + + int id_hab = habitacion.getId_habitacion(); + String tipo_hab = habitacion.getTipo_habitacion(); //combobox + String piso = habitacion.getPiso(); + int cantidad_personas = habitacion.getCantidadPersonas(); + int precio_hab = habitacion.getPrecio_hab(); + int num_camas = habitacion.getNum_camas(); //combobox + + frame_habitaciones.getPanelAgregar().getjTnumeroHabitacion() + .setText("" + id_hab); + frame_habitaciones.getPanelAgregar().getjTpiso().setText("" + piso); + frame_habitaciones.getPanelAgregar().getjTcapacidad() + .setText("" + cantidad_personas); + frame_habitaciones.getPanelAgregar().getjTprecio() + .setText("" + precio_hab); + + + establecerCombobox(frame_habitaciones.getPanelAgregar().getjCtipoHabi(), + tipo_hab); + establecerCombobox(frame_habitaciones.getPanelAgregar() + .getjCnumeroCamas(), + "" + num_camas); + + } + + public void establecerCombobox(JComboBox Jcombo, String valor) { + + // JOptionPane.showMessageDialog + //(null, Jcombo.getItemAt(4) + " algo* " + valor + "****"); + + for (int i = 0; i < Jcombo.getItemCount(); i++) { + + if (valor.equalsIgnoreCase(Jcombo.getItemAt(i).toString())) { + Jcombo.setSelectedIndex(i); + } + } + + } + + /* public void cargarPeliculasTabla(ArrayList listadoPelicula) { + DefaultTableModel defaultCombo; + defaultCombo = (DefaultTableModel) jTable2.getModel(); + limpiarListadoTabla(); + for (int i = 0; i < listadoPelicula.size(); i++) { + defaultCombo.addRow(new Object[]{ + listadoPelicula.get(i).getPeliculaId(), + listadoPelicula.get(i).getTitulo(), + listadoPelicula.get(i).getAnhoLanzamiento(), + listadoPelicula.get(i).getLongitud() + " Minutos", + + }); + } + + //Muestra en el campo de texto de la Interfaz el ID cliente Consecutivo + valor = Integer.parseInt("" + defaultCombo.getValueAt + //(defaultCombo.getRowCount() - 1, 0)) + 1; + jTid_peli.setText("" + valor); + jTid_peli.setEnabled(false); + + }*/ + /* //Cargar datos a la base + public void CargarListaBase(ArrayList){ //TODA LAS HABITACIONES SON AGREGADAS AL JPANEL //EN DONDE SE MUESTRA LOS DATOS PRINCIPALES DE LAS HABITACIONES - for(int i=0;i<100;i++){ + for(int i=0;i<5;i++){ + + hab.get(i).getId_habitacion(); + hab.get(i).getTipo_habitacion(); + hab.get(i).getPrecio_hab(); + hab.get(i).getEstado(); + jPhabitacion jp = new jPhabitacion(02,3.56,"Matrimonial",true); habitaciones.add(jp); @@ -88,19 +208,16 @@ public void CargarLista(){ jPmensajes.revalidate(); jPmensajes.repaint();} - } - - - + }*/ + private void jTbuscadorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTbuscadorActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jTbuscadorActionPerformed - // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jBbuscar; - private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; private javax.swing.JPanel jPmensajes; private javax.swing.JScrollPane jScrollPane3; private javax.swing.JTextField jTbuscador; diff --git a/HotelAdmin/src/Vistas/Jpanel/ListaHospedajesGUI.form b/HotelAdmin/src/Vistas/Jpanel/ListaHospedajesGUI.form new file mode 100644 index 0000000..7057996 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/ListaHospedajesGUI.form @@ -0,0 +1,119 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/ListaHospedajesGUI.java b/HotelAdmin/src/Vistas/Jpanel/ListaHospedajesGUI.java new file mode 100644 index 0000000..0d4b474 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/ListaHospedajesGUI.java @@ -0,0 +1,219 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + +import Controladores.ControladorHospedaje; +import Modelo.Hospedaje; +import java.awt.event.KeyEvent; +import java.util.ArrayList; +import javax.swing.JOptionPane; + +/** + * + * @author nicol + */ +public class ListaHospedajesGUI extends javax.swing.JPanel { + + /** + * Creates new form ListaHospedajesGUI + */ + private boolean first; + private ArrayListh; + private int nElementos; + public ListaHospedajesGUI() { + initComponents(); + ControladorHospedaje ch = new ControladorHospedaje(); + h = ch.listadoHospedaje(1); + first = false; + AgregarLista(); + first = true; + } + + + public void AgregarLista(){ + nElementos=0; + jPcontenido.removeAll(); + for (int i=0;i10){ + JOptionPane.showMessageDialog(null, + "La identificación no debe de tener mas de 10 caracateres."); + jTextField1.setText(""); + }else { + int cliente = Integer.parseInt(jTextField1.getText().trim()); + nElementos=0; + jPcontenido.removeAll(); + for (int i=0;i//GEN-BEGIN:initComponents + private void initComponents() { + + jTextField1 = new javax.swing.JTextField(); + jButton1 = new javax.swing.JButton(); + jScrollPane2 = new javax.swing.JScrollPane(); + jPcontenido = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jTextField1.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jTextField1.setForeground(new java.awt.Color(191, 191, 191)); + jTextField1.setText("Buscar hospedaje por ID de cliente"); + jTextField1.setBorder(null); + jTextField1.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTextField1FocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jTextField1FocusLost(evt); + } + }); + jTextField1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextField1ActionPerformed(evt); + } + }); + jTextField1.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyPressed(java.awt.event.KeyEvent evt) { + jTextField1KeyPressed(evt); + } + public void keyTyped(java.awt.event.KeyEvent evt) { + jTextField1KeyTyped(evt); + } + }); + add(jTextField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(118, 47, -1, -1)); + + jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/buscar-azul.png"))); // NOI18N + jButton1.setBorder(null); + jButton1.setContentAreaFilled(false); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(79, 44, 24, 24)); + + jScrollPane2.setBackground(new java.awt.Color(255, 255, 255)); + jScrollPane2.setBorder(null); + jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + jScrollPane2.setOpaque(false); + + jPcontenido.setBackground(new java.awt.Color(255, 255, 255)); + jPcontenido.setLayout(new java.awt.GridLayout(0, 1, 0, 1)); + jScrollPane2.setViewportView(jPcontenido); + + add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(157, 125, 725, 340)); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/MarcoListaHospe.png"))); // NOI18N + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(143, 77, 750, 400)); + }// //GEN-END:initComponents + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + if(verificarCampoBuscar()){ + filtrarBusqueda(); + } + }//GEN-LAST:event_jButton1ActionPerformed + + private void jTextField1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusGained + jTextField1.setText(""); + }//GEN-LAST:event_jTextField1FocusGained + + private void jTextField1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusLost + if(jTextField1.getText().equalsIgnoreCase("")){ + jTextField1.setText("Buscar hospedaje por ID de cliente"); + } + }//GEN-LAST:event_jTextField1FocusLost + + private void jTextField1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField1KeyPressed + int key = evt.getKeyCode(); + if(key == KeyEvent.VK_ENTER){ + if(verificarCampoBuscar()){ + filtrarBusqueda(); + } + } + }//GEN-LAST:event_jTextField1KeyPressed + + private void jTextField1KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField1KeyTyped + char car = evt.getKeyChar(); + if((car<'0' || car>'9')) evt.consume(); + }//GEN-LAST:event_jTextField1KeyTyped + + private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextField1ActionPerformed + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel jPcontenido; + private javax.swing.JScrollPane jScrollPane2; + private javax.swing.JTextField jTextField1; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/ListaReservasGUI.form b/HotelAdmin/src/Vistas/Jpanel/ListaReservasGUI.form new file mode 100644 index 0000000..129e5f1 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/ListaReservasGUI.form @@ -0,0 +1,114 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/ListaReservasGUI.java b/HotelAdmin/src/Vistas/Jpanel/ListaReservasGUI.java new file mode 100644 index 0000000..2f26de0 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/ListaReservasGUI.java @@ -0,0 +1,156 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + +import Controladores.ControllerReserva; +import Modelo.Reserva; +import Vistas.Jframe.Reservas; +import java.util.ArrayList; + +/** + * + * @author nicol + */ +public class ListaReservasGUI extends javax.swing.JPanel { + + /** + * Creates new form listaReservas + */ + + Reservas frame_reservas; + public ListaReservasGUI(Reservas frame_reservas) { + this.frame_reservas = frame_reservas; + initComponents(); + ArrayList listaReservas; + listaReservas = ControllerReserva.listarReservas(); + cargarListaReservas(listaReservas); + } + + + + public void establecerLayout(ArrayList listaReservas){ + //Establece un gridlayout al panel que contiene las reservas, + //deacuerdo al numero de reservas que exista + jPcontenido.removeAll(); + int row; + if(listaReservas.size() < 6) + { + row = 6; + }else{ + row = listaReservas.size(); + } + jPcontenido.setLayout(new java.awt.GridLayout(row,1,1,1)); + } + + + + public void cargarListaReservas(ArrayList listaReservas){ + establecerLayout(listaReservas); + + for (int i = 0; i < listaReservas.size(); i++) { + int num_res = listaReservas.get(i).getNumero_reserva(); + int id_cli = listaReservas.get(i).getNumCliente(); + int id_hab = listaReservas.get(i).getNum_Habitacion(); + int cant_per = listaReservas.get(i).getNum_Personas(); + String fech_in = listaReservas.get(i).getFecha_ingreso().toString(); + String fech_out = listaReservas.get(i).getFecha_salida().toString(); + jPreservasHospedaje jp = new jPreservasHospedaje + (num_res,id_cli,id_hab,cant_per,fech_in,fech_out); + jp.setFrame_reservas(frame_reservas); + jPcontenido.add(jp); + } + jPcontenido.revalidate(); + jPcontenido.repaint(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jScrollPane2 = new javax.swing.JScrollPane(); + jPcontenido = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + jTextField1 = new javax.swing.JTextField(); + jButton1 = new javax.swing.JButton(); + + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jScrollPane2.setBackground(new java.awt.Color(255, 255, 255)); + jScrollPane2.setBorder(null); + jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + jScrollPane2.setOpaque(false); + + jPcontenido.setBackground(new java.awt.Color(255, 255, 255)); + jPcontenido.setAutoscrolls(true); + jPcontenido.setLayout(new java.awt.GridLayout(1, 0)); + jScrollPane2.setViewportView(jPcontenido); + + add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(87, 140, 860, 330)); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Marco.png"))); // NOI18N + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(77, 90, 880, 400)); + + jTextField1.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jTextField1.setForeground(new java.awt.Color(191, 191, 191)); + jTextField1.setText("Buscar reserva por ID de cliente"); + jTextField1.setBorder(null); + jTextField1.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTextField1FocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jTextField1FocusLost(evt); + } + }); + jTextField1.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyReleased(java.awt.event.KeyEvent evt) { + jTextField1KeyReleased(evt); + } + }); + add(jTextField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(118, 47, -1, -1)); + + jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/buscar-azul.png"))); // NOI18N + jButton1.setBorder(null); + jButton1.setContentAreaFilled(false); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(79, 44, 24, 24)); + }// //GEN-END:initComponents + + private void jTextField1KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField1KeyReleased + ArrayList listaReservas; + if(jTextField1.getText().equals("")){ + listaReservas = ControllerReserva.listarReservas(); + cargarListaReservas(listaReservas); + }else{ + int numReserva = Integer.parseInt(jTextField1.getText()); + listaReservas = ControllerReserva.listarReservasLike(numReserva); + cargarListaReservas(listaReservas); + } + }//GEN-LAST:event_jTextField1KeyReleased + + private void jTextField1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusGained + jTextField1.setText(""); + }//GEN-LAST:event_jTextField1FocusGained + + private void jTextField1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusLost + jTextField1.setText("Buscar reserva por ID de cliente"); + }//GEN-LAST:event_jTextField1FocusLost + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel jPcontenido; + private javax.swing.JScrollPane jScrollPane2; + private javax.swing.JTextField jTextField1; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/RealizarReservaGUI.form b/HotelAdmin/src/Vistas/Jpanel/RealizarReservaGUI.form new file mode 100644 index 0000000..a7e7046 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/RealizarReservaGUI.form @@ -0,0 +1,382 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/RealizarReservaGUI.java b/HotelAdmin/src/Vistas/Jpanel/RealizarReservaGUI.java new file mode 100644 index 0000000..f1f6015 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/RealizarReservaGUI.java @@ -0,0 +1,553 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + +import Controladores.ControllerReserva; +import Modelo.Habitacion; +import Modelo.Reserva; +import Servicios.Fecha; +import Vistas.Jframe.Reservas; +import java.awt.Color; +import java.awt.event.KeyEvent; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Date; +import javax.swing.JOptionPane; +import javax.swing.JTextField; + +/** + * + * @author nicol + */ +public class RealizarReservaGUI extends javax.swing.JPanel { + + /** + * Creates new form RealizarReservaGUI + */ + + int numeroReserva; + String validaOperacion; + Reservas frame_reservas; + + + public RealizarReservaGUI(Reservas frame_reservas){ + initComponents(); + this.frame_reservas = frame_reservas; + validaOperacion = "guardar"; + numeroReserva = ControllerReserva.extraerId() + 1; + + } + + + public void establecerInterfaz(){ + Timestamp fechaActual = Fecha.crearFechaTimestamp(); + jTidHabitacion.setEditable(false); + jdFechaIngreso.setMinSelectableDate(fechaActual); + jdFechaSalida.setMinSelectableDate(Fecha.dateTomorrow(fechaActual)); + jdFechaIngreso.setDate(Fecha.crearFechaTimestamp()); + jdFechaSalida.setDate(Fecha.dateTomorrow(Fecha.crearFechaTimestamp())); + } + + + public void resetListRooms(){ + Timestamp fi = Fecha.formatearFechaIngreso(jdFechaIngreso.getDate()); + Timestamp fs = Fecha.formatearFechaSalida(jdFechaSalida.getDate()); + if(validaOperacion.equals("guardar")){ + cargarHabitaciones(ControllerReserva. + loadListRooms(fi,fs,"save",0)); + }else + if(validaOperacion.equals("actualizar")){ + cargarHabitaciones(ControllerReserva. + loadListRooms(fi,fs,"update",numeroReserva)); + + } + } + + public void setearCampos() { + jTidCliente.setText("Cliente"); + jTidHabitacion.setText("Número de habitación"); + jTnumPersonas.setText("Cantidad de personas"); + jdFechaIngreso.setDate(Fecha.crearFechaTimestamp()); + jdFechaSalida.setDate(Fecha.dateTomorrow(Fecha.crearFechaTimestamp())); + } + + //Retorna la informacion de la reserva ingresada en los campos de la + //interfaz + private Reserva infoRerserva() { + Reserva reserva = new Reserva(); + int idHab = Integer.parseInt(jTidHabitacion.getText()); + int idCli = Integer.parseInt(jTidCliente.getText()); + int numPer = Integer.parseInt(jTnumPersonas.getText()); + Timestamp fi = Fecha.formatearFechaIngreso(jdFechaIngreso.getDate()); + Timestamp fs = Fecha.formatearFechaSalida(jdFechaSalida.getDate()); + Timestamp fecha = Fecha.crearFechaTimestamp(); + reserva.setNumero_reserva(numeroReserva); + reserva.setNum_Habitacion(idHab); + reserva.setNumCliente(idCli); + reserva.setNum_Empleado(ControllerReserva.getNumEmpleado()); + reserva.setFecha_reserva(fecha); + reserva.setFecha_ingreso(fi); + reserva.setFecha_salida(fs); + reserva.setNum_Personas(numPer); + return reserva; + } + + + + public int validarCampos() { + int rtdo = 1; + + if (jTidCliente.getText().equals("") + ||jTidCliente.getText().equalsIgnoreCase("Cliente")){ + + rtdo = 0; + JOptionPane.showMessageDialog(this,"Hay Campos Vacios"); + + }else + if (jTidHabitacion.getText().equals("") + || jTidHabitacion.getText().equalsIgnoreCase("Número de habitación")) + { + rtdo = 0; + JOptionPane.showMessageDialog(this,"Seleccione una Habitación"); + }else + if(jTnumPersonas.getText().equals("") || + jTnumPersonas.getText().equalsIgnoreCase("Cantidad de personas")) + { + rtdo = 0; + JOptionPane.showMessageDialog(this,"Hay Campos Vacios"); + + }else + if(jdFechaIngreso.getDate() == null || jdFechaSalida.getDate() == null){ + JOptionPane.showMessageDialog(this,"Hay campos de fecha vacios"); + rtdo = 0; + + }else{ + if(jdFechaIngreso.getDate().getTime() >= jdFechaSalida.getDate().getTime()){ + JOptionPane.showMessageDialog(this,"No coinciden las fechas"); + rtdo = 0; + } + } + + return rtdo; + } + + public void mostrarCamposVacios(JTextField jt) { + jt.setForeground(Color.blue); + jt.setText("****"); + } + + + + public void reestablecerBorderPanel(){ + //Despinta el borde del panel de la habitacion que fue deseleccionada + for(int i = 0; i < jPcontenido.getComponentCount();i++){ + jPhabitacionCheckIn jp; + jp = (jPhabitacionCheckIn)jPcontenido.getComponent(i); + if(jp.getjButton1().getBorder() != null){ + jp.getjButton1().setBorder(null); + i = jPcontenido.getComponentCount(); + } + } + } + + public void setBorderPanel(int numHab){ + for(int i = 0; i < jPcontenido.getComponentCount();i++){ + jPhabitacionCheckIn jp; + jp = (jPhabitacionCheckIn)jPcontenido.getComponent(i); + + System.out.println(numHab+" jdjd" + jp.numeroHabitacion); + if(jp.numeroHabitacion == numHab){ + + jp.pintarPanel(); + i = jPcontenido.getComponentCount(); + + } + } + } + + + public void llenarFormulario(Reserva reserva){ + cambiarCombobobox(reserva.getNum_Habitacion()); + jdFechaIngreso.setDate(reserva.getFecha_ingreso()); + jdFechaSalida.setDate(reserva.getFecha_salida()); + jTidCliente.setText(""+reserva.getNumCliente()); + jTidHabitacion.setText(""+reserva.getNum_Habitacion()); + jTnumPersonas.setText(""+reserva.getNum_Personas()); + numeroReserva = reserva.getNumero_reserva(); + validaOperacion = "actualizar"; + jLabel5.setText("Actualización"); + resetListRooms(); + setBorderPanel(reserva.getNum_Habitacion()); + } + + + public void cambiarCombobobox(int numHab){ + /*ESTABLECE EL COMBOBOBOX EN LA CATEGORIA DE LA HABITACION SELECCIONADA + PARA ACTUALIZAR*/ + if(numHab > 100 && numHab < 200 ){ + jComboBox1.setSelectedIndex(0); + }else + if(numHab > 200 && numHab < 300 ){ + jComboBox1.setSelectedIndex(1); + }else + if(numHab > 300 && numHab < 400){ + jComboBox1.setSelectedIndex(2); + }else + if(numHab > 400 && numHab < 500 ){ + jComboBox1.setSelectedIndex(3); + } + } + + + public void cargarHabitaciones(ArrayList lista) { + jPcontenido.removeAll(); + for(int i = 0; i < lista.size(); i++) { + int num = lista.get(i).getId_habitacion(); + int prec = lista.get(i).getPrecio_hab(); + int capac = lista.get(i).getCantidadPersonas(); + String Tipo = lista.get(i).getTipo_habitacion(); + if(jComboBox1.getSelectedItem().equals(Tipo)){ + jPhabitacionCheckIn jp; + jp = new jPhabitacionCheckIn(num,Tipo,prec,capac); + jp.setjThabitacion(jTidHabitacion); + jPcontenido.add(jp); + } + } + jPcontenido.revalidate(); + jPcontenido.repaint(); + } + + + public void validaNumero(char c, KeyEvent evt) { + if (!Character.isDigit(c)) { + evt.consume(); + } + } + + + public void saveORupdate(){ + if(validarCampos()==1){ + if(validaOperacion.equals("guardar")){ + if(ControllerReserva.registrarReserva(infoRerserva()) == 1){ + setearCampos(); + reestablecerBorderPanel(); + numeroReserva += 1; + }else{ + JOptionPane.showMessageDialog(null,"No existe el cliente " + + "en la base de datos"); + } + }else + if(validaOperacion.equals("actualizar")){ + if(ControllerReserva.actualizarReserva(infoRerserva()) == 1){ + frame_reservas.panelListarReserva(); + //validaOperacion = "guardar"; + } + } + } + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jLabel5 = new javax.swing.JLabel(); + jLabel4 = new javax.swing.JLabel(); + jLabel3 = new javax.swing.JLabel(); + jdFechaSalida = new com.toedter.calendar.JDateChooser(); + jdFechaIngreso = new com.toedter.calendar.JDateChooser(); + jBcancelar = new javax.swing.JButton(); + jBguardar = new javax.swing.JButton(); + jTidCliente = new javax.swing.JTextField(); + jTnumPersonas = new javax.swing.JTextField(); + jTidHabitacion = new javax.swing.JTextField(); + jScrollPane1 = new javax.swing.JScrollPane(); + jPcontenido = new javax.swing.JPanel(); + jBbuscar = new javax.swing.JButton(); + jLformulario = new javax.swing.JLabel(); + jLabel1 = new javax.swing.JLabel(); + jComboBox1 = new javax.swing.JComboBox(); + jLabel2 = new javax.swing.JLabel(); + + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jLabel5.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N + jLabel5.setForeground(new java.awt.Color(0, 153, 255)); + add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 60, 180, 20)); + + jLabel4.setFont(new java.awt.Font("Decker", 0, 16)); // NOI18N + jLabel4.setForeground(new java.awt.Color(191, 191, 191)); + jLabel4.setText("Fecha Salida:"); + add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(554, 345, 110, 23)); + + jLabel3.setFont(new java.awt.Font("Decker", 0, 16)); // NOI18N + jLabel3.setForeground(new java.awt.Color(191, 191, 191)); + jLabel3.setText("Fecha ingreso:"); + add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(554, 300, 110, 23)); + + jdFechaSalida.setBackground(new java.awt.Color(255, 255, 255)); + jdFechaSalida.setForeground(new java.awt.Color(191, 191, 191)); + jdFechaSalida.addPropertyChangeListener(new java.beans.PropertyChangeListener() { + public void propertyChange(java.beans.PropertyChangeEvent evt) { + jdFechaSalidaPropertyChange(evt); + } + }); + add(jdFechaSalida, new org.netbeans.lib.awtextra.AbsoluteConstraints(668, 345, 160, 25)); + jdFechaSalida.getAccessibleContext().setAccessibleName(""); + + jdFechaIngreso.setBackground(new java.awt.Color(255, 255, 255)); + jdFechaIngreso.setForeground(new java.awt.Color(191, 191, 191)); + jdFechaIngreso.setFont(new java.awt.Font("Decker", 0, 11)); // NOI18N + jdFechaIngreso.setMinSelectableDate(new java.util.Date(-62135747907000L)); + jdFechaIngreso.addPropertyChangeListener(new java.beans.PropertyChangeListener() { + public void propertyChange(java.beans.PropertyChangeEvent evt) { + jdFechaIngresoPropertyChange(evt); + } + }); + add(jdFechaIngreso, new org.netbeans.lib.awtextra.AbsoluteConstraints(668, 301, 160, 25)); + + jBcancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-sinSeleccion.png"))); // NOI18N + jBcancelar.setBorder(null); + jBcancelar.setBorderPainted(false); + jBcancelar.setContentAreaFilled(false); + jBcancelar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBcancelar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-seleccionado.png"))); // NOI18N + jBcancelar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBcancelarActionPerformed(evt); + } + }); + add(jBcancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 395, 125, 40)); + + jBguardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar-SinSele.png"))); // NOI18N + jBguardar.setBorder(null); + jBguardar.setContentAreaFilled(false); + jBguardar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBguardar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/GuardarSele.png"))); // NOI18N + jBguardar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBguardarActionPerformed(evt); + } + }); + add(jBguardar, new org.netbeans.lib.awtextra.AbsoluteConstraints(706, 395, 125, 40)); + + jTidCliente.setFont(new java.awt.Font("Decker", 0, 16)); // NOI18N + jTidCliente.setForeground(new java.awt.Color(191, 191, 191)); + jTidCliente.setText("Cliente"); + jTidCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(191, 191, 191))); + jTidCliente.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTidClienteFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jTidClienteFocusLost(evt); + } + }); + jTidCliente.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyTyped(java.awt.event.KeyEvent evt) { + jTidClienteKeyTyped(evt); + } + }); + add(jTidCliente, new org.netbeans.lib.awtextra.AbsoluteConstraints(554, 152, 276, 25)); + + jTnumPersonas.setFont(new java.awt.Font("Decker", 0, 16)); // NOI18N + jTnumPersonas.setForeground(new java.awt.Color(191, 191, 191)); + jTnumPersonas.setText("Cantidad de personas"); + jTnumPersonas.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(191, 191, 191))); + jTnumPersonas.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTnumPersonasFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jTnumPersonasFocusLost(evt); + } + }); + jTnumPersonas.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyTyped(java.awt.event.KeyEvent evt) { + jTnumPersonasKeyTyped(evt); + } + }); + add(jTnumPersonas, new org.netbeans.lib.awtextra.AbsoluteConstraints(554, 252, 276, 25)); + + jTidHabitacion.setFont(new java.awt.Font("Decker", 0, 16)); // NOI18N + jTidHabitacion.setForeground(new java.awt.Color(191, 191, 191)); + jTidHabitacion.setText("Número de habitación"); + jTidHabitacion.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(191, 191, 191))); + jTidHabitacion.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusLost(java.awt.event.FocusEvent evt) { + jTidHabitacionFocusLost(evt); + } + }); + jTidHabitacion.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jTidHabitacionMouseClicked(evt); + } + }); + jTidHabitacion.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyTyped(java.awt.event.KeyEvent evt) { + jTidHabitacionKeyTyped(evt); + } + }); + add(jTidHabitacion, new org.netbeans.lib.awtextra.AbsoluteConstraints(554, 203, 276, 25)); + + jScrollPane1.setBackground(new java.awt.Color(255, 255, 255)); + jScrollPane1.setBorder(null); + jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + jScrollPane1.setToolTipText(""); + jScrollPane1.setOpaque(false); + + jPcontenido.setBackground(new java.awt.Color(255, 255, 255)); + jPcontenido.setLayout(new java.awt.GridLayout(0, 1, 0, 1)); + jScrollPane1.setViewportView(jPcontenido); + + add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(82, 119, 300, 360)); + + jBbuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/buscar-azul.png"))); // NOI18N + jBbuscar.setBorder(null); + jBbuscar.setContentAreaFilled(false); + jBbuscar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + add(jBbuscar, new org.netbeans.lib.awtextra.AbsoluteConstraints(837, 153, 24, 24)); + + jLformulario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/MarcoReserva.png"))); // NOI18N + add(jLformulario, new org.netbeans.lib.awtextra.AbsoluteConstraints(401, 85, 575, 397)); + + jLabel1.setBackground(new java.awt.Color(112, 112, 112)); + jLabel1.setFont(new java.awt.Font("Decker", 1, 12)); // NOI18N + jLabel1.setForeground(new java.awt.Color(112, 112, 112)); + jLabel1.setText("Número Tipo Precio Capacidad"); + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(132, 90, 250, -1)); + + jComboBox1.setFont(new java.awt.Font("Decker", 0, 13)); // NOI18N + jComboBox1.setForeground(new java.awt.Color(204, 204, 204)); + jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SIMPLE", "DOBLE", "MATRIMONIAL", "SUITES" })); + jComboBox1.setBorder(null); + jComboBox1.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(java.awt.event.ItemEvent evt) { + jComboBox1ItemStateChanged(evt); + } + }); + add(jComboBox1, new org.netbeans.lib.awtextra.AbsoluteConstraints(238, 37, 122, 20)); + + jLabel2.setFont(new java.awt.Font("Decker", 0, 13)); // NOI18N + jLabel2.setForeground(new java.awt.Color(165, 165, 165)); + jLabel2.setText("Habitaciones :"); + add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(143, 37, -1, -1)); + }// //GEN-END:initComponents + + private void jTidClienteKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTidClienteKeyTyped + validaNumero(evt.getKeyChar(), evt); + }//GEN-LAST:event_jTidClienteKeyTyped + + private void jTnumPersonasKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTnumPersonasKeyTyped + validaNumero(evt.getKeyChar(), evt); + }//GEN-LAST:event_jTnumPersonasKeyTyped + + private void jTidClienteFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTidClienteFocusGained + if(jTidCliente.getText().equalsIgnoreCase("Cliente")){ + jTidCliente.setText(""); + } + }//GEN-LAST:event_jTidClienteFocusGained + + private void jTnumPersonasFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTnumPersonasFocusGained + if(jTnumPersonas.getText().equalsIgnoreCase("Cantidad de personas")){ + jTnumPersonas.setText(""); + } + }//GEN-LAST:event_jTnumPersonasFocusGained + + private void jTidClienteFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTidClienteFocusLost + if(jTidCliente.getText().equals("")){ + jTidCliente.setText("Cliente"); + } + }//GEN-LAST:event_jTidClienteFocusLost + + private void jTnumPersonasFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTnumPersonasFocusLost + if(jTnumPersonas.getText().equals("")){ + jTnumPersonas.setText("Cantidad de personas"); + } + }//GEN-LAST:event_jTnumPersonasFocusLost + + private void jBguardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBguardarActionPerformed + saveORupdate(); + + }//GEN-LAST:event_jBguardarActionPerformed + + private void jdFechaSalidaPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jdFechaSalidaPropertyChange + if(jdFechaIngreso.getDate() != null && jdFechaSalida.getDate() != null){ + resetListRooms(); + jTidHabitacion.setText("Número de habitación"); + } + }//GEN-LAST:event_jdFechaSalidaPropertyChange + + private void jdFechaIngresoPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jdFechaIngresoPropertyChange + if(jdFechaIngreso.getDate() != null && jdFechaSalida.getDate() != null){ + resetListRooms(); + jTidHabitacion.setText("Número de habitación"); + Date f = Fecha.dateTomorrow(jdFechaIngreso.getDate()); + jdFechaSalida.setMinSelectableDate(f); + } + }//GEN-LAST:event_jdFechaIngresoPropertyChange + + private void jBcancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcancelarActionPerformed + if(validaOperacion.equals("guardar")){ + setearCampos(); + reestablecerBorderPanel(); + }else if(validaOperacion.equals("actualizar")){ + frame_reservas.panelListarReserva(); + } + + }//GEN-LAST:event_jBcancelarActionPerformed + + private void jTidHabitacionKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTidHabitacionKeyTyped + validaNumero(evt.getKeyChar(), evt); + }//GEN-LAST:event_jTidHabitacionKeyTyped + + private void jTidHabitacionMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTidHabitacionMouseClicked + if(jTidHabitacion.getText().equalsIgnoreCase("Número de habitación")){ + JOptionPane.showMessageDialog + (null,"Seleccione una Habitacion de la lista"); + } + }//GEN-LAST:event_jTidHabitacionMouseClicked + + private void jTidHabitacionFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTidHabitacionFocusLost + if(jTidHabitacion.getText().equals("")){ + jTidHabitacion.setText("Número de Habitación"); + } + }//GEN-LAST:event_jTidHabitacionFocusLost + + private void jComboBox1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jComboBox1ItemStateChanged + resetListRooms(); + jTidHabitacion.setText("Número de habitación"); + }//GEN-LAST:event_jComboBox1ItemStateChanged + + + + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBbuscar; + private javax.swing.JButton jBcancelar; + private javax.swing.JButton jBguardar; + private javax.swing.JComboBox jComboBox1; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLformulario; + private javax.swing.JPanel jPcontenido; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JTextField jTidCliente; + private javax.swing.JTextField jTidHabitacion; + private javax.swing.JTextField jTnumPersonas; + private com.toedter.calendar.JDateChooser jdFechaIngreso; + private com.toedter.calendar.JDateChooser jdFechaSalida; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/RegistrarSalidaGUI.form b/HotelAdmin/src/Vistas/Jpanel/RegistrarSalidaGUI.form new file mode 100644 index 0000000..d5d0955 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/RegistrarSalidaGUI.form @@ -0,0 +1,270 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/RegistrarSalidaGUI.java b/HotelAdmin/src/Vistas/Jpanel/RegistrarSalidaGUI.java new file mode 100644 index 0000000..85a3fce --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/RegistrarSalidaGUI.java @@ -0,0 +1,373 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + +import java.awt.event.KeyEvent; +import java.util.ArrayList; +import javax.swing.DefaultListModel; +import javax.swing.JOptionPane; +import Controladores.ControladorCheckout; +import Controladores.ControladorHospedaje; +import Controladores.ControladorServiciosAdicionado; +import Controladores.ControllerHabitacion; +import Modelo.Checkout; +import Modelo.ServiciosAdicionado; +import java.sql.Timestamp; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; + + +/** + * + * @author nicol + */ +public class RegistrarSalidaGUI extends javax.swing.JPanel { + + private int idEmpleado; + private int idcheckout; + private ArrayList servicios; + private boolean found; + private int valorTotal; + private Timestamp fecha_de_hoy; + private int habitacion; + + /** + * Creates new form RegistrarSalidaGUI + */ + public RegistrarSalidaGUI(int ide) { + initComponents(); + this.fecha_de_hoy = new Timestamp(System.currentTimeMillis()); + this.idEmpleado = ide; + } + + + private void agregarDatosFactura(){ + ControladorCheckout cc= new ControladorCheckout(); + String id = jTbuscador.getText().trim(); + Checkout co = new Checkout(); + int idcliente; + found=false; + if(id.equalsIgnoreCase("")|| + id.equalsIgnoreCase("Buscar factura por ID de cliente")){ + JOptionPane.showMessageDialog(null, + "Debe de ingresar la identificacion de un cliente " + + "para encontrar la factura"); + vaciarCampos(); + } else if(id.length()>10){ + JOptionPane.showMessageDialog(null, + "La identificación no debe de tener mas de 10 caracateres."); + vaciarCampos(); + } + else{ + idcliente = Integer.parseInt(id); + co = cc.getCheckout(idcliente); + idcheckout = co.getIdCheckout(); + if(co.getIdCheckout()!=0){ + jLcliente.setText(co.getIdCliente()+""); + jLhabitacion.setText(co.getIdhabitacion()+""); + habitacion = co.getIdhabitacion(); + jLfechaIngreso.setText(co.getfechaIngreso()+""); + jLfechaSalida.setText(co.getfechaSalida()+""); + calcularValorTotal(co.getValorTotal()); + jLprecio.setText(valorTotal+"$"); + found = true; + }else { + JOptionPane.showMessageDialog(null, + "No se encontro ninguna factura con este ID," + + " verifique si fue ingresado correctamente"); + vaciarCampos(); + } + } + //LISTA DE SERVICIOS + if(found){ + + int n = numDias(); + int p = co.getPrecioH(); + servicios = new ArrayList(); + DefaultListModel modelo = new DefaultListModel(); + servicios.add(1+". "+"Habitacion " + co.getTipoH() + +" "+ n +" días"); + servicios.add( " \nValor por día: " + p + "$"); + servicios.add( " \nValor de estadía: " + n*p+ "$"); + adicionarServicios(); + for(int i = 0; iinfo = new ArrayList(); + info.add("C.C. empleado: "+idEmpleado+"\n"); + info.add("C.C. cliente: " + jLcliente.getText()+ "\n"); + info.add("Habitación: "+habitacion+"\n"); + info.add("Fecha de ingreso: "+jLfechaIngreso.getText()+"\n"); + info.add("Fecha de salida: "+jLfechaSalida.getText()+"\n"); + info.add("\n-------------------------------------------\n"); + info.add("Servicios consumidos:\n"); + for(int i= 0; ih = ControladorServiciosAdicionado + .listadoSH(idcheckout); + int item = 1; + String t; + for(int i = 0; is = ControladorServiciosAdicionado + .listadoSH(idcheckout); + for(int i = 0; i//GEN-BEGIN:initComponents + private void initComponents() { + + jTbuscador = new javax.swing.JTextField(); + jLcliente = new javax.swing.JLabel(); + jLhabitacion = new javax.swing.JLabel(); + jLfechaIngreso = new javax.swing.JLabel(); + jLfechaSalida = new javax.swing.JLabel(); + jLprecio = new javax.swing.JLabel(); + jCBmedioPago = new javax.swing.JComboBox<>(); + jButton1 = new javax.swing.JButton(); + jScrollPane2 = new javax.swing.JScrollPane(); + jListServicios = new javax.swing.JList<>(); + jLfactura = new javax.swing.JLabel(); + jBcancelar = new javax.swing.JButton(); + jBcheckOut = new javax.swing.JButton(); + + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jTbuscador.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jTbuscador.setForeground(new java.awt.Color(191, 191, 191)); + jTbuscador.setText("Buscar reserva por ID de cliente"); + jTbuscador.setBorder(null); + jTbuscador.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTbuscadorFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + jTbuscadorFocusLost(evt); + } + }); + jTbuscador.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyPressed(java.awt.event.KeyEvent evt) { + jTbuscadorKeyPressed(evt); + } + public void keyTyped(java.awt.event.KeyEvent evt) { + jTbuscadorKeyTyped(evt); + } + }); + add(jTbuscador, new org.netbeans.lib.awtextra.AbsoluteConstraints(118, 47, -1, -1)); + + jLcliente.setFont(new java.awt.Font("Decker", 0, 12)); // NOI18N + jLcliente.setForeground(new java.awt.Color(112, 112, 112)); + jLcliente.setText(" "); + add(jLcliente, new org.netbeans.lib.awtextra.AbsoluteConstraints(546, 205, 70, -1)); + + jLhabitacion.setFont(new java.awt.Font("Decker", 0, 12)); // NOI18N + jLhabitacion.setForeground(new java.awt.Color(112, 112, 112)); + jLhabitacion.setText(" "); + add(jLhabitacion, new org.netbeans.lib.awtextra.AbsoluteConstraints(546, 222, 110, -1)); + + jLfechaIngreso.setFont(new java.awt.Font("Decker", 0, 12)); // NOI18N + jLfechaIngreso.setForeground(new java.awt.Color(112, 112, 112)); + jLfechaIngreso.setText(" "); + add(jLfechaIngreso, new org.netbeans.lib.awtextra.AbsoluteConstraints(546, 238, 110, -1)); + + jLfechaSalida.setFont(new java.awt.Font("Decker", 0, 12)); // NOI18N + jLfechaSalida.setForeground(new java.awt.Color(112, 112, 112)); + jLfechaSalida.setText(" "); + add(jLfechaSalida, new org.netbeans.lib.awtextra.AbsoluteConstraints(546, 255, 110, -1)); + + jLprecio.setFont(new java.awt.Font("Decker", 1, 20)); // NOI18N + jLprecio.setForeground(new java.awt.Color(112, 112, 112)); + jLprecio.setText(" "); + add(jLprecio, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 148, 80, -1)); + + jCBmedioPago.setBackground(new java.awt.Color(241, 242, 246)); + jCBmedioPago.setForeground(new java.awt.Color(112, 112, 112)); + jCBmedioPago.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Credio", "Debito", "Efectivo"})); + add(jCBmedioPago, new org.netbeans.lib.awtextra.AbsoluteConstraints(546, 273, 110, 18)); + + jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/buscar-azul.png"))); // NOI18N + jButton1.setBorder(null); + jButton1.setContentAreaFilled(false); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(79, 44, 24, 24)); + + jScrollPane2.setBorder(null); + jScrollPane2.setForeground(new java.awt.Color(112, 112, 112)); + jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + jScrollPane2.setFont(new java.awt.Font("Decker", 0, 9)); // NOI18N + + jScrollPane2.setViewportView(jListServicios); + + add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 335, 320, 120)); + + jLfactura.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Factura.png"))); // NOI18N + add(jLfactura, new org.netbeans.lib.awtextra.AbsoluteConstraints(296, 88, -1, -1)); + + jBcancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-sinSeleccion.png"))); // NOI18N + jBcancelar.setContentAreaFilled(false); + jBcancelar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBcancelar.setInheritsPopupMenu(true); + jBcancelar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-seleccionado.png"))); // NOI18N + jBcancelar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBcancelarActionPerformed(evt); + } + }); + add(jBcancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 470, 130, 50)); + + jBcheckOut.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/botonCheckOutSinSele.png"))); // NOI18N + jBcheckOut.setBorder(null); + jBcheckOut.setContentAreaFilled(false); + jBcheckOut.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBcheckOut.setInheritsPopupMenu(true); + jBcheckOut.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/botonCheckOutSele.png"))); // NOI18N + jBcheckOut.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBcheckOutActionPerformed(evt); + } + }); + add(jBcheckOut, new org.netbeans.lib.awtextra.AbsoluteConstraints(506, 470, 140, -1)); + }// //GEN-END:initComponents + + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + agregarDatosFactura(); + }//GEN-LAST:event_jButton1ActionPerformed + + private void jBcancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcancelarActionPerformed + vaciarCampos(); + }//GEN-LAST:event_jBcancelarActionPerformed + + private void jBcheckOutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcheckOutActionPerformed + if(found){ + imprimirFactura(); + registrarSalida(); + found = false; + } + }//GEN-LAST:event_jBcheckOutActionPerformed + + private void jTbuscadorFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTbuscadorFocusLost + if(jTbuscador.getText().equalsIgnoreCase("")){ + jTbuscador.setText("Buscar factura por ID de cliente"); + } + }//GEN-LAST:event_jTbuscadorFocusLost + + private void jTbuscadorFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTbuscadorFocusGained + jTbuscador.setText(""); + vaciarCampos(); + }//GEN-LAST:event_jTbuscadorFocusGained + + private void jTbuscadorKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTbuscadorKeyTyped + char car = evt.getKeyChar(); + if((car<'0' || car>'9')) evt.consume(); + }//GEN-LAST:event_jTbuscadorKeyTyped + + private void jTbuscadorKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTbuscadorKeyPressed + int key = evt.getKeyCode(); + if(key == KeyEvent.VK_ENTER){ + agregarDatosFactura(); + } + }//GEN-LAST:event_jTbuscadorKeyPressed + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBcancelar; + private javax.swing.JButton jBcheckOut; + private javax.swing.JButton jButton1; + private javax.swing.JComboBox jCBmedioPago; + private javax.swing.JLabel jLcliente; + private javax.swing.JLabel jLfactura; + private javax.swing.JLabel jLfechaIngreso; + private javax.swing.JLabel jLfechaSalida; + private javax.swing.JLabel jLhabitacion; + private javax.swing.JList jListServicios; + private javax.swing.JLabel jLprecio; + private javax.swing.JScrollPane jScrollPane2; + private javax.swing.JTextField jTbuscador; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/ServiciosAgregarModificarGUI.form b/HotelAdmin/src/Vistas/Jpanel/ServiciosAgregarModificarGUI.form index f4f3f74..e41c05d 100644 --- a/HotelAdmin/src/Vistas/Jpanel/ServiciosAgregarModificarGUI.form +++ b/HotelAdmin/src/Vistas/Jpanel/ServiciosAgregarModificarGUI.form @@ -14,6 +14,7 @@ + diff --git a/HotelAdmin/src/Vistas/Jpanel/ServiciosListaGUI.form b/HotelAdmin/src/Vistas/Jpanel/ServiciosListaGUI.form index 8221ab4..aa0a98a 100644 --- a/HotelAdmin/src/Vistas/Jpanel/ServiciosListaGUI.form +++ b/HotelAdmin/src/Vistas/Jpanel/ServiciosListaGUI.form @@ -106,7 +106,7 @@ - + diff --git a/HotelAdmin/src/Vistas/Jpanel/ServiciosListaGUI.java b/HotelAdmin/src/Vistas/Jpanel/ServiciosListaGUI.java index 91b64a8..300b4a8 100644 --- a/HotelAdmin/src/Vistas/Jpanel/ServiciosListaGUI.java +++ b/HotelAdmin/src/Vistas/Jpanel/ServiciosListaGUI.java @@ -83,7 +83,8 @@ public void CargarLista(){ //EN DONDE SE MUESTRA LOS DATOS PRINCIPALES DE LOS SERVICIOS for(int i=0;i<100;i++){ - jPservicio jp = new jPservicio(956,"Comida",5443.5,5); + //jPservicio jp = new jPservicio(956,"Comida",5443.5,5); + jPservicio jp = new jPservicio(); servicios.add(jp); } diff --git a/HotelAdmin/src/Vistas/Jpanel/jPcliente.form b/HotelAdmin/src/Vistas/Jpanel/jPcliente.form index 105b4a0..e776d88 100644 --- a/HotelAdmin/src/Vistas/Jpanel/jPcliente.form +++ b/HotelAdmin/src/Vistas/Jpanel/jPcliente.form @@ -3,7 +3,7 @@
- + @@ -78,6 +78,9 @@ + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/jPcliente.java b/HotelAdmin/src/Vistas/Jpanel/jPcliente.java index 80d6dc2..274cc5b 100644 --- a/HotelAdmin/src/Vistas/Jpanel/jPcliente.java +++ b/HotelAdmin/src/Vistas/Jpanel/jPcliente.java @@ -4,28 +4,43 @@ * and open the template in the editor. */ package Vistas.Jpanel; +import Controladores.ControladorCliente; +import Modelo.Cliente; +import Vistas.Jframe.Clientes; /** * * @author nicol */ public class jPcliente extends javax.swing.JPanel { - private int cedula,telefono; - private String nombre,correo; + + private Cliente datosCliente; + private int id; + private String nombre,apellido, telefono, correo; + Clientes frame_cliente; /** * Creates new form jPcliente */ - public jPcliente(int cedula_,int telefono_,String nombre_,String correo_) { - this.cedula = cedula_; - this.telefono = telefono_; - this.nombre = nombre_; - this.correo = correo_; + public jPcliente(Cliente datosCli, Clientes cli) { + this.frame_cliente= cli; + this.datosCliente = datosCli; + this.id = datosCliente.getID(); + this.nombre = datosCliente.getNombre(); + this.apellido = datosCliente.getApellido(); + this.telefono = datosCliente.getTelefono(); + this.correo = datosCliente.getCorreo(); initComponents(); - jLcedula.setText(String.valueOf(cedula_)); - jLtelefono.setText(String.valueOf(telefono_)); - jLnombre.setText(nombre_); - jLcorreo.setText(correo_); + jLcedula.setText(String.valueOf(id)); + jLtelefono.setText(telefono); + jLnombre.setText(nombre + " " + apellido); + jLcorreo.setText(correo); + } + + public void cambiarPanel() { + frame_cliente.FormularioModificar( + ControladorCliente.listClients(id).get(0)); + } /** @@ -43,7 +58,7 @@ private void initComponents() { jLtelefono = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); - setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); setOpaque(false); setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); @@ -60,9 +75,18 @@ private void initComponents() { add(jLtelefono, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 63, 85, 10)); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cliente-jpanel.png"))); // NOI18N + jLabel1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jLabel1MouseClicked(evt); + } + }); add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 4, 240, 130)); }// //GEN-END:initComponents + private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel1MouseClicked + cambiarPanel(); + }//GEN-LAST:event_jLabel1MouseClicked + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel jLabel1; diff --git a/HotelAdmin/src/Vistas/Jpanel/jPclienteRecepcionista.form b/HotelAdmin/src/Vistas/Jpanel/jPclienteRecepcionista.form new file mode 100644 index 0000000..bb7900a --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/jPclienteRecepcionista.form @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/jPclienteRecepcionista.java b/HotelAdmin/src/Vistas/Jpanel/jPclienteRecepcionista.java new file mode 100644 index 0000000..a55a991 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/jPclienteRecepcionista.java @@ -0,0 +1,141 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + +import Controladores.ControladorCliente; +import Modelo.Cliente; +import Vistas.Jframe.ClienteRecepcionista; + +/** + * + * @author nicol + */ +public class jPclienteRecepcionista extends javax.swing.JPanel { + + /** + * Creates new form jPclienteRecepcionista + */ + + private Cliente datosCliente; // datos cliente + private int id; + private String nombre,apellido, telefono, correo; + ClienteRecepcionista frame_cliente_rec; + + public jPclienteRecepcionista(Cliente datosCli, ClienteRecepcionista cr){ + + this.frame_cliente_rec = cr; + this.datosCliente = datosCli; + this.id = datosCliente.getID(); + this.nombre = datosCliente.getNombre(); + this.apellido = datosCliente.getApellido(); + this.telefono = datosCliente.getTelefono(); + this.correo = datosCliente.getCorreo(); + initComponents(); + + jLnumeroCliente.setText(String.valueOf(id)); + jLnombreCliente.setText(nombre); + jLApellidoCli.setText(apellido); + jLTelefonoCli.setText(telefono); + jLcorreoCli.setText(correo); + } + + public void cambiarPanel() { + frame_cliente_rec.FormularioModificar( + ControladorCliente.listClients(id).get(0)); + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jLnumeroCliente = new javax.swing.JLabel(); + jLnombreCliente = new javax.swing.JLabel(); + jLApellidoCli = new javax.swing.JLabel(); + jLTelefonoCli = new javax.swing.JLabel(); + jLcorreoCli = new javax.swing.JLabel(); + jBeditar = new javax.swing.JLabel(); + jBtodoPanel = new javax.swing.JButton(); + + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jLnumeroCliente.setBackground(new java.awt.Color(112, 112, 112)); + jLnumeroCliente.setFont(new java.awt.Font("Decker", 0, 10)); // NOI18N + jLnumeroCliente.setForeground(new java.awt.Color(112, 112, 112)); + jLnumeroCliente.setText("Número"); + add(jLnumeroCliente, new org.netbeans.lib.awtextra.AbsoluteConstraints(86, 28, 60, 13)); + + jLnombreCliente.setBackground(new java.awt.Color(112, 112, 112)); + jLnombreCliente.setFont(new java.awt.Font("Decker", 0, 10)); // NOI18N + jLnombreCliente.setForeground(new java.awt.Color(112, 112, 112)); + jLnombreCliente.setText("Nombre"); + add(jLnombreCliente, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 30, 80, 13)); + + jLApellidoCli.setBackground(new java.awt.Color(112, 112, 112)); + jLApellidoCli.setFont(new java.awt.Font("Decker", 0, 10)); // NOI18N + jLApellidoCli.setForeground(new java.awt.Color(112, 112, 112)); + jLApellidoCli.setText("Apellido"); + add(jLApellidoCli, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 30, 100, -1)); + + jLTelefonoCli.setFont(new java.awt.Font("Decker", 0, 10)); // NOI18N + jLTelefonoCli.setForeground(new java.awt.Color(112, 112, 112)); + jLTelefonoCli.setText("Telefono"); + add(jLTelefonoCli, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 30, 60, -1)); + + jLcorreoCli.setBackground(new java.awt.Color(112, 112, 112)); + jLcorreoCli.setFont(new java.awt.Font("Decker", 0, 10)); // NOI18N + jLcorreoCli.setForeground(new java.awt.Color(112, 112, 112)); + jLcorreoCli.setText("correo"); + add(jLcorreoCli, new org.netbeans.lib.awtextra.AbsoluteConstraints(660, 30, 120, -1)); + + jBeditar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/iconEditar.png"))); // NOI18N + jBeditar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBeditar.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jBeditarMouseClicked(evt); + } + }); + add(jBeditar, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 20, 16, 16)); + + jBtodoPanel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/CliSinSele.png"))); // NOI18N + jBtodoPanel.setBorderPainted(false); + jBtodoPanel.setContentAreaFilled(false); + jBtodoPanel.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/CliSele.png"))); // NOI18N + jBtodoPanel.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtodoPanelActionPerformed(evt); + } + }); + add(jBtodoPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 819, 68)); + }// //GEN-END:initComponents + + private void jBtodoPanelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtodoPanelActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jBtodoPanelActionPerformed + + private void jBeditarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jBeditarMouseClicked + // TODO add your handling code here: + cambiarPanel(); + + }//GEN-LAST:event_jBeditarMouseClicked + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel jBeditar; + private javax.swing.JButton jBtodoPanel; + private javax.swing.JLabel jLApellidoCli; + private javax.swing.JLabel jLTelefonoCli; + private javax.swing.JLabel jLcorreoCli; + private javax.swing.JLabel jLnombreCliente; + private javax.swing.JLabel jLnumeroCliente; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/jPempleado.form b/HotelAdmin/src/Vistas/Jpanel/jPempleado.form index 5ddb246..49e4495 100644 --- a/HotelAdmin/src/Vistas/Jpanel/jPempleado.form +++ b/HotelAdmin/src/Vistas/Jpanel/jPempleado.form @@ -3,7 +3,7 @@
- + @@ -78,6 +78,9 @@ + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/jPempleado.java b/HotelAdmin/src/Vistas/Jpanel/jPempleado.java index 341d7cd..3252914 100644 --- a/HotelAdmin/src/Vistas/Jpanel/jPempleado.java +++ b/HotelAdmin/src/Vistas/Jpanel/jPempleado.java @@ -5,30 +5,49 @@ */ package Vistas.Jpanel; +import Controladores.ControladorEmpleado; +import Modelo.Empleado; +import Vistas.Jframe.Empleados; +import javax.swing.JOptionPane; + /** * * @author nicol */ public class jPempleado extends javax.swing.JPanel { - private int id,cedula; + private Empleado datosEmp; + private int id; private String nombre,cargo; + Empleados frame_empleados; /** * Creates new form jPempleado + * + * + * @param datosEmp ES EL ARREGLO CON TODOS LOS DATOS DE ESE EMPLEADO + * PARA PODER LLENAR EL FORMULARIO DE EDITAR A LA HORA DE HACER ESTO */ - public jPempleado(int id_,int cedula_,String nombre_, String cargo_) { + public jPempleado(Empleado datos, + Empleados s) { - this.id = id_; - this.cedula = cedula_; - this.nombre = nombre_; - this.cargo = cargo_; + this.frame_empleados = s; + this.datosEmp = datos; + this.id = datosEmp.getID(); + this.nombre = datosEmp.getNombre() + " " + datosEmp.getApellido(); + this.cargo = datosEmp.getCargo(); initComponents(); - jLid.setText(String.valueOf(id_)); - jLcedula.setText(String.valueOf(cedula_)); - jLnombre.setText(nombre_); - jLcargo.setText(cargo_); + jLid.setText(String.valueOf(id)); + jLnombre.setText(nombre); + jLcargo.setText(cargo); + } + + public void cambiarPanel() { + frame_empleados.FormularioModificar( + ControladorEmpleado.listadoEmpleado(id).get(0)); + } + /** * This method is called from within the constructor to initialize the form. @@ -45,7 +64,7 @@ private void initComponents() { jLid = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); - setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); setOpaque(false); setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); @@ -62,9 +81,19 @@ private void initComponents() { add(jLid, new org.netbeans.lib.awtextra.AbsoluteConstraints(162, 30, 60, 10)); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Empleado-jpanel.png"))); // NOI18N + jLabel1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jLabel1MouseClicked(evt); + } + }); add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 4, 240, 130)); }// //GEN-END:initComponents + private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel1MouseClicked + cambiarPanel(); + }//GEN-LAST:event_jLabel1MouseClicked + + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel jLabel1; diff --git a/HotelAdmin/src/Vistas/Jpanel/jPhabitacion.java b/HotelAdmin/src/Vistas/Jpanel/jPhabitacion.java index 30f45b9..ab73059 100644 --- a/HotelAdmin/src/Vistas/Jpanel/jPhabitacion.java +++ b/HotelAdmin/src/Vistas/Jpanel/jPhabitacion.java @@ -5,8 +5,10 @@ */ package Vistas.Jpanel; +import Vistas.Jframe.Habitaciones; import javax.swing.JOptionPane; + /** * * @author nicol @@ -17,18 +19,28 @@ public class jPhabitacion extends javax.swing.JPanel { private int numero; private double precio; private String tipo; + private String piso; + private int cantidadPersonas; private boolean estado; private String eleccion; private int result; + Habitaciones frame_habitaciones; + + String validadorPanel; /** * Creates new form jPhabitacion */ - public jPhabitacion(int numero_,double precio_, String tipo_,boolean estado_) { + public jPhabitacion(int numero_,String tipo_, String piso, int cantidadPersonas, double precio_, boolean estado_, Habitaciones frame_habitaciones) { + + + this.frame_habitaciones = frame_habitaciones; this.numero = numero_; this.precio = precio_; this.tipo = tipo_; + this.piso = piso; + this.cantidadPersonas = cantidadPersonas; this.estado = estado_; initComponents(); @@ -40,12 +52,16 @@ public jPhabitacion(int numero_,double precio_, String tipo_,boolean estado_) { jLestado.setText("Disponible"); else jLestado.setText("Ocupado"); + + } public jPhabitacion(){ + } + public jPhabitacion(String eleccion_) { this.eleccion = eleccion_; setEleccion(eleccion_); @@ -56,23 +72,47 @@ public jPhabitacion(String eleccion_) { public void setEleccion(String val){ eleccion = val; } + + public void setValidadorPanel(String validadorPanel) { + this.validadorPanel = validadorPanel; + } + + - public void borrarPanel(){ - - if(eleccion == "eliminar"){ - new HabitacionAgregarModificarGUI().setVisible(true); + //Método para borrar panel +// public void borrarPanel(){ +// +// // if(eleccion == "eliminar"){ +// new HabitacionAgregarModificarGUI().setVisible(true); +// +// // }else{ +// int dialog = JOptionPane.YES_NO_OPTION; +// int result = JOptionPane.showConfirmDialog(null,"Desea continuar?","Eliminar",dialog); +// +// if(result == 0) +// { +// setVisible(false); +// } +// //} +// } + + public void cambiarPanel() { - }else{ - int dialog = JOptionPane.YES_NO_OPTION; - int result = JOptionPane.showConfirmDialog(null,"Desea continuar?","Eliminar",dialog); + frame_habitaciones.mostrarPanelAgregar(); + frame_habitaciones.getControladorHabitacion().leerHabitacionID(numero); - if(result == 0) - { - setVisible(false); - } - } } + public void deleteOfPanel() + { + frame_habitaciones.getControladorHabitacion().eliminarhabitacion(numero); + frame_habitaciones.mostrarPanelEliminar(); + frame_habitaciones.getControladorHabitacion().leerHabitaciones(); + + } + + + /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always @@ -113,8 +153,16 @@ public void mouseClicked(java.awt.event.MouseEvent evt) { private void formMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMouseClicked // TODO add your handling code here: - - borrarPanel(); + int dialog = JOptionPane.YES_NO_OPTION; + int result = JOptionPane.showConfirmDialog(null, "Desea continuar?", "Mensaje", dialog); + if (result == 0) { + if(validadorPanel == "actualizar"){ + cambiarPanel(); + } else if(validadorPanel == "eliminar") { + deleteOfPanel(); + } + + } diff --git a/HotelAdmin/src/Vistas/Jpanel/jPhabitacionCheckIn.form b/HotelAdmin/src/Vistas/Jpanel/jPhabitacionCheckIn.form new file mode 100644 index 0000000..ae06488 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/jPhabitacionCheckIn.form @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/jPhabitacionCheckIn.java b/HotelAdmin/src/Vistas/Jpanel/jPhabitacionCheckIn.java new file mode 100644 index 0000000..394bef6 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/jPhabitacionCheckIn.java @@ -0,0 +1,136 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + + +import javax.swing.JButton; +import javax.swing.JPanel; +import javax.swing.JTextField; + +/** + * + * @author nicol + */ +public class jPhabitacionCheckIn extends javax.swing.JPanel { + int numeroHabitacion; + String tipo; + int precio; + int capacidad; + JTextField jLabelHab; + + public void setjThabitacion(JTextField jThabitacion) { + this.jLabelHab = jThabitacion; + } + + + /** + * Creates new form jPhabitacionCheckIn + */ + public jPhabitacionCheckIn(){ + } + + public jPhabitacionCheckIn(int numeroHabitacion_,String tipo_, + int precio_, int capacidad_) { + initComponents(); + this.numeroHabitacion = numeroHabitacion_; + this.tipo = tipo_; + this.precio = precio_; + this.capacidad = capacidad_; + jLnumero.setText(String.valueOf(numeroHabitacion_)); + jLtipo.setText(tipo_); + jLprecio.setText(String.valueOf(precio_)); + jLcapacidad.setText(String.valueOf(capacidad_)); + } + + public void pintarPanel(){ + jButton1.setBorder(javax.swing.BorderFactory.createMatteBorder + (2, 2, 2, 2, new java.awt.Color(0, 102, 255))); + } + + + public void setRoomSelected(){ + jLabelHab.setText(""+numeroHabitacion); + pintarPanel(); + JPanel panel = (JPanel)getParent(); + for(int a = 0; a < panel.getComponentCount(); a++){ + if(!panel.getComponent(a).equals(this)){ + jPhabitacionCheckIn panelsito; + panelsito = (jPhabitacionCheckIn)panel.getComponent(a); + panelsito.jButton1.setBorder(null); + } + } + } + + public JButton getjButton1() { + return jButton1; + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jLcapacidad = new javax.swing.JLabel(); + jLnumero = new javax.swing.JLabel(); + jLtipo = new javax.swing.JLabel(); + jLprecio = new javax.swing.JLabel(); + jButton1 = new javax.swing.JButton(); + + setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jLcapacidad.setFont(new java.awt.Font("Decker", 0, 12)); // NOI18N + jLcapacidad.setForeground(new java.awt.Color(112, 112, 112)); + jLcapacidad.setText("2"); + add(jLcapacidad, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 30, 10, -1)); + + jLnumero.setFont(new java.awt.Font("Decker", 1, 12)); // NOI18N + jLnumero.setForeground(new java.awt.Color(0, 153, 255)); + jLnumero.setText("09"); + add(jLnumero, new org.netbeans.lib.awtextra.AbsoluteConstraints(63, 30, -1, -1)); + + jLtipo.setFont(new java.awt.Font("Decker", 0, 12)); // NOI18N + jLtipo.setForeground(new java.awt.Color(112, 112, 112)); + jLtipo.setText("MATRIMONIAL"); + add(jLtipo, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 30, 80, -1)); + + jLprecio.setFont(new java.awt.Font("Decker", 0, 12)); // NOI18N + jLprecio.setForeground(new java.awt.Color(112, 112, 112)); + jLprecio.setText("56"); + add(jLprecio, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 30, 50, -1)); + + jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/HabitacionChe.png"))); // NOI18N + jButton1.setBorder(null); + jButton1.setContentAreaFilled(false); + jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jButton1.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/HabitacionSeleccion.png"))); // NOI18N + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 10, -1, -1)); + }// //GEN-END:initComponents + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + setRoomSelected(); + + }//GEN-LAST:event_jButton1ActionPerformed + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JLabel jLcapacidad; + private javax.swing.JLabel jLnumero; + private javax.swing.JLabel jLprecio; + private javax.swing.JLabel jLtipo; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/jPhospedaje.form b/HotelAdmin/src/Vistas/Jpanel/jPhospedaje.form new file mode 100644 index 0000000..9078439 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/jPhospedaje.form @@ -0,0 +1,115 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/jPhospedaje.java b/HotelAdmin/src/Vistas/Jpanel/jPhospedaje.java new file mode 100644 index 0000000..28ac0d2 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/jPhospedaje.java @@ -0,0 +1,103 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + +/** + * + * @author nicol + */ +public class jPhospedaje extends javax.swing.JPanel { + private int idhospedaje; + private int idCliente; + private int habitacion; + private int piso; + /** + * Creates new form jPhospedaje + */ + public jPhospedaje() { + + } + + public jPhospedaje(int idhospedaje_,int idCliente_,int habitacion_,int piso_) { + this.idhospedaje = idhospedaje_; + this.idCliente = idCliente_; + this.habitacion = habitacion_; + this.piso = piso_; + + initComponents(); + + //AÑADE AL LA INTERFAZ + jLidhospedaje.setText(String.valueOf(idhospedaje_)); + jLidCliente.setText(String.valueOf(idCliente_)); + jLidHabitacion.setText(String.valueOf(habitacion_)); + jLpiso.setText(String.valueOf(piso_)); + + } + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jLpiso = new javax.swing.JLabel(); + jLidhospedaje = new javax.swing.JLabel(); + jLidCliente = new javax.swing.JLabel(); + jLidHabitacion = new javax.swing.JLabel(); + jBhospedaje = new javax.swing.JButton(); + + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jLpiso.setFont(new java.awt.Font("Decker", 0, 10)); // NOI18N + jLpiso.setForeground(new java.awt.Color(112, 112, 112)); + jLpiso.setText("09"); + jLpiso.setToolTipText(""); + add(jLpiso, new org.netbeans.lib.awtextra.AbsoluteConstraints(650, 28, -1, -1)); + + jLidhospedaje.setFont(new java.awt.Font("Decker", 0, 10)); // NOI18N + jLidhospedaje.setForeground(new java.awt.Color(112, 112, 112)); + jLidhospedaje.setText("09"); + add(jLidhospedaje, new org.netbeans.lib.awtextra.AbsoluteConstraints(106, 28, -1, -1)); + + jLidCliente.setFont(new java.awt.Font("Decker", 0, 10)); // NOI18N + jLidCliente.setForeground(new java.awt.Color(112, 112, 112)); + jLidCliente.setText("09"); + add(jLidCliente, new org.netbeans.lib.awtextra.AbsoluteConstraints(259, 28, -1, -1)); + + jLidHabitacion.setFont(new java.awt.Font("Decker", 0, 10)); // NOI18N + jLidHabitacion.setForeground(new java.awt.Color(112, 112, 112)); + jLidHabitacion.setText("30"); + add(jLidHabitacion, new org.netbeans.lib.awtextra.AbsoluteConstraints(438, 28, -1, -1)); + + jBhospedaje.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/hospedajeSinSele.png"))); // NOI18N + jBhospedaje.setBorder(null); + jBhospedaje.setContentAreaFilled(false); + jBhospedaje.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBhospedaje.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/hospedajeSele.png"))); // NOI18N + jBhospedaje.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBhospedajeActionPerformed(evt); + } + }); + add(jBhospedaje, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 725, 68)); + }// //GEN-END:initComponents + + private void jBhospedajeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBhospedajeActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jBhospedajeActionPerformed + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBhospedaje; + private javax.swing.JLabel jLidCliente; + private javax.swing.JLabel jLidHabitacion; + private javax.swing.JLabel jLidhospedaje; + private javax.swing.JLabel jLpiso; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/build/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI.form b/HotelAdmin/src/Vistas/Jpanel/jPmensaje.form similarity index 73% rename from HotelAdmin/build/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI.form rename to HotelAdmin/src/Vistas/Jpanel/jPmensaje.form index 591d3d4..6d5fc0a 100644 --- a/HotelAdmin/build/build/classes/Vistas/Jpanel/HabitacionAgregarModificarGUI.form +++ b/HotelAdmin/src/Vistas/Jpanel/jPmensaje.form @@ -1,10 +1,20 @@
+ + + + + + + + + - - + + + @@ -16,22 +26,22 @@ - + - + - - + + - + diff --git a/HotelAdmin/build/src/Vistas/Jpanel/HabitacionAgregarModificarGUI.java b/HotelAdmin/src/Vistas/Jpanel/jPmensaje.java similarity index 62% rename from HotelAdmin/build/src/Vistas/Jpanel/HabitacionAgregarModificarGUI.java rename to HotelAdmin/src/Vistas/Jpanel/jPmensaje.java index dd8591e..43661cb 100644 --- a/HotelAdmin/build/src/Vistas/Jpanel/HabitacionAgregarModificarGUI.java +++ b/HotelAdmin/src/Vistas/Jpanel/jPmensaje.java @@ -9,13 +9,17 @@ * * @author nicol */ -public class HabitacionAgregarModificarGUI extends javax.swing.JPanel { - +public class jPmensaje extends javax.swing.JPanel { + + private String mensaje; /** - * Creates new form HabitacionAgregarModificarGUI + * Creates new form jPcliente */ - public HabitacionAgregarModificarGUI() { + public jPmensaje(String mensaje_) { + + this.mensaje = mensaje_; initComponents(); + jLmensaje.setText(mensaje_); } /** @@ -28,16 +32,21 @@ public HabitacionAgregarModificarGUI() { private void initComponents() { jLabel1 = new javax.swing.JLabel(); + jLmensaje = new javax.swing.JLabel(); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cliente-jpanel.png"))); // NOI18N - setBackground(new java.awt.Color(69, 170, 242)); + setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + setOpaque(false); setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/fondoBlanco.png"))); // NOI18N - add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, 430)); + jLmensaje.setFont(new java.awt.Font("Decker", 0, 11)); // NOI18N + add(jLmensaje, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, 370, 20)); }// //GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLmensaje; // End of variables declaration//GEN-END:variables } diff --git a/HotelAdmin/src/Vistas/Jpanel/jPnumeroHabitacion.form b/HotelAdmin/src/Vistas/Jpanel/jPnumeroHabitacion.form new file mode 100644 index 0000000..27c5ba6 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/jPnumeroHabitacion.form @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/jPnumeroHabitacion.java b/HotelAdmin/src/Vistas/Jpanel/jPnumeroHabitacion.java new file mode 100644 index 0000000..ac86e82 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/jPnumeroHabitacion.java @@ -0,0 +1,62 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + +/** + * + * @author nicol + */ +public class jPnumeroHabitacion extends javax.swing.JPanel { + private int numeroHabitacion; + /** + * Creates new form jPnumeroHabitacion + */ + public jPnumeroHabitacion(int idHabitacion) { + initComponents(); + this.numeroHabitacion = idHabitacion; + jLnumeroHabitacion.setText(String.valueOf(idHabitacion)); + } + + public jPnumeroHabitacion(){ + + } + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jLnumeroHabitacion = new javax.swing.JLabel(); + jLnumero = new javax.swing.JLabel(); + jLabel1 = new javax.swing.JLabel(); + + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jLnumeroHabitacion.setFont(new java.awt.Font("Decker", 1, 13)); // NOI18N + jLnumeroHabitacion.setForeground(new java.awt.Color(112, 112, 112)); + jLnumeroHabitacion.setText("01"); + add(jLnumeroHabitacion, new org.netbeans.lib.awtextra.AbsoluteConstraints(85, 70, 20, -1)); + + jLnumero.setFont(new java.awt.Font("Decker", 1, 13)); // NOI18N + jLnumero.setForeground(new java.awt.Color(112, 112, 112)); + jLnumero.setText("Número:"); + add(jLnumero, new org.netbeans.lib.awtextra.AbsoluteConstraints(23, 70, 60, -1)); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/jPnumeroH.png"))); // NOI18N + add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1)); + }// //GEN-END:initComponents + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLnumero; + private javax.swing.JLabel jLnumeroHabitacion; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/jPreservasHospedaje.form b/HotelAdmin/src/Vistas/Jpanel/jPreservasHospedaje.form new file mode 100644 index 0000000..44c99ea --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/jPreservasHospedaje.form @@ -0,0 +1,199 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/jPreservasHospedaje.java b/HotelAdmin/src/Vistas/Jpanel/jPreservasHospedaje.java new file mode 100644 index 0000000..64c0f3f --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/jPreservasHospedaje.java @@ -0,0 +1,198 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + +import Controladores.ControllerReserva; +import Modelo.Reserva; +import Servicios.Fecha; +import Vistas.Jframe.Reservas; +import java.text.SimpleDateFormat; +import java.util.Date; +import javax.swing.ImageIcon; +import javax.swing.JOptionPane; + +/** + * + * @author nicol + */ + + +public class jPreservasHospedaje extends javax.swing.JPanel { + Reservas frame_reservas; + int numero; + int idCliente; + int idHabitacion; + int cantPersonas; + String ingreso; + String salida; + /** + * Creates new form jPreservasHospedaje + */ + public jPreservasHospedaje(){ + + } + public jPreservasHospedaje(int numero_,int idCliente_,int idHabitacion_, + int cantPersonas_, String ingreso_, String salida_) { + this.numero = numero_; + this.idCliente = idCliente_; + this.idHabitacion = idHabitacion_; + this.cantPersonas = cantPersonas_; + this.ingreso = ingreso_; + this.salida = salida_; + + initComponents(); + + jLnumeroReserva.setText(String.valueOf(numero_)); + jLidCliente.setText(String.valueOf(idCliente_)); + jLidHabitacion.setText(String.valueOf(idHabitacion_)); + jLcantPersonas.setText(String.valueOf(cantPersonas_)); + jLfechaIngreso.setText(ingreso_); + jLfechaSalida.setText(salida_); + + /*if(Fecha.toTimestamp(ingreso).getTime()>Fecha.crearFechaTimestamp().getTime()){ + jBtodoPanel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ReservSele.png"))); + }*/ + + } + + public void setFrame_reservas(Reservas frame_reservas) { + this.frame_reservas = frame_reservas; + } + + + public void llenarFormulario(){ + //ENVIA UNA RESERVA PARA LLENAR EL FORMULARIO + RealizarReservaGUI panel = frame_reservas.PanelRealizarReserva(); + Reserva reserva = new Reserva(); + reserva.setFecha_ingreso(Fecha.toTimestamp(ingreso)); + reserva.setFecha_salida(Fecha.toTimestamp(salida)); + reserva.setNum_Habitacion(idHabitacion); + reserva.setNumero_reserva(numero); + reserva.setNum_Personas(cantPersonas); + reserva.setNumCliente(idCliente); + panel.llenarFormulario(reserva); + } + + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jLnumeroReserva = new javax.swing.JLabel(); + jLidCliente = new javax.swing.JLabel(); + jLidHabitacion = new javax.swing.JLabel(); + jLcantPersonas = new javax.swing.JLabel(); + jLfechaIngreso = new javax.swing.JLabel(); + jLfechaSalida = new javax.swing.JLabel(); + jBeliminar = new javax.swing.JLabel(); + jBeditar = new javax.swing.JLabel(); + jBtodoPanel = new javax.swing.JButton(); + + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jLnumeroReserva.setBackground(new java.awt.Color(112, 112, 112)); + jLnumeroReserva.setFont(new java.awt.Font("Decker", 0, 10)); // NOI18N + jLnumeroReserva.setForeground(new java.awt.Color(112, 112, 112)); + jLnumeroReserva.setText("Número"); + add(jLnumeroReserva, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 28, -1, -1)); + + jLidCliente.setBackground(new java.awt.Color(112, 112, 112)); + jLidCliente.setFont(new java.awt.Font("Decker", 0, 10)); // NOI18N + jLidCliente.setForeground(new java.awt.Color(112, 112, 112)); + jLidCliente.setText("ID Cliente"); + add(jLidCliente, new org.netbeans.lib.awtextra.AbsoluteConstraints(293, 28, -1, -1)); + + jLidHabitacion.setBackground(new java.awt.Color(112, 112, 112)); + jLidHabitacion.setFont(new java.awt.Font("Decker", 0, 10)); // NOI18N + jLidHabitacion.setForeground(new java.awt.Color(112, 112, 112)); + jLidHabitacion.setText("Habitación"); + add(jLidHabitacion, new org.netbeans.lib.awtextra.AbsoluteConstraints(395, 28, -1, -1)); + + jLcantPersonas.setFont(new java.awt.Font("Decker", 0, 10)); // NOI18N + jLcantPersonas.setForeground(new java.awt.Color(112, 112, 112)); + jLcantPersonas.setText("Personas"); + add(jLcantPersonas, new org.netbeans.lib.awtextra.AbsoluteConstraints(505, 28, -1, -1)); + + jLfechaIngreso.setBackground(new java.awt.Color(112, 112, 112)); + jLfechaIngreso.setFont(new java.awt.Font("Decker", 0, 10)); // NOI18N + jLfechaIngreso.setForeground(new java.awt.Color(112, 112, 112)); + jLfechaIngreso.setText("Fecha Ingreso"); + add(jLfechaIngreso, new org.netbeans.lib.awtextra.AbsoluteConstraints(603, 28, -1, -1)); + + jLfechaSalida.setBackground(new java.awt.Color(112, 112, 112)); + jLfechaSalida.setFont(new java.awt.Font("Decker", 0, 10)); // NOI18N + jLfechaSalida.setForeground(new java.awt.Color(112, 112, 112)); + jLfechaSalida.setText("Fecha salida"); + add(jLfechaSalida, new org.netbeans.lib.awtextra.AbsoluteConstraints(741, 28, -1, -1)); + + jBeliminar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/iconEliminar.png"))); // NOI18N + jBeliminar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBeliminar.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jBeliminarMouseClicked(evt); + } + }); + add(jBeliminar, new org.netbeans.lib.awtextra.AbsoluteConstraints(237, 25, 16, 16)); + + jBeditar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/iconEditar.png"))); // NOI18N + jBeditar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBeditar.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jBeditarMouseClicked(evt); + } + }); + add(jBeditar, new org.netbeans.lib.awtextra.AbsoluteConstraints(167, 25, 16, 16)); + + jBtodoPanel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ReservSinSele.png"))); // NOI18N + jBtodoPanel.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(153, 153, 153))); + jBtodoPanel.setBorderPainted(false); + jBtodoPanel.setContentAreaFilled(false); + jBtodoPanel.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ReservSele.png"))); // NOI18N + jBtodoPanel.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtodoPanelActionPerformed(evt); + } + }); + add(jBtodoPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 860, 67)); + }// //GEN-END:initComponents + + private void jBtodoPanelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtodoPanelActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jBtodoPanelActionPerformed + + private void jBeliminarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jBeliminarMouseClicked + int dialog = JOptionPane.YES_NO_OPTION; + int result = JOptionPane.showConfirmDialog + (this, "Desea continuar?", "Eliminar", dialog); + if (result == 0) { + ControllerReserva.eliminarReserva(numero); + frame_reservas.panelListarReserva(); + } + }//GEN-LAST:event_jBeliminarMouseClicked + + private void jBeditarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jBeditarMouseClicked + llenarFormulario(); + }//GEN-LAST:event_jBeditarMouseClicked + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel jBeditar; + private javax.swing.JLabel jBeliminar; + private javax.swing.JButton jBtodoPanel; + private javax.swing.JLabel jLcantPersonas; + private javax.swing.JLabel jLfechaIngreso; + private javax.swing.JLabel jLfechaSalida; + private javax.swing.JLabel jLidCliente; + private javax.swing.JLabel jLidHabitacion; + private javax.swing.JLabel jLnumeroReserva; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/jPservicio.form b/HotelAdmin/src/Vistas/Jpanel/jPservicio.form index 5af7ed9..53b7cdc 100644 --- a/HotelAdmin/src/Vistas/Jpanel/jPservicio.form +++ b/HotelAdmin/src/Vistas/Jpanel/jPservicio.form @@ -32,7 +32,7 @@ - +
@@ -78,6 +78,9 @@
+ + + diff --git a/HotelAdmin/src/Vistas/Jpanel/jPservicio.java b/HotelAdmin/src/Vistas/Jpanel/jPservicio.java index a07af7d..874307b 100644 --- a/HotelAdmin/src/Vistas/Jpanel/jPservicio.java +++ b/HotelAdmin/src/Vistas/Jpanel/jPservicio.java @@ -5,33 +5,75 @@ */ package Vistas.Jpanel; +import Controladores.ControllerServicios; +import Modelo.RoomServices; +import Servicios.JFopciones; +import Vistas.Jframe.Services; +import javax.swing.JOptionPane; + /** * * @author nicol */ public class jPservicio extends javax.swing.JPanel { + private int id,cantidad; - private String nombre; + private String nombre; private double precio; + + + Services frame_servicios; + /** * Creates new form jPservicio */ - public jPservicio(){ - + public jPservicio() { + } - public jPservicio(int id_,String nombre_,double precio_,int cantidad_) { - this.id = id_; - this.nombre = nombre_; - this.precio = precio_; - this.cantidad = cantidad_; - + + public jPservicio(int id_, String nombre_, double precio_, int cantidad_, Services s) { + id = id_; initComponents(); jLid.setText(String.valueOf(id_)); jLnombre.setText(nombre_); jLprecio.setText(String.valueOf(precio_)); jLcantidad.setText(String.valueOf(cantidad_)); + frame_servicios = s; } + + + + public void cambiarPanel() { + frame_servicios.mostrarPanelFormulario("actualizar"); + RoomServices roomservice; + roomservice = ControllerServicios.leerServicio_porID(id); + ControllerServicios.setOpcionEjec("actualizar"); + ControllerServicios.setNum_servicio(roomservice.getId_servicio()); + frame_servicios.llenarFormulario(roomservice); + } + + public void deleteServiceFromPanel(){ + ControllerServicios.eliminarServicio(id); + frame_servicios.mostrarPanelLista(); + } + + + public void manejaOpciones(String validadorPanel){ + + int dialog = JOptionPane.YES_NO_OPTION; + int result = JOptionPane.showConfirmDialog + (this, "Desea continuar?", "Eliminar", dialog); + if (result == 0) { + if(validadorPanel == "actualizar"){ + cambiarPanel(); + } else if(validadorPanel == "eliminar") { + deleteServiceFromPanel(); + } + } + } + + /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always @@ -52,7 +94,7 @@ private void initComponents() { setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLnombre.setFont(new java.awt.Font("Decker", 0, 11)); // NOI18N - add(jLnombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(138, 50, 58, 10)); + add(jLnombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(136, 46, 60, 15)); jLid.setFont(new java.awt.Font("Decker", 0, 11)); // NOI18N add(jLid, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 32, 48, 10)); @@ -64,9 +106,19 @@ private void initComponents() { add(jLprecio, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 65, 70, 10)); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Servicio-jpanel.png"))); // NOI18N + jLabel1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jLabel1MouseClicked(evt); + } + }); add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 4, 220, 130)); }// //GEN-END:initComponents + private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel1MouseClicked + new JFopciones(this); + }//GEN-LAST:event_jLabel1MouseClicked + + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel jLabel1; diff --git a/HotelAdmin/src/Vistas/Jpanel/jPserviciosRecepcionista.form b/HotelAdmin/src/Vistas/Jpanel/jPserviciosRecepcionista.form new file mode 100644 index 0000000..640b48f --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/jPserviciosRecepcionista.form @@ -0,0 +1,81 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/jPserviciosRecepcionista.java b/HotelAdmin/src/Vistas/Jpanel/jPserviciosRecepcionista.java new file mode 100644 index 0000000..8c5b80f --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/jPserviciosRecepcionista.java @@ -0,0 +1,67 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + +/** + * + * @author nicol + */ +public class jPserviciosRecepcionista extends javax.swing.JPanel { + private String nombre; + private double precio; + private int cantidad; + /** + * Creates new form jPserviciosRecepcionista + */ + public jPserviciosRecepcionista(String nombre_,double precio_, int cantidad_) { + initComponents(); + jLnombre.setText(nombre_); + jLprecio.setText(String.valueOf(precio_)); + jTcantidad.setText(String.valueOf(cantidad_)); + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jLnombre = new javax.swing.JLabel(); + jLprecio = new javax.swing.JLabel(); + jTcantidad = new javax.swing.JTextField(); + jSeparator1 = new javax.swing.JSeparator(); + + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jLnombre.setFont(new java.awt.Font("Decker", 0, 12)); // NOI18N + jLnombre.setForeground(new java.awt.Color(112, 112, 112)); + jLnombre.setText("Chocolate"); + add(jLnombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(1, 8, -1, -1)); + + jLprecio.setFont(new java.awt.Font("Decker", 0, 12)); // NOI18N + jLprecio.setForeground(new java.awt.Color(112, 112, 112)); + jLprecio.setText("55"); + add(jLprecio, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 8, -1, -1)); + + jTcantidad.setToolTipText(""); + jTcantidad.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(72, 159, 229), 2)); + add(jTcantidad, new org.netbeans.lib.awtextra.AbsoluteConstraints(143, 8, 21, 15)); + add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 32, 170, -1)); + }// //GEN-END:initComponents + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel jLnombre; + private javax.swing.JLabel jLprecio; + private javax.swing.JSeparator jSeparator1; + private javax.swing.JTextField jTcantidad; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/jPserviciosRecepcionista2.form b/HotelAdmin/src/Vistas/Jpanel/jPserviciosRecepcionista2.form new file mode 100644 index 0000000..dabb9d3 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/jPserviciosRecepcionista2.form @@ -0,0 +1,102 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/jPserviciosRecepcionista2.java b/HotelAdmin/src/Vistas/Jpanel/jPserviciosRecepcionista2.java new file mode 100644 index 0000000..8b74639 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/jPserviciosRecepcionista2.java @@ -0,0 +1,87 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + +/** + * + * @author nicol + */ +public class jPserviciosRecepcionista2 extends javax.swing.JPanel { + + private String nombre; + private double precio; + private int cantidad; + /** + * Creates new form jPserviciosRecepcionista2 + */ + public jPserviciosRecepcionista2(String nombre_,double precio_, int cantidad_) { + initComponents(); + jLnombre.setText(nombre_); + jLprecio.setText(String.valueOf(precio_)); + jLcantidad.setText(String.valueOf(cantidad_)); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jLcantidad = new javax.swing.JLabel(); + jLnombre = new javax.swing.JLabel(); + jLprecio = new javax.swing.JLabel(); + jBeliminar = new javax.swing.JButton(); + jSeparator1 = new javax.swing.JSeparator(); + + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jLcantidad.setFont(new java.awt.Font("Decker", 0, 12)); // NOI18N + jLcantidad.setForeground(new java.awt.Color(112, 112, 112)); + jLcantidad.setText("02"); + add(jLcantidad, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 7, -1, -1)); + + jLnombre.setFont(new java.awt.Font("Decker", 0, 12)); // NOI18N + jLnombre.setForeground(new java.awt.Color(112, 112, 112)); + jLnombre.setText("Chocolate"); + add(jLnombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(1, 8, -1, -1)); + + jLprecio.setFont(new java.awt.Font("Decker", 0, 12)); // NOI18N + jLprecio.setForeground(new java.awt.Color(112, 112, 112)); + jLprecio.setText("55"); + add(jLprecio, new org.netbeans.lib.awtextra.AbsoluteConstraints(85, 8, -1, -1)); + + jBeliminar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/iconEliminar.png"))); // NOI18N + jBeliminar.setBorder(null); + jBeliminar.setContentAreaFilled(false); + jBeliminar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBeliminar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBeliminarActionPerformed(evt); + } + }); + add(jBeliminar, new org.netbeans.lib.awtextra.AbsoluteConstraints(181, 7, 20, -1)); + add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 27, 200, -1)); + }// //GEN-END:initComponents + + private void jBeliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBeliminarActionPerformed + // TODO add your handling code here: + + + }//GEN-LAST:event_jBeliminarActionPerformed + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBeliminar; + private javax.swing.JLabel jLcantidad; + private javax.swing.JLabel jLnombre; + private javax.swing.JLabel jLprecio; + private javax.swing.JSeparator jSeparator1; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/panelAgregarServicio.form b/HotelAdmin/src/Vistas/Jpanel/panelAgregarServicio.form new file mode 100644 index 0000000..e49c03b --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/panelAgregarServicio.form @@ -0,0 +1,216 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/panelAgregarServicio.java b/HotelAdmin/src/Vistas/Jpanel/panelAgregarServicio.java new file mode 100644 index 0000000..88ff1a8 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/panelAgregarServicio.java @@ -0,0 +1,300 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + +import Controladores.ControllerServicios; +import Modelo.RoomServices; +import Vistas.Jframe.Services; +import java.awt.Color; +import java.awt.event.KeyEvent; +import javax.swing.JButton; +import javax.swing.JOptionPane; +import javax.swing.JTextField; + +/** + * + * @author nicol + */ +public class panelAgregarServicio extends javax.swing.JPanel { + + /** + * Creates new form ServiciosAgregarModificar + */ + String validadorBoton; //valida si se requiere hacer una actuslizacion o una ingreso del un registro + + Services frame_servicio; + public panelAgregarServicio(Services frame_servicio) { + initComponents(); + this.frame_servicio = frame_servicio; + } + + + + + + + + + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jTprecio = new javax.swing.JTextField(); + jTNombre = new javax.swing.JTextField(); + jTcantidad = new javax.swing.JTextField(); + jLnombre = new javax.swing.JLabel(); + jLcantidad = new javax.swing.JLabel(); + jLprecio = new javax.swing.JLabel(); + jBcancelar = new javax.swing.JButton(); + jBguardar = new javax.swing.JButton(); + jLfondo = new javax.swing.JLabel(); + + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jTprecio.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jTprecio.setForeground(new java.awt.Color(153, 153, 153)); + jTprecio.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); + jTprecio.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTprecioFocusGained(evt); + } + }); + jTprecio.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyTyped(java.awt.event.KeyEvent evt) { + jTprecioKeyTyped(evt); + } + }); + add(jTprecio, new org.netbeans.lib.awtextra.AbsoluteConstraints(373, 322, 276, 25)); + + jTNombre.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jTNombre.setForeground(new java.awt.Color(153, 153, 153)); + jTNombre.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); + jTNombre.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTNombreFocusGained(evt); + } + }); + add(jTNombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(373, 184, 276, 25)); + + jTcantidad.setFont(new java.awt.Font("Decker", 0, 14)); // NOI18N + jTcantidad.setForeground(new java.awt.Color(153, 153, 153)); + jTcantidad.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); + jTcantidad.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTcantidadFocusGained(evt); + } + }); + jTcantidad.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyTyped(java.awt.event.KeyEvent evt) { + jTcantidadKeyTyped(evt); + } + }); + add(jTcantidad, new org.netbeans.lib.awtextra.AbsoluteConstraints(373, 250, 276, 25)); + + jLnombre.setFont(new java.awt.Font("Decker", 0, 16)); // NOI18N + jLnombre.setForeground(new java.awt.Color(191, 191, 191)); + jLnombre.setText("Nombre"); + add(jLnombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(373, 152, -1, -1)); + + jLcantidad.setFont(new java.awt.Font("Decker", 0, 16)); // NOI18N + jLcantidad.setForeground(new java.awt.Color(191, 191, 191)); + jLcantidad.setText("Cantidad"); + add(jLcantidad, new org.netbeans.lib.awtextra.AbsoluteConstraints(373, 222, -1, -1)); + + jLprecio.setFont(new java.awt.Font("Decker", 0, 16)); // NOI18N + jLprecio.setForeground(new java.awt.Color(191, 191, 191)); + jLprecio.setText("Precio"); + add(jLprecio, new org.netbeans.lib.awtextra.AbsoluteConstraints(373, 291, -1, -1)); + + jBcancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-sinSeleccion.png"))); // NOI18N + jBcancelar.setBorder(null); + jBcancelar.setBorderPainted(false); + jBcancelar.setContentAreaFilled(false); + jBcancelar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBcancelar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cancelar-seleccionado.png"))); // NOI18N + jBcancelar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBcancelarActionPerformed(evt); + } + }); + add(jBcancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(373, 374, 130, 50)); + + jBguardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar-SinSele.png"))); // NOI18N + jBguardar.setBorder(null); + jBguardar.setContentAreaFilled(false); + jBguardar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jBguardar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/GuardarSele.png"))); // NOI18N + jBguardar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBguardarActionPerformed(evt); + } + }); + add(jBguardar, new org.netbeans.lib.awtextra.AbsoluteConstraints(529, 374, -1, -1)); + + jLfondo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/MarcoServicio.png"))); // NOI18N + jLfondo.setPreferredSize(new java.awt.Dimension(739, 429)); + add(jLfondo, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 68, 575, 397)); + }// //GEN-END:initComponents + + private void jBcancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBcancelarActionPerformed + setearCampos(); + if(ControllerServicios.getOpcionEjec().equals("actualizar")){ + ControllerServicios.setOpcionEjec("guardar"); + frame_servicio.mostrarPanelLista(); + } + }//GEN-LAST:event_jBcancelarActionPerformed + + private void jBguardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBguardarActionPerformed + if (validarCampos() == 1) { + if (ControllerServicios.getOpcionEjec().equals("guardar")) { + ControllerServicios.extraerId(); + ControllerServicios.registrarServicio(infoServicio()); + setearCampos(); + } else if (ControllerServicios.getOpcionEjec().equals("actualizar")) { + ControllerServicios.actualizarServicio(infoServicio()); + setearCampos(); + frame_servicio.mostrarPanelLista(); + } + } else { + JOptionPane.showMessageDialog(null, "Ingrese Todos los " + + "Campos Requeridos"); + } + }//GEN-LAST:event_jBguardarActionPerformed + + + private void jTNombreFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTNombreFocusGained + // TODO add your handling code here: + if (jTNombre.getText().equalsIgnoreCase("****")) { + setearFormato(jTNombre); + } + }//GEN-LAST:event_jTNombreFocusGained + + + private void jTcantidadFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTcantidadFocusGained + // TODO add your handling code here: + if (jTcantidad.getText().equalsIgnoreCase("****")) { + setearFormato(jTcantidad); + } + }//GEN-LAST:event_jTcantidadFocusGained + + private void jTprecioFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTprecioFocusGained + // TODO add your handling code here: + if (jTprecio.getText().equalsIgnoreCase("****")) { + setearFormato(jTprecio); + } + }//GEN-LAST:event_jTprecioFocusGained + + + private void jTcantidadKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTcantidadKeyTyped + // TODO add your handling code here: + validaNumero(evt.getKeyChar(), evt); + }//GEN-LAST:event_jTcantidadKeyTyped + + + private void jTprecioKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTprecioKeyTyped + // TODO add your handling code here: + validaNumero(evt.getKeyChar(), evt); + }//GEN-LAST:event_jTprecioKeyTyped + + + + + + public void setearCampos() { + jTNombre.setText(""); + jTcantidad.setText(""); + jTprecio.setText(""); + + } + + + + public void setearFormato(JTextField t) { + t.setForeground(new Color(153, 153, 153)); + t.setText(""); + } + + + public int validarCampos() { + int rtdo = 1; + + if (jTNombre.getText().equals("") || jTNombre.getText().equals("****")) + { + + rtdo = 0; + mostrarCamposVacios(jTNombre); + + } + if (jTcantidad.getText().equals("") || jTcantidad.getText().equals("****")) + { + rtdo = 0; + + mostrarCamposVacios(jTcantidad); + } + if(jTprecio.getText().equals("") || jTprecio.getText().equals("****")) + { + rtdo = 0; + + mostrarCamposVacios(jTprecio); + } + return rtdo; + } + + public void llenarFormulario(RoomServices roomService) { + String nombre_ser = roomService.getNombrePro(); + double precio_ser = roomService.getPrecio(); + int cantidad = roomService.getCantidad(); + jTNombre.setText(nombre_ser); + jTcantidad.setText("" + cantidad); + jTprecio.setText("" + precio_ser); + } + + private RoomServices infoServicio() { + RoomServices servicio = new RoomServices(); + int numSer = ControllerServicios.getNum_servicio(); + servicio.setId_servicio(numSer); + servicio.setNombrePro(jTNombre.getText().trim()); + servicio.setCantidad(Integer.parseInt(jTcantidad.getText().trim())); + servicio.setPrecio(Double.parseDouble(jTprecio.getText().trim())); + return servicio; + } + + + + public void mostrarCamposVacios(JTextField jt) { + jt.setForeground(Color.blue); + jt.setText("****"); + } + + + public void validaNumero(char c, KeyEvent evt) { + if (!Character.isDigit(c)) { + evt.consume(); + } + } + + + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBcancelar; + private javax.swing.JButton jBguardar; + private javax.swing.JLabel jLcantidad; + private javax.swing.JLabel jLfondo; + private javax.swing.JLabel jLnombre; + private javax.swing.JLabel jLprecio; + private javax.swing.JTextField jTNombre; + private javax.swing.JTextField jTcantidad; + private javax.swing.JTextField jTprecio; + // End of variables declaration//GEN-END:variables +} diff --git a/HotelAdmin/src/Vistas/Jpanel/panelModificarServicio.form b/HotelAdmin/src/Vistas/Jpanel/panelModificarServicio.form new file mode 100644 index 0000000..648c223 --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/panelModificarServicio.form @@ -0,0 +1,111 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelAdmin/src/Vistas/Jpanel/panelModificarServicio.java b/HotelAdmin/src/Vistas/Jpanel/panelModificarServicio.java new file mode 100644 index 0000000..3d3fd0f --- /dev/null +++ b/HotelAdmin/src/Vistas/Jpanel/panelModificarServicio.java @@ -0,0 +1,125 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vistas.Jpanel; + +import java.util.ArrayList; +import Modelo.*; +import Controladores.*; +import Vistas.Jframe.Services; +import java.awt.GridBagLayout; +import java.awt.GridLayout; +import javax.swing.JFrame; +import javax.swing.JOptionPane; + +/** + * + * @author nicol + */ +public class panelModificarServicio extends javax.swing.JPanel { + + /** + * Creates new form ServiciosListaGUI + */ + + + + + Services frame_Servicios; + public panelModificarServicio(Services s) { + frame_Servicios = s; + initComponents(); + CargarLista(); + + } + + + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jScrollPane3 = new javax.swing.JScrollPane(); + jPmensajes = new javax.swing.JPanel(); + jLabel2 = new javax.swing.JLabel(); + jTbuscador = new javax.swing.JTextField(); + jBbuscar = new javax.swing.JButton(); + + setOpaque(false); + setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jScrollPane3.setBorder(null); + jScrollPane3.setHorizontalScrollBar(null); + + jPmensajes.setBackground(new java.awt.Color(255, 255, 255)); + jPmensajes.setLayout(new java.awt.GridLayout(0, 3, 0, 1)); + jScrollPane3.setViewportView(jPmensajes); + + add(jScrollPane3, new org.netbeans.lib.awtextra.AbsoluteConstraints(156, 90, 710, 340)); + + jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ContornoHabitacion.png"))); // NOI18N + add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(148, 84, -1, -1)); + + jTbuscador.setFont(new java.awt.Font("Decker", 0, 15)); // NOI18N + jTbuscador.setForeground(new java.awt.Color(191, 191, 191)); + jTbuscador.setText("Buscar servicio por nombre"); + jTbuscador.setBorder(null); + jTbuscador.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTbuscadorActionPerformed(evt); + } + }); + add(jTbuscador, new org.netbeans.lib.awtextra.AbsoluteConstraints(118, 47, 230, 19)); + + jBbuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/buscar-azul.png"))); // NOI18N + jBbuscar.setBorder(null); + jBbuscar.setBorderPainted(false); + jBbuscar.setContentAreaFilled(false); + jBbuscar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + add(jBbuscar, new org.netbeans.lib.awtextra.AbsoluteConstraints(79, 44, 24, 24)); + }// //GEN-END:initComponents + + private void jTbuscadorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTbuscadorActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTbuscadorActionPerformed + + + + public void CargarLista() { + + //TODA LAS HABITACIONES SON AGREGADAS AL JPANEL + //EN DONDE SE MUESTRA LOS DATOS PRINCIPALES DE LAS HABITACIONES + ArrayList lista_roomServices; + lista_roomServices = ControllerServicios.desplegarServicios(); + jPmensajes.removeAll(); + for (int i = 0; i < lista_roomServices.size(); i++) { + int id_ser = lista_roomServices.get(i).getId_servicio(); + String nombre_ser = lista_roomServices.get(i).getNombrePro(); + double precio_ser = lista_roomServices.get(i).getPrecio(); + int cantidad = lista_roomServices.get(i).getCantidad(); + jPservicio jp; + jp = new jPservicio(id_ser, nombre_ser, precio_ser, cantidad, frame_Servicios); + jPmensajes.add(jp); + } + } + + + + + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBbuscar; + private javax.swing.JLabel jLabel2; + private javax.swing.JPanel jPmensajes; + private javax.swing.JScrollPane jScrollPane3; + private javax.swing.JTextField jTbuscador; + // End of variables declaration//GEN-END:variables +}