├── .gitignore ├── .DS_Store └── ProyectoP03G04 ├── .DS_Store ├── src ├── .DS_Store └── main │ ├── .DS_Store │ ├── resources │ ├── styles │ │ ├── menuprincipal.css │ │ ├── opcionnuevaferia.css │ │ ├── administracionferias.css │ │ ├── administracionstands.css │ │ ├── opcioneditarferia.css │ │ ├── administracionauspiciantes.css │ │ ├── opcionasignarauspiciante.css │ │ ├── opcioneditarauspiciante.css │ │ ├── opcioneditaremprendedor.css │ │ ├── opcionnuevoauspiciante.css │ │ ├── opcionnuevoemprendedor.css │ │ ├── opcionverinformacionferia.css │ │ └── administracionemprendedores.css │ ├── .DS_Store │ ├── ec │ │ ├── .DS_Store │ │ └── edu │ │ │ ├── .DS_Store │ │ │ └── espol │ │ │ ├── .DS_Store │ │ │ └── proyectop03g04 │ │ │ ├── .DS_Store │ │ │ ├── administracionStandsFeria.fxml │ │ │ ├── administracionStands.fxml │ │ │ ├── opcionEditarFeria.fxml │ │ │ ├── opcionEditarEmprendedor.fxml │ │ │ ├── opcionEditarAuspiciante.fxml │ │ │ ├── administracionEmprendedores.fxml │ │ │ ├── administracionAuspiciantes.fxml │ │ │ ├── administracionFerias.fxml │ │ │ ├── opcionEditarFeriaFinal.fxml │ │ │ └── menuPrincipal.fxml │ └── imagenes │ │ ├── s.png │ │ ├── .DS_Store │ │ ├── block.png │ │ ├── circo.png │ │ ├── dueno.png │ │ ├── email.png │ │ ├── empre.png │ │ ├── feria.png │ │ ├── grupo.png │ │ ├── lucha.png │ │ ├── lugar.png │ │ ├── redes.png │ │ ├── stand.png │ │ ├── amigos.png │ │ ├── bloqueo.png │ │ ├── candado.png │ │ ├── carrusel.png │ │ ├── cedula.png │ │ ├── codigo.png │ │ ├── fechaFin.png │ │ ├── fechaIni.png │ │ ├── globo2.png │ │ ├── globos.png │ │ ├── horario.png │ │ ├── iconoAus.png │ │ ├── nombre.png │ │ ├── perRes.png │ │ ├── persona.png │ │ ├── salida.png │ │ ├── sitioWeb.png │ │ ├── telefono.png │ │ ├── vendor.png │ │ ├── ausPersona.png │ │ ├── esperando.png │ │ ├── fechaAsig.png │ │ ├── feria (1).png │ │ ├── hotBalloon.png │ │ ├── iconEmpre.png │ │ ├── lockStand.png │ │ ├── auspiciantes.png │ │ ├── descripcion.png │ │ ├── descripcion1.png │ │ ├── emprendedores.png │ │ ├── lockOficial.png │ │ ├── nombrePersona.png │ │ ├── standOficial.png │ │ ├── parque-tematico.png │ │ ├── sponsor_mostrar.png │ │ ├── carousel_5593709.png │ │ ├── emprendedorMostrar.png │ │ ├── personaEmprendedor.png │ │ ├── circus-tent_8795882.png │ │ ├── cyber-attack_3055960.png │ │ └── rueda-de-la-fortuna.png │ └── java │ ├── module-info.java │ ├── excepciones │ ├── DescVacia.java │ ├── MaximoStands.java │ ├── NoExisteFeria.java │ ├── NoExistePersona.java │ ├── FechaVacia.java │ ├── FormatoTextoMalo.java │ ├── StringVacio.java │ ├── PersonaConEsaCedula.java │ ├── AuspicianteMaximoStands.java │ ├── EmprendedorMaximoStands.java │ ├── AuspicianteNoIncluyeStand.java │ └── FechaNoPuedeSerDespues.java │ ├── modelo │ ├── SC.java │ ├── R.java │ ├── RedSocial.java │ ├── EmprendedorEnFeria.java │ ├── Auspiciante.java │ ├── AuspicianteEnFeria.java │ ├── Stand.java │ ├── Emprendedor.java │ ├── Persona.java │ ├── OrganizacionStands.java │ ├── Utilitaria.java │ └── Feria.java │ └── ec │ └── edu │ └── espol │ └── proyectop03g04 │ ├── RunMain.java │ ├── MenuPrincipalController.java │ ├── AdministracionEmprendedoresController.java │ ├── AdministracionAuspiciantesController.java │ ├── OpcionNuevaFeriaController.java │ ├── App.java │ ├── AdministracionFeriasController.java │ ├── OpcionNuevoEmprendedorController.java │ └── OpcionAsignarAuspiciantesController.java ├── feriasArchivo.dat ├── auspiciantesArchivo.dat ├── emprendedoresArchivo.dat ├── nbactions.xml └── pom.xml /.gitignore: -------------------------------------------------------------------------------- 1 | /ProyectoP03G04/target/ 2 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/.DS_Store -------------------------------------------------------------------------------- /ProyectoP03G04/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/.DS_Store -------------------------------------------------------------------------------- /ProyectoP03G04/src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/.DS_Store -------------------------------------------------------------------------------- /ProyectoP03G04/feriasArchivo.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/feriasArchivo.dat -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/.DS_Store -------------------------------------------------------------------------------- /ProyectoP03G04/auspiciantesArchivo.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/auspiciantesArchivo.dat -------------------------------------------------------------------------------- /ProyectoP03G04/emprendedoresArchivo.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/emprendedoresArchivo.dat -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/styles/menuprincipal.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Empty Stylesheet file. 3 | */ 4 | 5 | .mainFxmlClass { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/styles/opcionnuevaferia.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Empty Stylesheet file. 3 | */ 4 | 5 | .mainFxmlClass { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/.DS_Store -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/styles/administracionferias.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Empty Stylesheet file. 3 | */ 4 | 5 | .mainFxmlClass { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/styles/administracionstands.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Empty Stylesheet file. 3 | */ 4 | 5 | .mainFxmlClass { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/styles/opcioneditarferia.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Empty Stylesheet file. 3 | */ 4 | 5 | .mainFxmlClass { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/ec/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/ec/.DS_Store -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/styles/administracionauspiciantes.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Empty Stylesheet file. 3 | */ 4 | 5 | .mainFxmlClass { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/styles/opcionasignarauspiciante.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Empty Stylesheet file. 3 | */ 4 | 5 | .mainFxmlClass { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/styles/opcioneditarauspiciante.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Empty Stylesheet file. 3 | */ 4 | 5 | .mainFxmlClass { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/styles/opcioneditaremprendedor.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Empty Stylesheet file. 3 | */ 4 | 5 | .mainFxmlClass { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/styles/opcionnuevoauspiciante.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Empty Stylesheet file. 3 | */ 4 | 5 | .mainFxmlClass { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/styles/opcionnuevoemprendedor.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Empty Stylesheet file. 3 | */ 4 | 5 | .mainFxmlClass { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/styles/opcionverinformacionferia.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Empty Stylesheet file. 3 | */ 4 | 5 | .mainFxmlClass { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/ec/edu/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/ec/edu/.DS_Store -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/s.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/styles/administracionemprendedores.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Empty Stylesheet file. 3 | */ 4 | 5 | .mainFxmlClass { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/.DS_Store -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/block.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/circo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/circo.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/dueno.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/dueno.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/email.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/empre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/empre.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/feria.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/feria.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/grupo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/grupo.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/lucha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/lucha.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/lugar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/lugar.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/redes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/redes.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/stand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/stand.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/amigos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/amigos.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/bloqueo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/bloqueo.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/candado.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/candado.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/carrusel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/carrusel.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/cedula.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/cedula.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/codigo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/codigo.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/fechaFin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/fechaFin.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/fechaIni.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/fechaIni.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/globo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/globo2.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/globos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/globos.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/horario.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/horario.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/iconoAus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/iconoAus.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/nombre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/nombre.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/perRes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/perRes.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/persona.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/persona.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/salida.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/salida.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/sitioWeb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/sitioWeb.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/telefono.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/telefono.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/vendor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/vendor.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/ec/edu/espol/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/ec/edu/espol/.DS_Store -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/ausPersona.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/ausPersona.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/esperando.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/esperando.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/fechaAsig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/fechaAsig.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/feria (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/feria (1).png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/hotBalloon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/hotBalloon.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/iconEmpre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/iconEmpre.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/lockStand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/lockStand.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/auspiciantes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/auspiciantes.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/descripcion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/descripcion.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/descripcion1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/descripcion1.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/emprendedores.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/emprendedores.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/lockOficial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/lockOficial.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/nombrePersona.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/nombrePersona.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/standOficial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/standOficial.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/parque-tematico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/parque-tematico.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/sponsor_mostrar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/sponsor_mostrar.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/carousel_5593709.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/carousel_5593709.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/emprendedorMostrar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/emprendedorMostrar.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/personaEmprendedor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/personaEmprendedor.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/circus-tent_8795882.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/circus-tent_8795882.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/cyber-attack_3055960.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/cyber-attack_3055960.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/imagenes/rueda-de-la-fortuna.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/imagenes/rueda-de-la-fortuna.png -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/ec/edu/espol/proyectop03g04/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isabellaim/POO-P03-G04/HEAD/ProyectoP03G04/src/main/resources/ec/edu/espol/proyectop03g04/.DS_Store -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module ec.edu.espol.proyectop03g04 { 2 | requires javafx.controls; 3 | requires javafx.fxml; 4 | requires java.base; 5 | 6 | opens ec.edu.espol.proyectop03g04 to javafx.fxml; 7 | exports ec.edu.espol.proyectop03g04; 8 | } 9 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/excepciones/DescVacia.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package excepciones; 6 | 7 | /** 8 | * 9 | * @author asala 10 | */ 11 | public class DescVacia extends Exception { 12 | 13 | public DescVacia(String msg) { 14 | super(msg); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/modelo/SC.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Enum.java to edit this template 4 | */ 5 | package modelo; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * 11 | * @author isabella 12 | */ 13 | public enum SC implements Serializable{ 14 | ALIMENTACION, EDUCACION, SALUD, VESTIMENTA; 15 | public SC[] getValues() { 16 | return SC.values(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/modelo/R.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Enum.java to edit this template 4 | */ 5 | package modelo; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * 11 | * @author isabella 12 | */ 13 | public enum R implements Serializable{ 14 | 15 | TWITTER, FACEBOOK, INSTAGRAM, TIKTOK, PINTEREST, YOUTUBE, LINKEDIN; 16 | 17 | public R[] getValues() { 18 | return R.values(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/ec/edu/espol/proyectop03g04/RunMain.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit this template 4 | */ 5 | package ec.edu.espol.proyectop03g04; 6 | 7 | /** 8 | * 9 | * @author isabella 10 | */ 11 | public class RunMain { 12 | 13 | /** 14 | * @param args the command line arguments 15 | */ 16 | public static void main(String[] args) { 17 | // TODO code application logic here 18 | App.main(args); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/excepciones/MaximoStands.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Exception.java to edit this template 4 | */ 5 | package excepciones; 6 | 7 | /** 8 | * 9 | * @author isabella 10 | */ 11 | public class MaximoStands extends Exception { 12 | 13 | /** 14 | * Creates a new instance of MaximoStands without detail 15 | * message. 16 | */ 17 | public MaximoStands() { 18 | } 19 | 20 | /** 21 | * Constructs an instance of MaximoStands with the specified 22 | * detail message. 23 | * 24 | * @param msg the detail message. 25 | */ 26 | public MaximoStands(String msg) { 27 | super(msg); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/excepciones/NoExisteFeria.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Exception.java to edit this template 4 | */ 5 | package excepciones; 6 | 7 | /** 8 | * 9 | * @author isabella 10 | */ 11 | public class NoExisteFeria extends Exception { 12 | 13 | /** 14 | * Creates a new instance of NoExisteFeria without detail 15 | * message. 16 | */ 17 | public NoExisteFeria() { 18 | } 19 | 20 | /** 21 | * Constructs an instance of NoExisteFeria with the specified 22 | * detail message. 23 | * 24 | * @param msg the detail message. 25 | */ 26 | public NoExisteFeria(String msg) { 27 | super(msg); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/excepciones/NoExistePersona.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Exception.java to edit this template 4 | */ 5 | package excepciones; 6 | 7 | /** 8 | * 9 | * @author isabella 10 | */ 11 | public class NoExistePersona extends Exception { 12 | 13 | /** 14 | * Creates a new instance of NoExistePersona without detail 15 | * message. 16 | */ 17 | public NoExistePersona() { 18 | } 19 | 20 | /** 21 | * Constructs an instance of NoExistePersona with the specified 22 | * detail message. 23 | * 24 | * @param msg the detail message. 25 | */ 26 | public NoExistePersona(String msg) { 27 | super(msg); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/excepciones/FechaVacia.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Exception.java to edit this template 4 | */ 5 | package excepciones; 6 | 7 | /** 8 | * 9 | * @author isabella 10 | */ 11 | public class FechaVacia extends Exception { 12 | 13 | /** 14 | * Creates a new instance of FechaVacia without detail message. 15 | */ 16 | public FechaVacia() { 17 | super("No se escogió una fecha"); 18 | } 19 | 20 | /** 21 | * Constructs an instance of FechaVacia with the specified 22 | * detail message. 23 | * 24 | * @param msg the detail message. 25 | */ 26 | public FechaVacia(String msg) { 27 | super(msg); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/excepciones/FormatoTextoMalo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Exception.java to edit this template 4 | */ 5 | package excepciones; 6 | 7 | /** 8 | * 9 | * @author isabella 10 | */ 11 | public class FormatoTextoMalo extends Exception { 12 | 13 | /** 14 | * Creates a new instance of FormatoTextoMalo without detail 15 | * message. 16 | */ 17 | public FormatoTextoMalo() { 18 | } 19 | 20 | /** 21 | * Constructs an instance of FormatoTextoMalo with the 22 | * specified detail message. 23 | * 24 | * @param msg the detail message. 25 | */ 26 | public FormatoTextoMalo(String msg) { 27 | super(msg); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/excepciones/StringVacio.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Exception.java to edit this template 4 | */ 5 | package excepciones; 6 | 7 | /** 8 | * 9 | * @author isabella 10 | */ 11 | public class StringVacio extends Exception { 12 | 13 | /** 14 | * Creates a new instance of StringVacio without detail 15 | * message. 16 | */ 17 | public StringVacio() { 18 | super("El string está vacío"); 19 | } 20 | 21 | /** 22 | * Constructs an instance of StringVacio with the specified 23 | * detail message. 24 | * 25 | * @param msg the detail message. 26 | */ 27 | public StringVacio(String msg) { 28 | super(msg); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/excepciones/PersonaConEsaCedula.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Exception.java to edit this template 4 | */ 5 | package excepciones; 6 | 7 | /** 8 | * 9 | * @author isabella 10 | */ 11 | public class PersonaConEsaCedula extends Exception { 12 | 13 | /** 14 | * Creates a new instance of PersonaConEsaCedula without detail 15 | * message. 16 | */ 17 | public PersonaConEsaCedula() { 18 | } 19 | 20 | /** 21 | * Constructs an instance of PersonaConEsaCedula with the 22 | * specified detail message. 23 | * 24 | * @param msg the detail message. 25 | */ 26 | public PersonaConEsaCedula(String msg) { 27 | super(msg); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/excepciones/AuspicianteMaximoStands.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Exception.java to edit this template 4 | */ 5 | package excepciones; 6 | 7 | /** 8 | * 9 | * @author isabella 10 | */ 11 | public class AuspicianteMaximoStands extends Exception { 12 | 13 | /** 14 | * Creates a new instance of AuspicianteMaximoStands without 15 | * detail message. 16 | */ 17 | public AuspicianteMaximoStands() { 18 | } 19 | 20 | /** 21 | * Constructs an instance of AuspicianteMaximoStands with the 22 | * specified detail message. 23 | * 24 | * @param msg the detail message. 25 | */ 26 | public AuspicianteMaximoStands(String msg) { 27 | super(msg); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/excepciones/EmprendedorMaximoStands.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Exception.java to edit this template 4 | */ 5 | package excepciones; 6 | 7 | /** 8 | * 9 | * @author isabella 10 | */ 11 | public class EmprendedorMaximoStands extends Exception { 12 | 13 | /** 14 | * Creates a new instance of EmprendedorMaximoStands without 15 | * detail message. 16 | */ 17 | public EmprendedorMaximoStands() { 18 | } 19 | 20 | /** 21 | * Constructs an instance of EmprendedorMaximoStands with the 22 | * specified detail message. 23 | * 24 | * @param msg the detail message. 25 | */ 26 | public EmprendedorMaximoStands(String msg) { 27 | super(msg); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/excepciones/AuspicianteNoIncluyeStand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Exception.java to edit this template 4 | */ 5 | package excepciones; 6 | 7 | /** 8 | * 9 | * @author isabella 10 | */ 11 | public class AuspicianteNoIncluyeStand extends Exception{ 12 | 13 | /** 14 | * Creates a new instance of AuspicianteNoIncluyeStand without 15 | * detail message. 16 | */ 17 | public AuspicianteNoIncluyeStand() { 18 | } 19 | 20 | /** 21 | * Constructs an instance of AuspicianteNoIncluyeStand with the 22 | * specified detail message. 23 | * 24 | * @param msg the detail message. 25 | */ 26 | public AuspicianteNoIncluyeStand(String msg) { 27 | super(msg); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/excepciones/FechaNoPuedeSerDespues.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Exception.java to edit this template 4 | */ 5 | package excepciones; 6 | 7 | /** 8 | * 9 | * @author isabella 10 | */ 11 | public class FechaNoPuedeSerDespues extends Exception { 12 | 13 | /** 14 | * Creates a new instance of FechaNoPuedeSerDespues without 15 | * detail message. 16 | */ 17 | public FechaNoPuedeSerDespues() { 18 | super("La fecha de inicio no puede ser despues de la de fin"); 19 | } 20 | 21 | /** 22 | * Constructs an instance of FechaNoPuedeSerDespues with the 23 | * specified detail message. 24 | * 25 | * @param msg the detail message. 26 | */ 27 | public FechaNoPuedeSerDespues(String msg) { 28 | super(msg); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/modelo/RedSocial.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package modelo; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * 11 | * @author isabella 12 | */ 13 | public class RedSocial implements Serializable { 14 | private String cuenta; 15 | private R redSocial; 16 | 17 | // Constructor de clase RedSocial 18 | 19 | public RedSocial(String cuenta, R redSocial){ 20 | this.cuenta = cuenta; 21 | this.redSocial = redSocial; 22 | } 23 | 24 | public R[] getValues() { 25 | return R.values(); 26 | } 27 | 28 | public R getR(){ 29 | return redSocial; 30 | } 31 | 32 | public String getCuenta() { 33 | return cuenta; 34 | } 35 | 36 | // Metodo toString() de la clase RedSocial 37 | public String toString(){ 38 | return "Cuenta: " + cuenta + " -- Red social: " + redSocial.toString(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/modelo/EmprendedorEnFeria.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package modelo; 6 | import java.io.Serializable; 7 | import java.util.*; 8 | /** 9 | * 10 | * @author isabella 11 | */ 12 | public class EmprendedorEnFeria implements Serializable{ 13 | private Emprendedor emprendedor; 14 | private Stand standAsignado; 15 | private String seccion; 16 | 17 | // Contructor de la clase AuspicianteEnFeria 18 | public EmprendedorEnFeria(Emprendedor emp, Stand sA, String seccion){ 19 | this.emprendedor = emp; 20 | this.standAsignado = sA; 21 | this.seccion = seccion; 22 | } 23 | 24 | // Getters 25 | 26 | public Emprendedor getEmprendedor(){ 27 | return emprendedor; 28 | } 29 | public Stand getStandAsignado(){ 30 | return standAsignado; 31 | } 32 | public String getSeccion(){ 33 | return seccion; 34 | } 35 | 36 | // Setters 37 | 38 | public void setAus(Emprendedor emp){ 39 | this.emprendedor = emp; 40 | } 41 | public void setStandAsignado(Stand stand){ 42 | this.standAsignado = stand; 43 | } 44 | 45 | public String toString(){ 46 | return emprendedor.getNombre(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /ProyectoP03G04/nbactions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | run 5 | 6 | jar 7 | 8 | 9 | clean 10 | javafx:run 11 | 12 | 13 | 14 | debug 15 | 16 | clean 17 | javafx:run@ide-debug 18 | 19 | 20 | true 21 | 22 | 23 | 24 | profile 25 | 26 | clean 27 | javafx:run@ide-profile 28 | 29 | 30 | 31 | CUSTOM-jlink 32 | jlink 33 | 34 | clean 35 | 36 | compile 37 | javafx:jlink 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/modelo/Auspiciante.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package modelo; 6 | import java.io.Serializable; 7 | import java.util.*; 8 | /** 9 | * 10 | * @author isabella 11 | */ 12 | public class Auspiciante extends Persona implements Serializable { 13 | private ArrayList sectores; 14 | 15 | // Constructor de la clase Auspiciante 16 | 17 | public Auspiciante(String cedula, String nombre, String nombrePersona, String telefono, String email, String direccion, String sitioWeb, ArrayList redesSociales, ArrayList sectores){ 18 | super(cedula, nombre, nombrePersona, telefono, email, direccion, sitioWeb, redesSociales); 19 | this.sectores = sectores; 20 | } 21 | 22 | 23 | public SC[] getValues() { 24 | return SC.values(); 25 | } 26 | 27 | // Getters 28 | 29 | public ArrayList getSectores(){ 30 | return sectores; 31 | } 32 | 33 | // Setters 34 | 35 | public void setSectores(ArrayList sectores){ 36 | this.sectores = sectores; 37 | } 38 | 39 | // Método toString() de la clase Auspiciante 40 | 41 | public String toString(){ 42 | String string1 = super.toString() + "\n8. Sectores cubiertos: \n-------------------"; 43 | String string2 = ""; 44 | for(SC sector: sectores){ 45 | string2 = string2 + "\n>>> " + sector.toString(); 46 | } 47 | return string1 + string2; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/modelo/AuspicianteEnFeria.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package modelo; 6 | import java.io.Serializable; 7 | import java.util.*; 8 | /** 9 | * 10 | * @author isabella 11 | */ 12 | public class AuspicianteEnFeria implements Serializable { 13 | private Auspiciante aus; 14 | private String descripcion; 15 | private boolean incluyeStand; 16 | private ArrayList standsAsignados; 17 | 18 | // Contructor de la clase AuspicianteEnFeria 19 | public AuspicianteEnFeria(Auspiciante aus, String descripcion, boolean incluyeStand){ 20 | this.aus = aus; 21 | this.descripcion = descripcion; 22 | this.incluyeStand = incluyeStand; 23 | if(incluyeStand){ 24 | standsAsignados = new ArrayList<>(); 25 | } 26 | } 27 | 28 | // Getters 29 | 30 | public Auspiciante getAus(){ 31 | return aus; 32 | } 33 | public String getDescripcion(){ 34 | return descripcion; 35 | } 36 | public boolean getIncluyeStand(){ 37 | return incluyeStand; 38 | } 39 | public ArrayList getStandsAsignados(){ 40 | return standsAsignados; 41 | } 42 | 43 | // Setters 44 | 45 | public void setAus(Auspiciante aus){ 46 | this.aus = aus; 47 | } 48 | public void setDescripcion(String descripcion){ 49 | this.descripcion = descripcion; 50 | } 51 | public void setIncluyeStand(boolean incluyeStand){ 52 | this.incluyeStand = incluyeStand; 53 | } 54 | public void setStandsAsignados(ArrayList stands){ 55 | this.standsAsignados = stands; 56 | } 57 | public String toString(){ 58 | return aus.getNombre(); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/modelo/Stand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package modelo; 6 | 7 | import java.io.Serializable; 8 | import java.time.LocalDate; 9 | 10 | /** 11 | * 12 | * @author isabella 13 | */ 14 | public class Stand implements Serializable{ 15 | private String codigoStand; 16 | private LocalDate fechaAsig; 17 | private Persona dueno; 18 | private boolean reservado; 19 | 20 | // Constructor de la clase Stand 21 | 22 | public Stand(String codigoStand){ 23 | this.codigoStand = codigoStand; 24 | this.fechaAsig = null; 25 | this.dueno = null; 26 | this.reservado=false; 27 | } 28 | 29 | // Getters 30 | 31 | public String getCodigoStand(){ 32 | return codigoStand; 33 | } 34 | 35 | public LocalDate getFechaAsig(){ 36 | return fechaAsig; 37 | } 38 | 39 | public Persona getDueno(){ 40 | return dueno; 41 | } 42 | 43 | public boolean getReservado(){ 44 | return reservado; 45 | } 46 | 47 | // Setters 48 | 49 | public void setCodigoStand(String codigoStand){ 50 | this.codigoStand = codigoStand; 51 | } 52 | 53 | public void setFechaAsig(LocalDate fechaAsig){ 54 | this.fechaAsig = fechaAsig; 55 | } 56 | 57 | public void setDueno(Persona dueno){ 58 | this.dueno = dueno; 59 | if(dueno instanceof Emprendedor){ 60 | Emprendedor emp = (Emprendedor) dueno; 61 | emp.getStandsEmpre().add(this); 62 | } 63 | } 64 | 65 | public void setReservado(boolean reservado){ 66 | this.reservado = reservado; 67 | } 68 | 69 | // Método toString() de Stand 70 | 71 | @Override 72 | public String toString() { 73 | if(dueno instanceof Emprendedor){ 74 | Emprendedor emp = (Emprendedor) dueno; 75 | return "Codigo del stand: " + codigoStand + "\nFecha de asignación: " + fechaAsig + "\nInformación del emprendedor: " + emp; 76 | } 77 | 78 | else if(dueno instanceof Auspiciante) { 79 | Auspiciante aus = (Auspiciante) dueno; 80 | return "Codigo del stand: " + codigoStand + "\nFecha de asignación: " + fechaAsig + "\nInformación del emprendedor: " + aus; 81 | } 82 | return null; 83 | } 84 | 85 | // Método útil para mostrar qué Stand está reservado o no 86 | 87 | public String verStandReser() { 88 | if (reservado){ 89 | return "[" + codigoStand + "*]"; 90 | } 91 | return "[" + codigoStand + "]"; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/modelo/Emprendedor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package modelo; 6 | import java.io.Serializable; 7 | import java.util.*; 8 | /** 9 | * 10 | * @author isabella 11 | */ 12 | public class Emprendedor extends Persona implements Serializable{ 13 | private String descripcion; 14 | private ArrayList standsEmpre; 15 | 16 | // Constructor de clase Emprendedor 17 | 18 | public Emprendedor(String cedula, String nombre, String nombrePersona, String telefono, String email, String direccion, String sitioWeb, ArrayList redesSociales, String descrip){ 19 | 20 | super(cedula, nombre, nombrePersona, telefono, email, direccion, sitioWeb, redesSociales); 21 | this.descripcion = descrip; 22 | this.standsEmpre = new ArrayList<>(); 23 | } 24 | 25 | // Getters 26 | 27 | public String getDescripcion(){ 28 | return descripcion; 29 | } 30 | 31 | public ArrayList getStandsEmpre(){ 32 | return standsEmpre; 33 | } 34 | 35 | // Setters 36 | 37 | public void setDescripcion(String descripcion){ 38 | this.descripcion = descripcion; 39 | } 40 | 41 | // Método toString() de la clase Emprendedor 42 | 43 | public String toString(){ 44 | return super.toString() + "\n8. Descripción: " + descripcion; 45 | } 46 | 47 | 48 | // Método útil para ver información de Emprendedor en Feria 49 | public String verEmpreFer(){ 50 | String string1 = "Emprendimiento: " + this.getNombre() + ", Descripción: " + this.descripcion + ", Sección: "; 51 | 52 | if (standsEmpre.size() == 1){ 53 | if(standsEmpre.get(0).getCodigoStand().indexOf("A")==0){ 54 | return string1 + "#1"; 55 | } 56 | else if(standsEmpre.get(0).getCodigoStand().indexOf("B")==0){ 57 | return string1 + "#2"; 58 | } 59 | 60 | else if(standsEmpre.get(0).getCodigoStand().indexOf("C")==0){ 61 | return string1 + "#3"; 62 | } 63 | 64 | else if(standsEmpre.get(0).getCodigoStand().indexOf("D")==0){ 65 | return string1 + "#4"; 66 | } 67 | 68 | } 69 | 70 | else if (standsEmpre.size() == 2){ 71 | if(standsEmpre.get(0).getCodigoStand().indexOf("A")==0){ 72 | string1 = string1 + "#1"; 73 | } 74 | else if(standsEmpre.get(0).getCodigoStand().indexOf("B")==0){ 75 | string1 = string1 + "#2"; 76 | } 77 | 78 | else if(standsEmpre.get(0).getCodigoStand().indexOf("C")==0){ 79 | string1 = string1 + "#3"; 80 | } 81 | 82 | else if(standsEmpre.get(0).getCodigoStand().indexOf("D")==0){ 83 | string1 = string1 + "#4"; 84 | } 85 | 86 | if(standsEmpre.get(1).getCodigoStand().indexOf("A")==0){ 87 | string1 = string1 + " y #1"; 88 | } 89 | else if(standsEmpre.get(1).getCodigoStand().indexOf("B")==0){ 90 | string1 = string1 + " y #2"; 91 | } 92 | 93 | else if(standsEmpre.get(1).getCodigoStand().indexOf("C")==0){ 94 | string1 = string1 + " y #3"; 95 | } 96 | 97 | else if(standsEmpre.get(1).getCodigoStand().indexOf("D")==0){ 98 | string1 = string1 + " y #4"; 99 | } 100 | 101 | return string1; 102 | } 103 | return null; 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/modelo/Persona.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package modelo; 6 | import java.io.Serializable; 7 | import java.util.*; 8 | /** 9 | * 10 | * @author isabella 11 | */ 12 | public class Persona implements Serializable{ 13 | private String cedula; 14 | private String nombre; 15 | private String nombrePersona; 16 | private String telefono; 17 | private String email; 18 | private String direccion; 19 | private String sitioWeb; 20 | private ArrayList redesSociales; 21 | 22 | // Constructor de la clase Persona 23 | 24 | public Persona(String cedula, String nombre, String nombrePersona, String telefono, String email, String direccion, String sitioWeb, ArrayList redesSociales){ 25 | this.cedula = cedula; 26 | this.nombre = nombre; 27 | this.nombrePersona = nombrePersona; 28 | this.telefono = telefono; 29 | this.email = email; 30 | this.direccion = direccion; 31 | this.sitioWeb = sitioWeb; 32 | this.redesSociales = redesSociales; 33 | } 34 | 35 | // Getters 36 | 37 | public String getCedula(){ 38 | return cedula; 39 | } 40 | 41 | public String getNombre(){ 42 | return nombre; 43 | } 44 | 45 | public String getNombrePersona(){ 46 | return nombrePersona; 47 | } 48 | 49 | public String getTelefono(){ 50 | return telefono; 51 | } 52 | 53 | public String getEmail(){ 54 | return email; 55 | } 56 | 57 | public String getDireccion(){ 58 | return direccion; 59 | } 60 | 61 | public String getSitioWeb(){ 62 | return sitioWeb; 63 | } 64 | 65 | public ArrayList getRedesSociales(){ 66 | return redesSociales; 67 | } 68 | 69 | // Setters 70 | 71 | public void setCedula(String cedula){ 72 | this.cedula = cedula; 73 | } 74 | 75 | public void setNombre(String nombre){ 76 | this.nombre = nombre; 77 | } 78 | 79 | public void setNombrePersona(String nombrePersona){ 80 | this.nombrePersona = nombrePersona; 81 | } 82 | 83 | public void setTelefono(String telefono){ 84 | this.telefono = telefono; 85 | } 86 | 87 | public void setEmail(String email){ 88 | this.email = email; 89 | } 90 | 91 | public void setDireccion(String direccion){ 92 | this.direccion = direccion; 93 | } 94 | 95 | public void setSitioWeb(String sitioWeb){ 96 | this.sitioWeb = sitioWeb; 97 | } 98 | 99 | public void setRedesSociales(ArrayList redesSociales){ 100 | this.redesSociales = redesSociales; 101 | } 102 | 103 | // Método toString() de la clase Persona 104 | 105 | public String toString(){ 106 | String string1 = "\n1. Nombre: " + nombre + "\n2. Nombre de la persona responsable: " + nombrePersona + "\n3. Teléfono: " + telefono + "\n4. Email: " + email + "\n5. Dirección: " + direccion + "\n6. Sitio web: " + sitioWeb + "\n7. Redes Sociales: \n---------------"; 107 | String string2 = ""; 108 | for(RedSocial redSocial: redesSociales){ 109 | string2 = "\n" + string2 + ">>> " + redSocial; 110 | } 111 | return string1 + string2; 112 | } 113 | 114 | // Método para ver información general de Persona 115 | public String verPersona(){ 116 | return "Cédula: " + cedula + "\n Nombre: " + nombre + "\n Teléfono: " + telefono + "\n Email: " + email + "\n"; 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/modelo/OrganizacionStands.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package modelo; 6 | import java.io.Serializable; 7 | import java.util.*; 8 | /** 9 | * 10 | * @author isabella 11 | */ 12 | public class OrganizacionStands implements Serializable{ 13 | private int cantStands; 14 | private ArrayList standsPorSeccion; 15 | private int numSeccion; 16 | 17 | // Constructor de la clase OrganizacionStands 18 | 19 | public OrganizacionStands(int cantStands, int numSeccion){ 20 | this.cantStands = cantStands; 21 | this.standsPorSeccion = new ArrayList<>(); 22 | this.numSeccion = numSeccion; 23 | 24 | for (int i = 0; i < cantStands; i++){ 25 | String codigoStand = null; 26 | if(numSeccion==1){ 27 | codigoStand = "A" + (i+1); 28 | standsPorSeccion.add(new Stand(codigoStand)); 29 | } 30 | else if(numSeccion==2){ 31 | codigoStand = "B" + (i+1); 32 | standsPorSeccion.add(new Stand(codigoStand)); 33 | } 34 | else if(numSeccion==3){ 35 | codigoStand = "C" + (i+1); 36 | standsPorSeccion.add(new Stand(codigoStand)); 37 | } 38 | else if(numSeccion==4){ 39 | codigoStand = "D" + (i+1); 40 | standsPorSeccion.add(new Stand(codigoStand)); 41 | } 42 | } 43 | } 44 | 45 | // Getters 46 | 47 | public int getCantStands(){ 48 | return cantStands; 49 | } 50 | 51 | public ArrayList getStandsPorSeccion(){ 52 | return standsPorSeccion; 53 | } 54 | 55 | public int getNumSeccion(){ 56 | return numSeccion; 57 | } 58 | 59 | //Setters 60 | 61 | public void setCantStands(int cantStands, Feria feria){ 62 | this.cantStands = cantStands; 63 | 64 | for(Stand stand: standsPorSeccion){ 65 | stand.setReservado(false); 66 | Persona dueno = stand.getDueno(); 67 | stand.setDueno(null); 68 | stand.setFechaAsig(null); 69 | if(dueno instanceof Emprendedor){ 70 | Emprendedor emp = (Emprendedor) dueno; 71 | for(EmprendedorEnFeria empf: feria.getEmprendedores()){ 72 | if(empf.getEmprendedor().equals(emp)){ 73 | feria.getEmprendedores().remove(empf); 74 | } 75 | } 76 | } 77 | if(dueno instanceof Auspiciante){ 78 | Auspiciante aus = (Auspiciante) dueno; 79 | for(AuspicianteEnFeria ausf: feria.getAuspiciantes()){ 80 | if(ausf.getAus().equals(aus)){ 81 | feria.getAuspiciantes().remove(ausf); 82 | } 83 | } 84 | } 85 | } 86 | standsPorSeccion.clear(); 87 | standsPorSeccion = new ArrayList<>(); 88 | for (int i = 0; i < cantStands; i++){ 89 | String codigoStand = null; 90 | if(numSeccion==1){ 91 | codigoStand = "A" + (i+1); 92 | standsPorSeccion.add(new Stand(codigoStand)); 93 | } 94 | else if(numSeccion==2){ 95 | codigoStand = "B" + (i+1); 96 | standsPorSeccion.add(new Stand(codigoStand)); 97 | } 98 | else if(numSeccion==3){ 99 | codigoStand = "C" + (i+1); 100 | standsPorSeccion.add(new Stand(codigoStand)); 101 | } 102 | else if(numSeccion==4){ 103 | codigoStand = "D" + (i+1); 104 | standsPorSeccion.add(new Stand(codigoStand)); 105 | } 106 | } 107 | 108 | } 109 | public void setStandsPorSeccion(ArrayList standsPorSeccion){ 110 | this.standsPorSeccion = standsPorSeccion; 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/ec/edu/espol/proyectop03g04/administracionStandsFeria.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 44 | 49 | 50 | 51 | 52 | 53 | 54 |
55 | 56 |
57 | 58 | 59 | 60 |
61 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/modelo/Utilitaria.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package modelo; 6 | 7 | import java.io.FileInputStream; 8 | import java.io.FileOutputStream; 9 | import java.io.IOException; 10 | import java.io.ObjectInputStream; 11 | import java.io.ObjectOutputStream; 12 | import java.io.Serializable; 13 | import java.util.ArrayList; 14 | 15 | /** 16 | * 17 | * @author jmuni 18 | */ 19 | public class Utilitaria implements Serializable{ 20 | private static String nameFileFerias = "feriasArchivo.dat"; 21 | private static String nameFileEmprendedores = "emprendedoresArchivo.dat"; 22 | private static String nameFileAuspiciantes = "auspiciantesArchivo.dat"; 23 | private static String nameFileStands = "stands.dat"; 24 | 25 | //Feria 26 | public static ArrayList readListFromFileFeria(){ 27 | ArrayList usuarios = new ArrayList<>(); 28 | try(ObjectInputStream in = new ObjectInputStream(new FileInputStream(Utilitaria.nameFileFerias))){ 29 | usuarios = (ArrayList)in.readObject(); 30 | } 31 | catch(IOException ioe){ 32 | } 33 | catch(ClassNotFoundException c ){ 34 | } 35 | return usuarios; 36 | } 37 | 38 | public static void saveListToFileFeria (ArrayList usuarios) 39 | { 40 | try(ObjectOutputStream out = new ObjectOutputStream (new FileOutputStream(Utilitaria.nameFileFerias))) 41 | { 42 | out.writeObject(usuarios); 43 | } 44 | catch(IOException ioe){ 45 | } 46 | } 47 | 48 | public static void add_feria_file(Feria user){ 49 | if(user != null){ 50 | ArrayList usuarios = readListFromFileFeria(); 51 | usuarios.add(user); 52 | Utilitaria.saveListToFileFeria(usuarios); 53 | } 54 | } 55 | 56 | //Emprendedor 57 | public static ArrayList readListFromFileEmprendedor(){ 58 | ArrayList usuarios = new ArrayList<>(); 59 | try(ObjectInputStream in = new ObjectInputStream(new FileInputStream(Utilitaria.nameFileEmprendedores))){ 60 | usuarios = (ArrayList)in.readObject(); 61 | } 62 | catch(IOException ioe){ 63 | } 64 | catch(ClassNotFoundException c ){ 65 | } 66 | return usuarios; 67 | } 68 | 69 | public static void saveListToFileEmprendedor(ArrayList usuarios) 70 | { 71 | try(ObjectOutputStream out = new ObjectOutputStream (new FileOutputStream(Utilitaria.nameFileEmprendedores))) 72 | { 73 | out.writeObject(usuarios); 74 | } 75 | catch(IOException ioe){ 76 | } 77 | } 78 | 79 | public static void add_emprendedor_file(Emprendedor user){ 80 | if(user != null){ 81 | ArrayList usuarios = readListFromFileEmprendedor(); 82 | usuarios.add(user); 83 | Utilitaria.saveListToFileEmprendedor(usuarios); 84 | } 85 | } 86 | 87 | //Auspiciante 88 | public static ArrayList readListFromFileAuspiciante(){ 89 | ArrayList usuarios = new ArrayList<>(); 90 | try(ObjectInputStream in = new ObjectInputStream(new FileInputStream(Utilitaria.nameFileAuspiciantes))){ 91 | usuarios = (ArrayList)in.readObject(); 92 | } 93 | catch(IOException ioe){ 94 | } 95 | catch(ClassNotFoundException c ){ 96 | } 97 | return usuarios; 98 | } 99 | 100 | public static void saveListToFileAuspiciante (ArrayList usuarios) 101 | { 102 | try(ObjectOutputStream out = new ObjectOutputStream (new FileOutputStream(Utilitaria.nameFileAuspiciantes))) 103 | { 104 | out.writeObject(usuarios); 105 | } 106 | catch(IOException ioe){ 107 | } 108 | } 109 | 110 | public static void add_auspiciante_file(Auspiciante user){ 111 | if(user != null){ 112 | ArrayList usuarios = readListFromFileAuspiciante(); 113 | usuarios.add(user); 114 | Utilitaria.saveListToFileAuspiciante(usuarios); 115 | } 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/ec/edu/espol/proyectop03g04/MenuPrincipalController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/javafx/FXMLController.java to edit this template 4 | */ 5 | package ec.edu.espol.proyectop03g04; 6 | 7 | import java.net.URL; 8 | import java.util.ResourceBundle; 9 | import javafx.fxml.FXML; 10 | import javafx.fxml.Initializable; 11 | 12 | import javafx.scene.control.Button; 13 | import javafx.scene.image.Image; 14 | import javafx.scene.image.ImageView; 15 | import java.io.FileInputStream; 16 | import java.io.FileNotFoundException; 17 | import java.io.IOException; 18 | import java.util.ArrayList; 19 | import javafx.application.Platform; 20 | import javafx.scene.control.Alert; 21 | import javafx.scene.control.Alert.AlertType; 22 | import javafx.scene.control.ButtonType; 23 | import javafx.scene.layout.BorderPane; 24 | import javafx.scene.layout.HBox; 25 | import modelo.Auspiciante; 26 | import modelo.AuspicianteEnFeria; 27 | import modelo.Emprendedor; 28 | import modelo.Feria; 29 | import modelo.R; 30 | import modelo.RedSocial; 31 | import modelo.SC; 32 | import modelo.Stand; 33 | /** 34 | * FXML Controller class 35 | * 36 | * @author isabella 37 | */ 38 | public class MenuPrincipalController implements Initializable { 39 | 40 | 41 | @FXML 42 | private BorderPane bpPrincipal; 43 | @FXML 44 | private HBox hbHeading; 45 | @FXML 46 | private Button btnAdminFeria; 47 | @FXML 48 | private Button btnAdminEmpre; 49 | @FXML 50 | private Button btnAdminAus; 51 | @FXML 52 | private Button btnAdminStands; 53 | @FXML 54 | private Button btnSalir; 55 | @FXML 56 | private ImageView imgHeader1; 57 | @FXML 58 | private ImageView imgHeader2; 59 | @FXML 60 | private ImageView imgAdminFeria; 61 | @FXML 62 | private ImageView imgAdminEmpre; 63 | @FXML 64 | private ImageView imgAdminAus; 65 | @FXML 66 | private ImageView imgAdminStands; 67 | @FXML 68 | private ImageView imgSalir; 69 | /** 70 | * Initializes the controller class. 71 | */ 72 | @Override 73 | public void initialize(URL url, ResourceBundle rb) { 74 | // TODO 75 | Image img1 = new Image("/imagenes/feria.png"); 76 | imgHeader1.setImage(img1); 77 | 78 | Image img2 = new Image("/imagenes/rueda-de-la-fortuna.png"); 79 | imgHeader2.setImage(img2); 80 | 81 | 82 | Image img3 = new Image("/imagenes/parque-tematico.png"); 83 | imgAdminFeria.setImage(img3); 84 | 85 | 86 | Image img4 = new Image("/imagenes/grupo.png"); 87 | imgAdminEmpre.setImage(img4); 88 | 89 | 90 | Image img5 = new Image("/imagenes/lucha.png"); 91 | imgAdminAus.setImage(img5); 92 | 93 | Image img6 = new Image("/imagenes/feria (1).png"); 94 | imgAdminStands.setImage(img6); 95 | 96 | Image img7 = new Image("/imagenes/salida.png"); 97 | imgSalir.setImage(img7); 98 | } 99 | 100 | @FXML 101 | private void clickAdministracionStands() { 102 | try{ 103 | App.setRoot("administracionStands"); 104 | } catch(IOException e){ 105 | e.printStackTrace(); 106 | } 107 | } 108 | 109 | @FXML 110 | private void clickAdministracionFerias() { 111 | try{ 112 | App.setRoot("administracionFerias"); 113 | } catch(IOException e){ 114 | e.printStackTrace(); 115 | } 116 | } 117 | 118 | @FXML 119 | private void clickAdministracionEmprendedores() { 120 | try{ 121 | App.setRoot("administracionEmprendedores"); 122 | } catch(IOException e){ 123 | e.printStackTrace(); 124 | } 125 | } 126 | 127 | @FXML 128 | private void clickAdministracionAuspiciantes() { 129 | try{ 130 | App.setRoot("administracionAuspiciantes"); 131 | } catch(IOException e){ 132 | e.printStackTrace(); 133 | } 134 | } 135 | 136 | @FXML 137 | private void clickSalir() { 138 | Alert alert = new Alert(AlertType.CONFIRMATION); 139 | alert.setTitle(null); 140 | alert.setHeaderText("Está saliendo del programa"); 141 | alert.setContentText("¡Gracias por visitarnos!"); 142 | Button okButton = (Button) alert.getDialogPane().lookupButton(ButtonType.OK); 143 | okButton.setOnAction(event -> { 144 | Platform.exit(); 145 | }); 146 | alert.showAndWait(); 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/ec/edu/espol/proyectop03g04/administracionStands.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 47 | 48 | 49 | 50 | 55 | 56 | 57 | 58 | 59 | 60 |
61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |
71 | 72 | 73 | 74 |
75 | -------------------------------------------------------------------------------- /ProyectoP03G04/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | ec.edu.espol 5 | ProyectoP03G04 6 | 1.0-SNAPSHOT 7 | 8 | UTF-8 9 | 11 10 | 11 11 | 12 | 13 | 14 | org.openjfx 15 | javafx-controls 16 | 20 17 | 18 | 19 | org.openjfx 20 | javafx-fxml 21 | 20 22 | 23 | 24 | 25 | 26 | 27 | org.apache.maven.plugins 28 | maven-compiler-plugin 29 | 3.8.0 30 | 31 | 11 32 | 33 | 34 | 35 | org.openjfx 36 | javafx-maven-plugin 37 | 0.0.4 38 | 39 | ec.edu.espol.proyectop03g04.RunMain 40 | 41 | 42 | 43 | 44 | 45 | default-cli 46 | 47 | 48 | 49 | 50 | debug 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | ide-debug 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | ide-profile 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | org.apache.maven.plugins 84 | maven-dependency-plugin 85 | 86 | ${project.build.directory}/lib 87 | false 88 | false 89 | 90 | 91 | 92 | copy-dependencies 93 | package 94 | 95 | copy-dependencies 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | org.apache.maven.plugins 104 | maven-jar-plugin 105 | 2.4 106 | 107 | 108 | 109 | true 110 | lib/ 111 | ec.edu.espol.proyectop03g04.RunMain 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/ec/edu/espol/proyectop03g04/opcionEditarFeria.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | 53 | 58 | 59 | 60 | 61 | 62 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |
84 |
85 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/ec/edu/espol/proyectop03g04/opcionEditarEmprendedor.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | 53 | 58 | 59 | 60 | 61 | 62 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |
84 |
85 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/ec/edu/espol/proyectop03g04/opcionEditarAuspiciante.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | 53 | 58 | 59 | 60 | 61 | 62 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |
84 |
85 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/modelo/Feria.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package modelo; 6 | import ec.edu.espol.proyectop03g04.AdministracionFeriasController; 7 | import java.io.Serializable; 8 | import java.util.*; 9 | import java.time.LocalDate; 10 | 11 | /** 12 | * 13 | * @author isabella 14 | */ 15 | public class Feria implements Comparable, Serializable { 16 | private String codigo; 17 | private String nombre; 18 | private LocalDate fechaIni; 19 | private LocalDate fechaFin; 20 | private String lugar; 21 | private String descripcion; 22 | private String horario; 23 | private ArrayList emprendedores; 24 | private ArrayList auspiciantes; 25 | private OrganizacionStands seccion1; 26 | private OrganizacionStands seccion2; 27 | private OrganizacionStands seccion3; 28 | private OrganizacionStands seccion4; 29 | 30 | // Constructor de la clase Feria 31 | 32 | public Feria(String nombre, LocalDate fechaIni, LocalDate fechaFin, String lugar, String descripcion, String horario, int cntSec1, int cntSec2, int cntSec3, int cntSec4) { 33 | 34 | this.codigo = "F" + (AdministracionFeriasController.ferias.size() + 1); 35 | this.nombre = nombre; 36 | this.fechaIni = fechaIni; 37 | this.fechaFin = fechaFin; 38 | this.lugar = lugar; 39 | this. descripcion = descripcion; 40 | this.horario = horario; 41 | this.emprendedores = new ArrayList<>(); 42 | this.auspiciantes = new ArrayList<>(); 43 | this.seccion1 = new OrganizacionStands(cntSec1,1); 44 | this.seccion2 = new OrganizacionStands(cntSec2,2); 45 | this.seccion3 = new OrganizacionStands(cntSec3,3); 46 | this.seccion4 = new OrganizacionStands(cntSec4,4); 47 | } 48 | 49 | // Método toString() de la clase Feria 50 | 51 | public String toString() { 52 | String string1 = "Nombre: " + nombre + "\nDescripción: " + descripcion + "\nLugar: " + lugar + "\nFecha de inicio: " + fechaIni + "\nFecha de fin: " + fechaFin + "\nHorario: " + horario + "\nLista de auspiciantes: "; 53 | 54 | String string2 = null; 55 | for (AuspicianteEnFeria ausF: auspiciantes) { 56 | string2 = "\n>>> " + ausF; 57 | } 58 | String string3 = "\nCantidad de stands en sección 1: " + seccion1.getCantStands() + "\nCantidad de stands en sección 2: " + seccion2.getCantStands() + "\nCantidad de stands en sección 3: " + seccion3.getCantStands() + "\nCantidad de stands en sección 4: " + seccion4.getCantStands(); 59 | 60 | return string1 + string2 + string3; 61 | } 62 | 63 | // Método útil para mostrar Feria 64 | 65 | public String verInfoFeria() { 66 | return "Código: " + codigo + "\n Nombre: " + nombre + "\n Fecha de inicio: " + fechaIni + "\n Lugar: " + lugar + "\n Cantidad de auspiciantes: " + auspiciantes.size(); 67 | } 68 | 69 | // Metodo util para ver informacion general de la feria 70 | public String verInfoGeneralFeria() { 71 | return "\n1. Nombre: " + nombre + "\n2. Descripción: " + descripcion + "\n3. Lugar: " + lugar + "\n4. Fecha de inicio: " + fechaIni + "\n5. Fecha de fin: " + fechaFin + "\n6. Horario: " + horario; 72 | } 73 | 74 | // Getters 75 | 76 | public String getCodigo() { 77 | return codigo; 78 | } 79 | 80 | public String getNombre() { 81 | return nombre; 82 | } 83 | 84 | public LocalDate getFechaIni() { 85 | return fechaIni; 86 | } 87 | 88 | public LocalDate getFechaFin() { 89 | return fechaFin; 90 | } 91 | 92 | public String getLugar() { 93 | return lugar; 94 | } 95 | 96 | public String getDescripcion() { 97 | return descripcion; 98 | } 99 | 100 | public String getHorario() { 101 | return horario; 102 | } 103 | 104 | public ArrayList getEmprendedores() { 105 | return emprendedores; 106 | } 107 | 108 | public ArrayList getAuspiciantes() { 109 | return auspiciantes; 110 | } 111 | 112 | public OrganizacionStands getSeccion1() { 113 | return seccion1; 114 | } 115 | 116 | public OrganizacionStands getSeccion2() { 117 | return seccion2; 118 | } 119 | 120 | public OrganizacionStands getSeccion3() { 121 | return seccion3; 122 | } 123 | 124 | public OrganizacionStands getSeccion4() { 125 | return seccion4; 126 | } 127 | 128 | 129 | // Setters 130 | 131 | public void setNombre(String nombre) { 132 | this.nombre = nombre; 133 | } 134 | 135 | public void setFechaIni(LocalDate fechaIni) { 136 | this.fechaIni = fechaIni; 137 | } 138 | 139 | public void setFechaFin(LocalDate fechaFin) { 140 | this.fechaFin = fechaFin; 141 | } 142 | 143 | public void setLugar(String lugar) { 144 | this.lugar = lugar; 145 | } 146 | 147 | public void setDescripcion(String descripcion) { 148 | this.descripcion = descripcion; 149 | } 150 | 151 | public void setHorario(String horario) { 152 | this.horario = horario; 153 | } 154 | 155 | public void setEmprendedores(ArrayList emp) { 156 | this.emprendedores = emp; 157 | } 158 | 159 | public void setAuspiciantes(ArrayList aus) { 160 | this.auspiciantes = aus; 161 | } 162 | 163 | public void setSeccion1(OrganizacionStands seccion1) { 164 | this.seccion1 = seccion1; 165 | } 166 | 167 | public void setSeccion2(OrganizacionStands seccion2) { 168 | this.seccion2 = seccion2; 169 | } 170 | 171 | public void setSeccion3(OrganizacionStands seccion3) { 172 | this.seccion3 = seccion3; 173 | } 174 | 175 | public void setSeccion4(OrganizacionStands seccion4) { 176 | this.seccion4 = seccion4; 177 | } 178 | 179 | @Override 180 | public int compareTo(Feria o){ 181 | return o.getFechaIni().compareTo(fechaIni); 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/ec/edu/espol/proyectop03g04/administracionEmprendedores.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 | 47 | 48 | 49 | 50 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 78 | 79 | 80 | 81 | 82 | 87 | 88 | 89 | 94 | 99 | 100 | 101 | 106 | 107 | 108 | 109 | 110 | 111 |
112 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/ec/edu/espol/proyectop03g04/AdministracionEmprendedoresController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/javafx/FXMLController.java to edit this template 4 | */ 5 | package ec.edu.espol.proyectop03g04; 6 | 7 | import java.util.*; 8 | import modelo.*; 9 | import java.io.FileInputStream; 10 | import java.io.FileNotFoundException; 11 | import java.io.IOException; 12 | import java.net.URL; 13 | import java.util.ResourceBundle; 14 | import javafx.event.ActionEvent; 15 | import javafx.fxml.FXML; 16 | import javafx.fxml.Initializable; 17 | import javafx.geometry.Pos; 18 | import javafx.scene.control.Button; 19 | import javafx.scene.control.Label; 20 | import javafx.scene.image.Image; 21 | import javafx.scene.image.ImageView; 22 | import javafx.scene.layout.Border; 23 | import javafx.scene.layout.BorderPane; 24 | import javafx.scene.layout.BorderStroke; 25 | import javafx.scene.layout.BorderStrokeStyle; 26 | import javafx.scene.layout.BorderWidths; 27 | import javafx.scene.layout.CornerRadii; 28 | import javafx.scene.layout.HBox; 29 | import javafx.scene.layout.VBox; 30 | import javafx.scene.text.Font; 31 | import javafx.scene.control.ScrollPane; 32 | 33 | /** 34 | * FXML Controller class 35 | * 36 | * @author isabella 37 | */ 38 | public class AdministracionEmprendedoresController implements Initializable { 39 | 40 | public static ArrayList emprendedores = Utilitaria.readListFromFileEmprendedor(); 41 | @FXML 42 | private BorderPane bpAdminEmprendedores; 43 | @FXML 44 | private HBox hbHeading; 45 | @FXML 46 | private Button btnRegresar; 47 | @FXML 48 | private ImageView imgHeader2; 49 | @FXML 50 | private VBox vbEmprendedores; 51 | @FXML 52 | private Label lblEmprendedorEscogido; 53 | @FXML 54 | private Button btnNuevoEmprendedor; 55 | @FXML 56 | private Button btnEditarEmprendedor; 57 | 58 | public static Emprendedor emprendedorEscogido; 59 | /** 60 | * Initializes the controller class. 61 | */ 62 | @Override 63 | public void initialize(URL url, ResourceBundle rb) { 64 | // TODO 65 | Image img1 = new Image("/imagenes/rueda-de-la-fortuna.png"); 66 | imgHeader2.setImage(img1); 67 | emprendedorEscogido = null; 68 | this.cargarEmprendedores(); 69 | } 70 | 71 | @FXML 72 | private void clickRegresar() { 73 | try{ 74 | App.setRoot("menuPrincipal"); 75 | } catch(IOException e){ 76 | e.printStackTrace(); 77 | } 78 | } 79 | 80 | private void cargarEmprendedores(){ 81 | ArrayList hbs = new ArrayList<>(); 82 | int index = 0; 83 | int numHBoxes = 0; 84 | if(emprendedores.size()%2==0){ 85 | numHBoxes = emprendedores.size()/2; 86 | for(int i=1; i<=numHBoxes;i++){ 87 | HBox hbEmprendedores = new HBox(10); 88 | hbEmprendedores.setPrefWidth(738); 89 | hbEmprendedores.setPrefHeight(219); 90 | hbEmprendedores.setMinWidth(738); 91 | hbEmprendedores.setMinHeight(219); 92 | hbEmprendedores.setMaxWidth(738); 93 | hbEmprendedores.setMaxHeight(219); 94 | hbs.add(hbEmprendedores); 95 | vbEmprendedores.getChildren().add(hbEmprendedores); 96 | } 97 | } else{ 98 | int num = emprendedores.size() + 1; 99 | numHBoxes = num/2; 100 | for(int i=1; i<=numHBoxes;i++){ 101 | HBox hbEmprendedores = new HBox(10); 102 | hbEmprendedores.setPrefWidth(738); 103 | hbEmprendedores.setPrefHeight(219); 104 | hbEmprendedores.setMinWidth(738); 105 | hbEmprendedores.setMinHeight(219); 106 | hbEmprendedores.setMaxWidth(738); 107 | hbEmprendedores.setMaxHeight(219); 108 | hbs.add(hbEmprendedores); 109 | vbEmprendedores.getChildren().add(hbEmprendedores); 110 | } 111 | } 112 | System.out.println(numHBoxes); 113 | 114 | for (Emprendedor emprendedor: emprendedores){ 115 | Image img = new Image("/imagenes/emprendedorMostrar.png"); 116 | ImageView iv = new ImageView(img); 117 | iv.setFitHeight(60); 118 | iv.setFitWidth(60); 119 | VBox vbEmprendedor = new VBox(); 120 | vbEmprendedor.setAlignment(Pos.CENTER); 121 | vbEmprendedor.setSpacing(6); 122 | vbEmprendedor.setPrefHeight(219); 123 | vbEmprendedor.setPrefWidth(364); 124 | Font fontb = Font.font("Arial Rounded MT Bold", 12); 125 | Font fontr = Font.font("Arial Rounded MT", 12); 126 | Button btnSeleccionar = new Button("Seleccionar"); 127 | btnSeleccionar.setFont(fontb); 128 | btnSeleccionar.setStyle("-fx-background-color: indigo; -fx-text-fill: white;"); 129 | Label cedula1 = new Label("Cédula:"); 130 | Label nombre1 = new Label("Nombre:"); 131 | Label telefono1 = new Label("Teléfono:"); 132 | Label email1 = new Label("Email:"); 133 | Label cedula2 = new Label(emprendedor.getCedula()); 134 | Label nombre2 = new Label(emprendedor.getNombre()); 135 | Label telefono2 = new Label(emprendedor.getTelefono()); 136 | Label email2 = new Label(emprendedor.getEmail()); 137 | //. 138 | cedula1.setFont(fontb); 139 | nombre1.setFont(fontb); 140 | telefono1.setFont(fontb); 141 | email1.setFont(fontb); 142 | cedula2.setFont(fontb); 143 | nombre2.setFont(fontb); 144 | telefono2.setFont(fontb); 145 | email2.setFont(fontb); 146 | HBox cedula = new HBox(); 147 | cedula.getChildren().addAll(cedula1,cedula2); 148 | cedula.setSpacing(5); 149 | cedula.setAlignment(Pos.CENTER); 150 | HBox nombre = new HBox(); 151 | nombre.getChildren().addAll(nombre1,nombre2); 152 | nombre.setSpacing(5); 153 | nombre.setAlignment(Pos.CENTER); 154 | HBox telefono = new HBox(); 155 | telefono.getChildren().addAll(telefono1,telefono2); 156 | telefono.setSpacing(5); 157 | telefono.setAlignment(Pos.CENTER); 158 | HBox email = new HBox(); 159 | email.getChildren().addAll(email1,email2); 160 | email.setSpacing(5); 161 | email.setAlignment(Pos.CENTER); 162 | vbEmprendedor.getChildren().addAll(iv,cedula,nombre,telefono,email, btnSeleccionar); 163 | Border border = new Border(new BorderStroke(javafx.scene.paint.Color.INDIGO, BorderStrokeStyle.SOLID, new CornerRadii(10), new BorderWidths(2))); 164 | vbEmprendedor.setBorder(border); 165 | 166 | HBox hb = hbs.get(index); 167 | hb.getChildren().add(vbEmprendedor); 168 | if(hb.getChildren().size()>=2){ 169 | index+=1; 170 | } 171 | 172 | btnNuevoEmprendedor.setOnAction(e -> { 173 | try{ 174 | App.setRoot("opcionNuevoEmprendedor"); 175 | } catch(IOException a){ 176 | a.printStackTrace(); 177 | } 178 | }); 179 | btnSeleccionar.setOnAction(e -> { 180 | emprendedorEscogido=emprendedor; 181 | lblEmprendedorEscogido.setText(emprendedor.getNombre()); 182 | btnEditarEmprendedor.setDisable(false); 183 | btnEditarEmprendedor.setOnAction(u -> { 184 | try{ 185 | App.setRoot("opcionEditarEmprendedor"); 186 | } catch(IOException a){ 187 | a.printStackTrace(); 188 | } 189 | }); 190 | }); 191 | } 192 | 193 | } 194 | 195 | } 196 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/ec/edu/espol/proyectop03g04/administracionAuspiciantes.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 | 47 | 48 | 49 | 50 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 78 | 79 | 80 | 81 | 82 | 87 | 88 | 89 | 94 | 99 | 100 | 101 | 106 | 111 | 112 | 113 | 114 | 115 | 116 |
117 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/ec/edu/espol/proyectop03g04/administracionFerias.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 | 47 | 48 | 49 | 50 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 78 | 79 | 80 | 81 | 82 | 87 | 88 | 89 | 94 | 99 | 100 | 101 | 106 | 111 | 116 | 117 | 118 | 119 | 120 | 121 |
122 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/ec/edu/espol/proyectop03g04/AdministracionAuspiciantesController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/javafx/FXMLController.java to edit this template 4 | */ 5 | package ec.edu.espol.proyectop03g04; 6 | import modelo.*; 7 | import java.util.*; 8 | import java.io.FileInputStream; 9 | import java.io.FileNotFoundException; 10 | import java.io.IOException; 11 | import java.net.URL; 12 | import java.util.ResourceBundle; 13 | import javafx.event.ActionEvent; 14 | import javafx.fxml.FXML; 15 | import javafx.fxml.Initializable; 16 | import javafx.geometry.Pos; 17 | import javafx.scene.control.Button; 18 | import javafx.scene.control.Label; 19 | import javafx.scene.control.ScrollPane; 20 | import javafx.scene.image.Image; 21 | import javafx.scene.image.ImageView; 22 | import javafx.scene.layout.BorderPane; 23 | import javafx.scene.layout.HBox; 24 | import javafx.scene.layout.VBox; 25 | import javafx.scene.paint.Color; 26 | import javafx.scene.shape.MoveTo; 27 | import javafx.scene.shape.Path; 28 | import javafx.scene.shape.SVGPath; 29 | import javafx.scene.shape.LineTo; 30 | import javafx.scene.text.Font; 31 | import javafx.scene.layout.BorderStroke; 32 | import javafx.scene.layout.BorderStrokeStyle; 33 | import javafx.scene.layout.BorderWidths; 34 | import javafx.scene.layout.CornerRadii; 35 | import javafx.scene.layout.Border; 36 | 37 | /** 38 | * FXML Controller class 39 | * 40 | * @author isabella 41 | */ 42 | public class AdministracionAuspiciantesController implements Initializable { 43 | 44 | /** 45 | * Initializes the controller class. 46 | */ 47 | public static ArrayList auspiciantes = Utilitaria.readListFromFileAuspiciante(); 48 | @FXML 49 | private BorderPane bpAdminAuspiciantes; 50 | @FXML 51 | private Button btnRegresar; 52 | @FXML 53 | private ImageView imgHeader2; 54 | @FXML 55 | private Button btnNuevoAuspiciante; 56 | @FXML 57 | private Button btnEditarAuspiciante; 58 | @FXML 59 | private Label lblAuspicianteEscogido; 60 | @FXML 61 | private VBox vbAuspiciantes; 62 | 63 | public static Auspiciante auspicianteEscogido; 64 | public static String codigoAuspiciante; 65 | @FXML 66 | private HBox hbHeading; 67 | @FXML 68 | private Button btnAsignarAuspicianteFeria; 69 | 70 | @Override 71 | public void initialize(URL url, ResourceBundle rb) { 72 | Image img1 = new Image("/imagenes/rueda-de-la-fortuna.png"); 73 | imgHeader2.setImage(img1); 74 | auspicianteEscogido = null; 75 | codigoAuspiciante = null; 76 | this.cargarAuspiciantes(); 77 | } 78 | 79 | @FXML 80 | private void clickRegresar() { 81 | try{ 82 | App.setRoot("menuPrincipal"); 83 | } catch(IOException e){ 84 | e.printStackTrace(); 85 | } 86 | } 87 | 88 | 89 | 90 | private void cargarAuspiciantes(){ 91 | // mostrarAuspiciantes 92 | ArrayList hbs = new ArrayList<>(); 93 | int index = 0; 94 | int numHBoxes = 0; 95 | if(auspiciantes.size()%2==0){ 96 | numHBoxes = auspiciantes.size()/2; 97 | for(int i=1; i<=numHBoxes;i++){ 98 | HBox hbAuspiciantes = new HBox(10); 99 | hbAuspiciantes.setPrefWidth(738); 100 | hbAuspiciantes.setPrefHeight(219); 101 | hbAuspiciantes.setMinWidth(738); 102 | hbAuspiciantes.setMinHeight(219); 103 | hbAuspiciantes.setMaxWidth(738); 104 | hbAuspiciantes.setMaxHeight(219); 105 | hbs.add(hbAuspiciantes); 106 | vbAuspiciantes.getChildren().add(hbAuspiciantes); 107 | } 108 | } else{ 109 | int num = auspiciantes.size() + 1; 110 | numHBoxes = num/2; 111 | for(int i=1; i<=numHBoxes;i++){ 112 | HBox hbAuspiciantes = new HBox(10); 113 | hbAuspiciantes.setPrefWidth(738); 114 | hbAuspiciantes.setPrefHeight(219); 115 | hbAuspiciantes.setMinWidth(738); 116 | hbAuspiciantes.setMinHeight(219); 117 | hbAuspiciantes.setMaxWidth(738); 118 | hbAuspiciantes.setMaxHeight(219); 119 | hbs.add(hbAuspiciantes); 120 | vbAuspiciantes.getChildren().add(hbAuspiciantes); 121 | } 122 | } 123 | System.out.println(numHBoxes); 124 | 125 | for (Auspiciante auspiciante: auspiciantes){ 126 | Image img = new Image("/imagenes/sponsor_mostrar.png"); 127 | ImageView iv = new ImageView(img); 128 | iv.setFitHeight(55); 129 | iv.setFitWidth(55); 130 | VBox vbAuspiciante = new VBox(); 131 | vbAuspiciante.setAlignment(Pos.CENTER); 132 | vbAuspiciante.setSpacing(6); 133 | vbAuspiciante.setPrefHeight(219); 134 | vbAuspiciante.setPrefWidth(364); 135 | Font fontb = Font.font("Arial Rounded MT Bold", 12); 136 | Font fontr = Font.font("Arial Rounded MT", 12); 137 | Button btnSeleccionar = new Button("Seleccionar"); 138 | btnSeleccionar.setFont(fontb); 139 | btnSeleccionar.setStyle("-fx-background-color: indigo; -fx-text-fill: white;"); 140 | Label cedula1 = new Label("Cédula:"); 141 | Label nombre1 = new Label("Nombre:"); 142 | Label telefono1 = new Label("Teléfono:"); 143 | Label email1 = new Label("Email:"); 144 | Label cedula2 = new Label(auspiciante.getCedula()); 145 | Label nombre2 = new Label(auspiciante.getNombre()); 146 | Label telefono2 = new Label(auspiciante.getTelefono()); 147 | Label email2 = new Label(auspiciante.getEmail()); 148 | cedula1.setFont(fontb); 149 | nombre1.setFont(fontb); 150 | email1.setFont(fontb); 151 | telefono1.setFont(fontb); 152 | cedula2.setFont(fontr); 153 | nombre2.setFont(fontr); 154 | telefono2.setFont(fontr); 155 | email2.setFont(fontr); 156 | HBox cedula = new HBox(); 157 | cedula.getChildren().addAll(cedula1,cedula2); 158 | cedula.setSpacing(5); 159 | cedula.setAlignment(Pos.CENTER); 160 | HBox nombre = new HBox(); 161 | nombre.getChildren().addAll(nombre1,nombre2); 162 | nombre.setSpacing(5); 163 | nombre.setAlignment(Pos.CENTER); 164 | HBox telefono = new HBox(); 165 | telefono.getChildren().addAll(telefono1,telefono2); 166 | telefono.setSpacing(5); 167 | telefono.setAlignment(Pos.CENTER); 168 | HBox email = new HBox(); 169 | email.getChildren().addAll(email1,email2); 170 | email.setSpacing(5); 171 | email.setAlignment(Pos.CENTER); 172 | vbAuspiciante.getChildren().addAll(iv,cedula,nombre,telefono,email, btnSeleccionar); 173 | Border border = new Border(new BorderStroke(javafx.scene.paint.Color.INDIGO, BorderStrokeStyle.SOLID, new CornerRadii(10), new BorderWidths(2))); 174 | vbAuspiciante.setBorder(border); 175 | 176 | HBox hb = hbs.get(index); 177 | hb.getChildren().add(vbAuspiciante); 178 | if(hb.getChildren().size()>=2){ 179 | index+=1; 180 | } 181 | 182 | 183 | btnSeleccionar.setOnAction(e -> { 184 | auspicianteEscogido=auspiciante; 185 | lblAuspicianteEscogido.setText(auspiciante.getNombre()); 186 | btnEditarAuspiciante.setDisable(false); 187 | btnAsignarAuspicianteFeria.setDisable(false); 188 | }); 189 | 190 | btnNuevoAuspiciante.setOnAction(e -> { 191 | try{ 192 | App.setRoot("opcionNuevoAuspiciante"); 193 | } catch(IOException c){ 194 | c.printStackTrace(); 195 | } 196 | }); 197 | 198 | btnEditarAuspiciante.setOnAction(e -> { 199 | try{ 200 | App.setRoot("opcionEditarAuspiciante"); 201 | } catch(IOException a){ 202 | a.printStackTrace(); 203 | } 204 | }); 205 | 206 | btnAsignarAuspicianteFeria.setOnAction(e -> { 207 | try{ 208 | App.setRoot("opcionAsignarAuspiciante"); 209 | } catch(IOException a){ 210 | a.printStackTrace(); 211 | } 212 | }); 213 | 214 | } 215 | } 216 | 217 | 218 | 219 | /* 220 | private boolean auspicianteExiste(String cedula){ 221 | for(Auspiciante auspiciante: auspiciantes){ 222 | if (auspiciante.getCedula().equals(cedula)){ 223 | return true; 224 | } 225 | } 226 | return false; 227 | } 228 | */ 229 | } 230 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/ec/edu/espol/proyectop03g04/OpcionNuevaFeriaController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/javafx/FXMLController.java to edit this template 4 | */ 5 | package ec.edu.espol.proyectop03g04; 6 | 7 | 8 | import excepciones.*; 9 | import modelo.*; 10 | import java.io.IOException; 11 | import java.net.URL; 12 | import java.util.ResourceBundle; 13 | import javafx.event.ActionEvent; 14 | import javafx.fxml.FXML; 15 | import javafx.fxml.Initializable; 16 | import javafx.scene.control.Button; 17 | import javafx.scene.control.TextField; 18 | import javafx.scene.control.DatePicker; 19 | import javafx.scene.image.Image; 20 | import javafx.scene.image.ImageView; 21 | import javafx.scene.layout.BorderPane; 22 | import javafx.scene.layout.HBox; 23 | import java.time.LocalDate; 24 | import java.util.regex.PatternSyntaxException; 25 | import javafx.scene.control.Alert; 26 | import javafx.scene.control.ButtonType; 27 | 28 | /** 29 | * FXML Controller class 30 | * 31 | * @author isabella 32 | */ 33 | public class OpcionNuevaFeriaController implements Initializable { 34 | 35 | @FXML 36 | private HBox hbHeading; 37 | @FXML 38 | private Button btnRegresar; 39 | @FXML 40 | private ImageView imgHeader2; 41 | @FXML 42 | private Button btnCancelar; 43 | @FXML 44 | private Button btnGuardar; 45 | @FXML 46 | private TextField tfNombre; 47 | @FXML 48 | private TextField tfDescripcion; 49 | @FXML 50 | private TextField tfLugar; 51 | @FXML 52 | private TextField tfHorario; 53 | @FXML 54 | private TextField tfCantidadStands1; 55 | @FXML 56 | private TextField tfCantidadStands2; 57 | @FXML 58 | private TextField tfCantidadStands3; 59 | @FXML 60 | private TextField tfCantidadStands4; 61 | @FXML 62 | private ImageView imageView1; 63 | @FXML 64 | private ImageView imageView2; 65 | @FXML 66 | private ImageView imageView3; 67 | @FXML 68 | private ImageView imageView4; 69 | @FXML 70 | private ImageView imageView5; 71 | @FXML 72 | private ImageView imageView6; 73 | @FXML 74 | private ImageView imageView7; 75 | @FXML 76 | private ImageView imageView8; 77 | @FXML 78 | private ImageView imageView9; 79 | @FXML 80 | private ImageView imageView10; 81 | @FXML 82 | private DatePicker dpFechaFin; 83 | @FXML 84 | private DatePicker dpFechaInicio; 85 | @FXML 86 | private BorderPane bpOpcionNuevaFeria; 87 | 88 | /** 89 | * Initializes the controller class. 90 | */ 91 | @Override 92 | public void initialize(URL url, ResourceBundle rb) { 93 | // TODO 94 | Image img1 = new Image("/imagenes/rueda-de-la-fortuna.png"); 95 | imgHeader2.setImage(img1); 96 | imageView1.setImage(new Image("/imagenes/nombre.png")); 97 | imageView2.setImage(new Image("/imagenes/descripcion.png")); 98 | imageView3.setImage(new Image("/imagenes/lugar.png")); 99 | imageView4.setImage(new Image("/imagenes/fechaIni.png")); 100 | imageView5.setImage(new Image("/imagenes/fechaFin.png")); 101 | imageView6.setImage(new Image("/imagenes/horario.png")); 102 | imageView7.setImage(new Image("/imagenes/stand.png")); 103 | imageView8.setImage(new Image("/imagenes/stand.png")); 104 | imageView9.setImage(new Image("/imagenes/stand.png")); 105 | imageView10.setImage(new Image("/imagenes/stand.png")); 106 | 107 | } 108 | 109 | @FXML 110 | private void clickRegresar() { 111 | try{ 112 | App.setRoot("administracionFerias"); 113 | } catch(IOException e){ 114 | e.printStackTrace(); 115 | } 116 | } 117 | 118 | @FXML 119 | private void clickGuardar() { 120 | String nombre = null; 121 | String descripcion = null; 122 | String lugar = null; 123 | LocalDate fechaIni = null; 124 | LocalDate fechaFin = null; 125 | String horario = null; 126 | int cantidadStands1 = 0; 127 | int cantidadStands2 = 0; 128 | int cantidadStands3 = 0; 129 | int cantidadStands4 = 0; 130 | try{ 131 | nombre = recuperarString(tfNombre); 132 | descripcion = recuperarString(tfDescripcion); 133 | lugar = recuperarString(tfLugar); 134 | horario = recuperarString(tfHorario); 135 | validarHorario(horario); 136 | fechaIni = validateDatePicker(dpFechaInicio); 137 | fechaFin = validateDatePicker(dpFechaFin); 138 | 139 | this.validarSiFechaEstaDespues(fechaIni, fechaFin); 140 | 141 | cantidadStands1 = Integer.parseInt(tfCantidadStands1.getText()); 142 | validarCantStands(cantidadStands1); 143 | cantidadStands2 = Integer.parseInt(tfCantidadStands2.getText()); 144 | validarCantStands(cantidadStands2); 145 | cantidadStands3 = Integer.parseInt(tfCantidadStands3.getText()); 146 | validarCantStands(cantidadStands3); 147 | cantidadStands4 = Integer.parseInt(tfCantidadStands4.getText()); 148 | validarCantStands(cantidadStands4); 149 | Feria feria = new Feria(nombre,fechaIni,fechaFin,lugar,descripcion,horario,cantidadStands1,cantidadStands2,cantidadStands3,cantidadStands4); 150 | AdministracionFeriasController.ferias.add(feria); 151 | Utilitaria.saveListToFileFeria(AdministracionFeriasController.ferias); 152 | App.setRoot("administracionFerias"); 153 | 154 | } catch(NumberFormatException nfe){ 155 | mostrarAlerta("Por favor coloque números en la cantidad de Stands."); 156 | } catch(FechaNoPuedeSerDespues fecha){ 157 | mostrarAlerta("La fecha de inicio no puede ser después de la fecha de fin."); 158 | } catch (FechaVacia fv) { 159 | mostrarAlerta("Por favor coloque fechas válidas."); 160 | } catch(StringVacio sv){ 161 | mostrarAlerta(sv.getMessage()); 162 | } catch(IOException e){ 163 | e.printStackTrace(); 164 | } catch (Exception e){ 165 | mostrarAlerta("Error"); 166 | } 167 | } 168 | 169 | private static String recuperarString(TextField tf) throws StringVacio{ 170 | String str = tf.getText(); 171 | if (str.equals("")){ 172 | throw new StringVacio("Por favor coloque información válida."); 173 | } 174 | return str; 175 | } 176 | 177 | public void mostrarAlerta(String msg) { 178 | Alert alert = new Alert(Alert.AlertType.ERROR); 179 | 180 | alert.setTitle(null); 181 | alert.setHeaderText("Error"); 182 | alert.setContentText(msg); 183 | Button okButton = (Button) alert.getDialogPane().lookupButton(ButtonType.OK); 184 | okButton.setOnAction(event -> { 185 | System.out.println("User clicked OK"); 186 | try{ 187 | App.setRoot("opcionNuevaFeria"); 188 | } catch(IOException e){ 189 | e.printStackTrace(); 190 | } 191 | }); 192 | alert.showAndWait(); 193 | } 194 | 195 | private LocalDate validateDatePicker(DatePicker datePicker) throws FechaVacia{ 196 | LocalDate selectedDate = datePicker.getValue(); 197 | if (selectedDate == null) { 198 | throw new FechaVacia(); 199 | } 200 | return selectedDate; 201 | } 202 | 203 | private void validarSiFechaEstaDespues(LocalDate ldInicio, LocalDate ldFin) throws FechaNoPuedeSerDespues{ 204 | if (ldInicio.isAfter(ldFin)) { 205 | // fechaIni esta despues de fechaFin 206 | throw new FechaNoPuedeSerDespues(); 207 | } 208 | } 209 | private void validarCantStands(int num) throws StringVacio{ 210 | if(num==0){ 211 | throw new StringVacio("Por favor escoja una cantidad de Stands diferente de 0."); 212 | } 213 | } 214 | private void validarHorario(String horario) throws StringVacio { 215 | horario = horario.strip().toLowerCase(); 216 | String[] palabras = horario.split("-"); 217 | double num1 = 0; 218 | double num2 = 0; 219 | int count = 1; 220 | for (String pal: palabras){ 221 | String[] numeros = pal.split("h"); 222 | try{ 223 | int parte1 = Integer.parseInt(numeros[0]); 224 | int parte2 = Integer.parseInt(numeros[1]); 225 | if(parte1>23){ 226 | throw new StringVacio(); 227 | } 228 | if(parte2>59){ 229 | throw new StringVacio(); 230 | } 231 | if(count == 1){ 232 | num1 = Double.parseDouble(parte1 + "." + parte2); 233 | } 234 | if(count == 2){ 235 | num2 = Double.parseDouble(parte1 + "." + parte2); 236 | } 237 | } catch(NumberFormatException n){ 238 | throw new StringVacio(); 239 | } 240 | count++; 241 | } 242 | 243 | if(num1>num2){ 244 | throw new StringVacio(); 245 | } 246 | } 247 | } 248 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/ec/edu/espol/proyectop03g04/opcionEditarFeriaFinal.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
43 | 44 | 45 | 46 | 47 | 48 | 49 | 54 | 59 | 60 | 61 | 62 | 63 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 89 | 94 | 95 | 96 | 97 | 98 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 124 | 129 | 130 | 131 | 132 | 133 | 134 | 135 |
136 |
137 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/ec/edu/espol/proyectop03g04/App.java: -------------------------------------------------------------------------------- 1 | package ec.edu.espol.proyectop03g04; 2 | 3 | import javafx.application.Application; 4 | import javafx.fxml.FXMLLoader; 5 | import javafx.scene.Parent; 6 | import javafx.scene.Scene; 7 | import javafx.stage.Stage; 8 | import java.time.LocalDate; 9 | import java.io.IOException; 10 | import java.util.ArrayList; 11 | import modelo.Auspiciante; 12 | import modelo.AuspicianteEnFeria; 13 | import modelo.Emprendedor; 14 | import modelo.EmprendedorEnFeria; 15 | import modelo.Feria; 16 | import modelo.R; 17 | import modelo.RedSocial; 18 | import modelo.SC; 19 | import modelo.Stand; 20 | import modelo.Utilitaria; 21 | 22 | /** 23 | * JavaFX App 24 | */ 25 | public class App extends Application { 26 | 27 | private static Scene scene; 28 | 29 | @Override 30 | public void start(Stage stage) throws IOException { 31 | scene = new Scene(loadFXML("menuPrincipal"), 1280, 720); 32 | //scene.getStylesheets().add(getClass().getResource("src/main/resources/styles/menuPrincipal.css").toExternalForm()); 33 | stage.setScene(scene); 34 | stage.show(); 35 | 36 | // Información de carga feria 1 37 | Feria feria1 = new Feria("Feria Verde",LocalDate.of(2024, 2, 6),LocalDate.of(2024, 2, 15),"Guayaquil","Destaca la sostenibilidad y la ecología","09h00-16h00",6,4,7,5); 38 | AdministracionFeriasController.ferias.add(feria1); 39 | 40 | // Información de carga feria 2 41 | Feria feria2 = new Feria("Feria de Sabores",LocalDate.of(2023, 12, 4),LocalDate.of(2023, 12, 10),"Samborondón","Celebra la diversidad culinaria y la creativad","08h00-14h00",4,6,5,7); 42 | AdministracionFeriasController.ferias.add(feria2); 43 | 44 | // Información de carga 4 emprendedores y 2 auspiciantes 45 | ArrayList reds1 = new ArrayList<>(); 46 | ArrayList reds2 = new ArrayList<>(); 47 | ArrayList reds3 = new ArrayList<>(); 48 | ArrayList reds4 = new ArrayList<>(); 49 | ArrayList reds5 = new ArrayList<>(); 50 | ArrayList reds6 = new ArrayList<>(); 51 | 52 | reds1.add(new RedSocial("ArteDelSabor_",R.INSTAGRAM)); 53 | reds1.add(new RedSocial("GourmetFusionWorld",R.YOUTUBE)); 54 | reds2.add(new RedSocial("VidaEcoPro",R.FACEBOOK)); 55 | reds2.add(new RedSocial("GreenLifeInnovate",R.LINKEDIN)); 56 | reds2.add(new RedSocial("EcoVidaTweets",R.TWITTER)); 57 | reds3.add(new RedSocial("LuminArtistry",R.TIKTOK)); 58 | reds3.add(new RedSocial("ArteIluminado",R.INSTAGRAM)); 59 | reds4.add(new RedSocial("GreenCultureHub",R.LINKEDIN)); 60 | reds4.add(new RedSocial("VerdeCultural",R.YOUTUBE)); 61 | reds4.add(new RedSocial("VerdeCultura5",R.TWITTER)); 62 | reds5.add(new RedSocial("VidaSaludablePlus",R.FACEBOOK)); 63 | reds5.add(new RedSocial("WellnessPlusHub",R.PINTEREST)); 64 | reds6.add(new RedSocial("EstiloTrend",R.TIKTOK)); 65 | reds6.add(new RedSocial("EstiloModerno",R.INSTAGRAM)); 66 | reds6.add(new RedSocial("FashionStyleJourney",R.YOUTUBE)); 67 | 68 | ArrayList sectores5 = new ArrayList<>(); 69 | sectores5.add(SC.SALUD); 70 | 71 | ArrayList sectores6 = new ArrayList<>(); 72 | sectores6.add(SC.VESTIMENTA); 73 | sectores6.add(SC.EDUCACION); 74 | 75 | Emprendedor emprendedor1 = new Emprendedor("1712345678","SaborArte","Ana García","0987654321","ana@saborarte.com","Calle Principal #123"," www.saborarte.com",reds1,"Productos gourmet y experiencias únicas"); 76 | Stand stand1 = feria1.getSeccion1().getStandsPorSeccion().get(0); 77 | stand1.setFechaAsig(LocalDate.of(2024,1,16)); 78 | stand1.setReservado(true); 79 | stand1.setDueno(emprendedor1); 80 | Stand stand2 = feria2.getSeccion1().getStandsPorSeccion().get(1); 81 | stand2.setFechaAsig(LocalDate.of(2023,11,22)); 82 | stand2.setReservado(true); 83 | stand2.setDueno(emprendedor1); 84 | AdministracionEmprendedoresController.emprendedores.add(emprendedor1); 85 | feria1.getEmprendedores().add(new EmprendedorEnFeria(emprendedor1,stand1,"Sección #1")); 86 | feria2.getEmprendedores().add(new EmprendedorEnFeria(emprendedor1,stand2,"Sección #1")); 87 | 88 | Emprendedor emprendedor2 = new Emprendedor("1809876543","EcoVida","Carlos Mendoza","0998765432","carlos@ecovida.ec","Av. Ecológica #456","www.ecovida.ec",reds2,"Productos orgánicos y talleres de reciclaje"); 89 | Stand stand3 = feria1.getSeccion2().getStandsPorSeccion().get(2); 90 | stand3.setReservado(true); 91 | stand3.setFechaAsig(LocalDate.of(2024,1,10)); 92 | stand3.setDueno(emprendedor2); 93 | Stand stand4 = feria2.getSeccion2().getStandsPorSeccion().get(4); 94 | stand4.setReservado(true); 95 | stand4.setDueno(emprendedor2); 96 | stand4.setFechaAsig(LocalDate.of(2023,11,30)); 97 | AdministracionEmprendedoresController.emprendedores.add(emprendedor2); 98 | feria1.getEmprendedores().add(new EmprendedorEnFeria(emprendedor2,stand3,"Sección #2")); 99 | feria2.getEmprendedores().add(new EmprendedorEnFeria(emprendedor2,stand4,"Sección #2")); 100 | 101 | Emprendedor emprendedor3 = new Emprendedor("1923456789","IluminaArte","Marta Pérez","0976543210","mar@iluminaarte.com","Plaza Luminosa #789","www.iluminaarte.com",reds3,"Crea instalaciones de iluminación artística para restaurantes"); 102 | Stand stand5 = feria1.getSeccion3().getStandsPorSeccion().get(3); 103 | stand5.setReservado(true); 104 | stand5.setDueno(emprendedor3); 105 | stand5.setFechaAsig(LocalDate.of(2024,1,13)); 106 | Stand stand6 = feria2.getSeccion3().getStandsPorSeccion().get(0); 107 | stand6.setReservado(true); 108 | stand6.setDueno(emprendedor3); 109 | stand6.setFechaAsig(LocalDate.of(2023,12,1)); 110 | AdministracionEmprendedoresController.emprendedores.add(emprendedor3); 111 | feria1.getEmprendedores().add(new EmprendedorEnFeria(emprendedor3,stand5,"Sección #3")); 112 | feria2.getEmprendedores().add(new EmprendedorEnFeria(emprendedor3,stand6,"Sección #3")); 113 | 114 | Emprendedor emprendedor4 = new Emprendedor("2012345678","CulturaVerde","Juan Rodríguez","0965432109","juan@cultuver.com","Calle Cultural #234","www.culturaverde.com",reds4,"Promueve la conciencia ambiental y ofrece eventos culturales"); 115 | Stand stand7 = feria1.getSeccion4().getStandsPorSeccion().get(1); 116 | stand7.setReservado(true); 117 | stand7.setDueno(emprendedor4); 118 | stand7.setFechaAsig(LocalDate.of(2024,1,18)); 119 | Stand stand8 = feria2.getSeccion4().getStandsPorSeccion().get(2); 120 | stand8.setReservado(true); 121 | stand8.setDueno(emprendedor4); 122 | stand8.setFechaAsig(LocalDate.of(2023,1,15)); 123 | AdministracionEmprendedoresController.emprendedores.add(emprendedor4); 124 | feria1.getEmprendedores().add(new EmprendedorEnFeria(emprendedor4,stand7,"Sección #4")); 125 | feria2.getEmprendedores().add(new EmprendedorEnFeria(emprendedor4,stand8,"Sección #4")); 126 | 127 | Auspiciante auspiciante1 = new Auspiciante("2112345678","SaludPlus","Laura Herrera","0954321098","lau@saludplus.com", "Av. Saludable #567", "www.saludplus.com",reds5, sectores5); 128 | AuspicianteEnFeria ausF1 = new AuspicianteEnFeria(auspiciante1, "Degustaciones de productos orgánicos y clases de yoga al aire libre", false); 129 | AuspicianteEnFeria ausFeria1 = new AuspicianteEnFeria(auspiciante1, "Asesoramiento nutricional, sesiones de fitness en vivo y muestras gratuitas de productos saludables", true); 130 | Stand stand9 = feria2.getSeccion3().getStandsPorSeccion().get(2); 131 | stand9.setReservado(true); 132 | stand9.setDueno(auspiciante1); 133 | stand9.setFechaAsig(LocalDate.of(2023,11,27)); 134 | ausFeria1.getStandsAsignados().add(stand9); 135 | feria1.getAuspiciantes().add(ausF1); 136 | feria2.getAuspiciantes().add(ausFeria1); 137 | AdministracionAuspiciantesController.auspiciantes.add(auspiciante1); 138 | 139 | Auspiciante auspiciante2 = new Auspiciante("2209876543","VestirEstilo","Pablo Gómez","0945678901","pablo@vestir.ec", "Moda Street #789", "www.vestirestilo.ec",reds5, sectores6); 140 | Stand stand10 = feria1.getSeccion1().getStandsPorSeccion().get(3); 141 | stand10.setReservado(true); 142 | stand10.setFechaAsig(LocalDate.of(2024,1,15)); 143 | Stand stand11 = feria2.getSeccion2().getStandsPorSeccion().get(1); 144 | stand11.setReservado(true); 145 | stand11.setFechaAsig(LocalDate.of(2023,12,3)); 146 | AuspicianteEnFeria ausF2 = new AuspicianteEnFeria(auspiciante2, "Descuentos exclusivos en tiendas y talleres interactivos", true); 147 | AuspicianteEnFeria ausFeria2 = new AuspicianteEnFeria(auspiciante2, "Desfiles de moda sostenible y cata de vinos", true); 148 | ausF2.getStandsAsignados().add(stand10); 149 | ausFeria2.getStandsAsignados().add(stand11); 150 | feria1.getAuspiciantes().add(ausF2); 151 | feria2.getAuspiciantes().add(ausFeria2); 152 | stand10.setDueno(auspiciante2); 153 | stand11.setDueno(auspiciante2); 154 | AdministracionAuspiciantesController.auspiciantes.add(auspiciante2); 155 | 156 | System.out.println(AdministracionFeriasController.ferias.size()); 157 | System.out.println(AdministracionEmprendedoresController.emprendedores.size()); 158 | System.out.println(AdministracionAuspiciantesController.auspiciantes.size()); 159 | Utilitaria.saveListToFileFeria(AdministracionFeriasController.ferias); 160 | Utilitaria.saveListToFileEmprendedor(AdministracionEmprendedoresController.emprendedores); 161 | Utilitaria.saveListToFileAuspiciante(AdministracionAuspiciantesController.auspiciantes); 162 | 163 | } 164 | 165 | 166 | 167 | static void setRoot(String fxml) throws IOException { 168 | scene.setRoot(loadFXML(fxml)); 169 | } 170 | 171 | private static Parent loadFXML(String fxml) throws IOException { 172 | FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource(fxml + ".fxml")); 173 | return fxmlLoader.load(); 174 | } 175 | 176 | public static void main(String[] args) { 177 | launch(); 178 | } 179 | 180 | } -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/resources/ec/edu/espol/proyectop03g04/menuPrincipal.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 91 | 92 | 93 | 94 | 95 | 96 | 97 |
98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 |
128 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/ec/edu/espol/proyectop03g04/AdministracionFeriasController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/javafx/FXMLController.java to edit this template 4 | */ 5 | package ec.edu.espol.proyectop03g04; 6 | import excepciones.FechaVacia; 7 | import modelo.*; 8 | import java.util.*; 9 | import java.io.FileInputStream; 10 | import java.io.FileNotFoundException; 11 | import java.io.FileOutputStream; 12 | import java.io.IOException; 13 | import java.io.ObjectInputStream; 14 | import java.io.ObjectOutputStream; 15 | import java.net.URL; 16 | import java.time.LocalDate; 17 | import java.util.ResourceBundle; 18 | import javafx.event.ActionEvent; 19 | import javafx.fxml.FXML; 20 | import javafx.fxml.Initializable; 21 | import javafx.geometry.Pos; 22 | import javafx.scene.control.Alert; 23 | import javafx.scene.control.Button; 24 | import javafx.scene.control.ButtonType; 25 | import javafx.scene.control.Label; 26 | import javafx.scene.control.ScrollPane; 27 | import javafx.scene.image.Image; 28 | import javafx.scene.image.ImageView; 29 | import javafx.scene.layout.BorderPane; 30 | import javafx.scene.layout.HBox; 31 | import javafx.scene.layout.VBox; 32 | import javafx.scene.paint.Color; 33 | import javafx.scene.shape.MoveTo; 34 | import javafx.scene.shape.Path; 35 | import javafx.scene.shape.SVGPath; 36 | import javafx.scene.shape.LineTo; 37 | import javafx.scene.text.Font; 38 | import javafx.scene.layout.BorderStroke; 39 | import javafx.scene.layout.BorderStrokeStyle; 40 | import javafx.scene.layout.BorderWidths; 41 | import javafx.scene.layout.CornerRadii; 42 | import javafx.scene.layout.Border; 43 | 44 | /** 45 | * FXML Controller class 46 | * 47 | * @author isabella 48 | */ 49 | public class AdministracionFeriasController implements Initializable { 50 | 51 | /** 52 | * Initializes the controller class. 53 | */ 54 | public static ArrayList ferias = Utilitaria.readListFromFileFeria(); 55 | @FXML 56 | private BorderPane bpAdminFerias; 57 | @FXML 58 | private HBox hbHeading; 59 | @FXML 60 | private Button btnRegresar; 61 | @FXML 62 | private ImageView imgHeader2; 63 | @FXML 64 | private Button btnNuevaFeria; 65 | @FXML 66 | private Button btnVerDetalles; 67 | @FXML 68 | private Button btnEditarFeria; 69 | @FXML 70 | private Button btnVerStands; 71 | @FXML 72 | private Label lblFeriaEscogida; 73 | @FXML 74 | private VBox vbFerias; 75 | 76 | public static Feria feriaEscogida; 77 | public static String codigoFeria; 78 | private static final String archivoFerias = "/archivos/hola.dat"; 79 | 80 | @Override 81 | public void initialize(URL url, ResourceBundle rb) { 82 | Image img1 = new Image("/imagenes/rueda-de-la-fortuna.png"); 83 | imgHeader2.setImage(img1); 84 | feriaEscogida = null; 85 | codigoFeria = null; 86 | this.cargarFerias(); 87 | } 88 | 89 | @FXML 90 | private void clickRegresar() { 91 | try{ 92 | App.setRoot("menuPrincipal"); 93 | } catch(IOException e){ 94 | e.printStackTrace(); 95 | } 96 | } 97 | 98 | private void verificarEditable(Feria feria) throws FechaVacia{ 99 | if (feria.getFechaIni().isBefore(LocalDate.now())) { 100 | throw new FechaVacia("No se puede editar esta Feria porque la Fecha de Inicio ya pasó."); 101 | } else if (feria.getFechaIni().isEqual(LocalDate.now())) { 102 | System.out.println("No se puede editar esta Feria porque la Fecha de Inicio es hoy."); 103 | } 104 | } 105 | 106 | public void mostrarAlerta1(String msg) { 107 | Alert alert = new Alert(Alert.AlertType.ERROR); 108 | alert.setTitle(null); 109 | alert.setHeaderText("Error"); 110 | alert.setContentText(msg); 111 | Button okButton = (Button) alert.getDialogPane().lookupButton(ButtonType.OK); 112 | okButton.setOnAction(event -> { 113 | vbFerias.getChildren().clear(); 114 | cargarFerias(); 115 | }); 116 | alert.showAndWait(); 117 | } 118 | 119 | private void cargarFerias(){ 120 | // mostrarFerias 121 | ArrayList hbs = new ArrayList<>(); 122 | int index = 0; 123 | int numHBoxes = 0; 124 | if(ferias.size()%2==0){ 125 | numHBoxes = ferias.size()/2; 126 | for(int i=1; i<=numHBoxes;i++){ 127 | HBox hbFerias = new HBox(10); 128 | hbFerias.setPrefWidth(738); 129 | hbFerias.setPrefHeight(219); 130 | hbFerias.setMinWidth(738); 131 | hbFerias.setMinHeight(219); 132 | hbFerias.setMaxWidth(738); 133 | hbFerias.setMaxHeight(219); 134 | hbs.add(hbFerias); 135 | vbFerias.getChildren().add(hbFerias); 136 | } 137 | } else{ 138 | int num = ferias.size() + 1; 139 | numHBoxes = num/2; 140 | for(int i=1; i<=numHBoxes;i++){ 141 | HBox hbFerias = new HBox(10); 142 | hbFerias.setPrefWidth(738); 143 | hbFerias.setPrefHeight(219); 144 | hbFerias.setMinWidth(738); 145 | hbFerias.setMinHeight(219); 146 | hbFerias.setMaxWidth(738); 147 | hbFerias.setMaxHeight(219); 148 | hbs.add(hbFerias); 149 | vbFerias.getChildren().add(hbFerias); 150 | } 151 | } 152 | System.out.println(numHBoxes); 153 | 154 | for (Feria feria: ferias){ 155 | Image img = new Image("/imagenes/carousel_5593709.png"); 156 | ImageView iv = new ImageView(img); 157 | iv.setFitHeight(60); 158 | iv.setFitWidth(60); 159 | VBox vbFeria = new VBox(); 160 | vbFeria.setAlignment(Pos.CENTER); 161 | vbFeria.setSpacing(6); 162 | vbFeria.setPrefHeight(219); 163 | vbFeria.setPrefWidth(364); 164 | Font fontb = Font.font("Arial Rounded MT Bold", 12); 165 | Font fontr = Font.font("Arial Rounded MT", 12); 166 | Button btnSeleccionar = new Button("Seleccionar"); 167 | btnSeleccionar.setFont(fontb); 168 | btnSeleccionar.setStyle("-fx-background-color: indigo; -fx-text-fill: white;"); 169 | Label codigo1 = new Label("Código:"); 170 | Label nombre1 = new Label("Nombre:"); 171 | Label fechaIni1 = new Label("Fecha de Inicio:"); 172 | Label cantEmpre1 = new Label("Cantidad de Emprendedores:"); 173 | Label cantAus1 = new Label("Cantidad de Auspiciantes:"); 174 | Label codigo2 = new Label(feria.getCodigo()); 175 | Label nombre2 = new Label(feria.getNombre()); 176 | Label fechaIni2 = new Label(feria.getFechaIni().toString()); 177 | Label cantEmpre2 = new Label("" + feria.getEmprendedores().size()); 178 | Label cantAus2 = new Label("" + feria.getAuspiciantes().size()); 179 | codigo1.setFont(fontb); 180 | nombre1.setFont(fontb); 181 | fechaIni1.setFont(fontb); 182 | cantEmpre1.setFont(fontb); 183 | cantAus1.setFont(fontb); 184 | codigo2.setFont(fontr); 185 | nombre2.setFont(fontr); 186 | fechaIni2.setFont(fontr); 187 | cantEmpre2.setFont(fontr); 188 | cantAus2.setFont(fontr); 189 | HBox codigo = new HBox(); 190 | codigo.getChildren().addAll(codigo1,codigo2); 191 | codigo.setSpacing(5); 192 | codigo.setAlignment(Pos.CENTER); 193 | HBox nombre = new HBox(); 194 | nombre.getChildren().addAll(nombre1,nombre2); 195 | nombre.setSpacing(5); 196 | nombre.setAlignment(Pos.CENTER); 197 | HBox fechaIni = new HBox(); 198 | fechaIni.getChildren().addAll(fechaIni1,fechaIni2); 199 | fechaIni.setSpacing(5); 200 | fechaIni.setAlignment(Pos.CENTER); 201 | HBox cantEmpre = new HBox(); 202 | cantEmpre.getChildren().addAll(cantEmpre1,cantEmpre2); 203 | cantEmpre.setSpacing(5); 204 | cantEmpre.setAlignment(Pos.CENTER); 205 | HBox cantAus = new HBox(); 206 | cantAus.getChildren().addAll(cantAus1,cantAus2); 207 | cantAus.setSpacing(5); 208 | cantAus.setAlignment(Pos.CENTER); 209 | vbFeria.getChildren().addAll(iv,codigo,nombre,fechaIni,cantEmpre,cantAus, btnSeleccionar); 210 | Border border = new Border(new BorderStroke(javafx.scene.paint.Color.INDIGO, BorderStrokeStyle.SOLID, new CornerRadii(10), new BorderWidths(2))); 211 | vbFeria.setBorder(border); 212 | 213 | HBox hb = hbs.get(index); 214 | hb.getChildren().add(vbFeria); 215 | if(hb.getChildren().size()>=2){ 216 | index+=1; 217 | } 218 | 219 | btnNuevaFeria.setOnAction(e -> { 220 | try{ 221 | App.setRoot("opcionNuevaFeria"); 222 | } catch(IOException a){ 223 | a.printStackTrace(); 224 | } 225 | }); 226 | btnSeleccionar.setOnAction(e -> { 227 | feriaEscogida=feria; 228 | lblFeriaEscogida.setText(feria.getNombre()); 229 | btnVerDetalles.setDisable(false); 230 | btnEditarFeria.setDisable(false); 231 | btnVerStands.setDisable(false); 232 | btnVerStands.setOnAction(j -> { 233 | codigoFeria = feria.getCodigo(); 234 | try{ 235 | App.setRoot("administracionStandsFeria"); 236 | } catch(IOException a){ 237 | a.printStackTrace(); 238 | } 239 | }); 240 | btnVerDetalles.setOnAction(j -> { 241 | try{ 242 | App.setRoot("opcionVerDetallesFeria"); 243 | } catch(IOException io){ 244 | io.printStackTrace(); 245 | } 246 | }); 247 | btnEditarFeria.setOnAction(j -> { 248 | try{ 249 | verificarEditable(feria); 250 | App.setRoot("opcionEditarFeria"); 251 | } catch(FechaVacia fv){ 252 | mostrarAlerta1(fv.getMessage()); 253 | } catch(IOException io){ 254 | io.printStackTrace(); 255 | } 256 | }); 257 | }); 258 | } 259 | } 260 | 261 | } 262 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/ec/edu/espol/proyectop03g04/OpcionNuevoEmprendedorController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/javafx/FXMLController.java to edit this template 4 | */ 5 | package ec.edu.espol.proyectop03g04; 6 | 7 | import static ec.edu.espol.proyectop03g04.AdministracionEmprendedoresController.emprendedores; 8 | import excepciones.PersonaConEsaCedula; 9 | import excepciones.StringVacio; 10 | import java.io.IOException; 11 | import java.net.URL; 12 | import java.util.ArrayList; 13 | import java.util.ResourceBundle; 14 | import javafx.event.ActionEvent; 15 | import javafx.fxml.FXML; 16 | import javafx.fxml.Initializable; 17 | import javafx.scene.control.Alert; 18 | import javafx.scene.control.Button; 19 | import javafx.scene.control.ButtonType; 20 | import javafx.scene.control.CheckBox; 21 | import javafx.scene.control.TextField; 22 | import javafx.scene.image.Image; 23 | import javafx.scene.image.ImageView; 24 | import javafx.scene.layout.BorderPane; 25 | import javafx.scene.layout.HBox; 26 | import modelo.Emprendedor; 27 | import modelo.R; 28 | import modelo.RedSocial; 29 | import modelo.SC; 30 | import modelo.Utilitaria; 31 | 32 | /** 33 | * FXML Controller class 34 | * 35 | * @author zahid 36 | */ 37 | public class OpcionNuevoEmprendedorController implements Initializable { 38 | 39 | @FXML 40 | private BorderPane bpOpcionNuevoEmprendedor; 41 | @FXML 42 | private HBox hbHeading; 43 | @FXML 44 | private Button btnRegresar; 45 | @FXML 46 | private ImageView imgHeader2; 47 | @FXML 48 | private Button btnGuardar; 49 | @FXML 50 | private Button btnCancelar; 51 | @FXML 52 | private ImageView imageView1; 53 | @FXML 54 | private TextField tfNombre; 55 | @FXML 56 | private ImageView imageView2; 57 | @FXML 58 | private TextField tfCedula; 59 | @FXML 60 | private ImageView imageView3; 61 | @FXML 62 | private TextField tfPersonResponable; 63 | @FXML 64 | private ImageView imageView4; 65 | @FXML 66 | private TextField tfTelefono; 67 | @FXML 68 | private ImageView imageView5; 69 | @FXML 70 | private TextField tfEmail; 71 | @FXML 72 | private ImageView imageView6; 73 | @FXML 74 | private TextField tfDireccion; 75 | @FXML 76 | private ImageView imageView7; 77 | @FXML 78 | private TextField tfSitioWeb; 79 | @FXML 80 | private TextField tfDescripcion; 81 | @FXML 82 | private ImageView imageView9; 83 | @FXML 84 | private CheckBox cbInstagram; 85 | @FXML 86 | private CheckBox cbFacebook; 87 | @FXML 88 | private CheckBox cbTwitter; 89 | @FXML 90 | private CheckBox cbTikTok; 91 | @FXML 92 | private CheckBox cbPinterest; 93 | @FXML 94 | private CheckBox cbYoutube; 95 | @FXML 96 | private CheckBox cbLinkedIn; 97 | @FXML 98 | private TextField tfInstagram; 99 | @FXML 100 | private TextField tfFacebook; 101 | @FXML 102 | private TextField tfTwitter; 103 | @FXML 104 | private TextField tfTikTok; 105 | @FXML 106 | private TextField tfPinterest; 107 | @FXML 108 | private TextField tfYouTube; 109 | @FXML 110 | private TextField tfLinkedIn; 111 | @FXML 112 | private ImageView imageView8; 113 | 114 | /** 115 | * Initializes the controller class. 116 | */ 117 | @Override 118 | public void initialize(URL url, ResourceBundle rb) { 119 | 120 | Image img1 = new Image("/imagenes/rueda-de-la-fortuna.png"); 121 | imgHeader2.setImage(img1); 122 | imageView1.setImage(new Image("/imagenes/nombrePersona.png")); 123 | imageView2.setImage(new Image("/imagenes/cedula.png")); 124 | imageView3.setImage(new Image("/imagenes/perRes.png")); 125 | imageView4.setImage(new Image("/imagenes/telefono.png")); 126 | imageView5.setImage(new Image("/imagenes/email.png")); 127 | imageView6.setImage(new Image("/imagenes/lugar.png")); 128 | imageView7.setImage(new Image("/imagenes/sitioWeb.png")); 129 | imageView8.setImage(new Image("/imagenes/descripcion1.png")); 130 | imageView9.setImage(new Image("/imagenes/redes.png")); 131 | 132 | 133 | } 134 | 135 | @FXML 136 | private void clickRegresar(ActionEvent event) { 137 | try{ 138 | App.setRoot("administracionEmprendedores"); 139 | } catch(IOException e){ 140 | e.printStackTrace(); 141 | } 142 | } 143 | 144 | public void mostrarAlerta(String msg) { 145 | Alert alert = new Alert(Alert.AlertType.ERROR); 146 | 147 | alert.setTitle(null); 148 | alert.setHeaderText("Error"); 149 | alert.setContentText(msg); 150 | Button okButton = (Button) alert.getDialogPane().lookupButton(ButtonType.OK); 151 | okButton.setOnAction(event -> { 152 | System.out.println("User clicked OK"); 153 | try{ 154 | App.setRoot("opcionNuevoAuspiciante"); 155 | } catch(IOException e){ 156 | e.printStackTrace(); 157 | } 158 | }); 159 | alert.showAndWait(); 160 | } 161 | 162 | private static String recuperarString(TextField tf) throws StringVacio{ 163 | String str = tf.getText(); 164 | if (str.equals("")){ 165 | throw new StringVacio("Por favor coloque información válida."); 166 | } 167 | return str; 168 | } 169 | 170 | private static String recuperarCedula(TextField tf) throws PersonaConEsaCedula{ 171 | String cedula = tf.getText(); 172 | for(Emprendedor emp: emprendedores){ 173 | if (cedula.equals(emp.getCedula())){ 174 | throw new PersonaConEsaCedula("Ya existe un Emprendedor con esa cédula o RUC."); 175 | } 176 | } 177 | return cedula; 178 | } 179 | 180 | private static String recuperarCuenta(TextField tf) throws StringVacio{ 181 | String str = tf.getText(); 182 | if (str.equals("")){ 183 | throw new StringVacio("Por favor coloque una cuenta válida."); 184 | } 185 | return str; 186 | } 187 | 188 | @FXML 189 | private void clickCbInstagram(ActionEvent event){ 190 | if(cbInstagram.isSelected()){ 191 | tfInstagram.setDisable(false); 192 | } else{ 193 | tfInstagram.clear(); 194 | tfInstagram.setDisable(true); 195 | } 196 | } 197 | 198 | @FXML 199 | private void clickCbFacebook(ActionEvent event){ 200 | if(cbFacebook.isSelected()){ 201 | tfFacebook.setDisable(false); 202 | } else{ 203 | tfFacebook.clear(); 204 | tfFacebook.setDisable(true); 205 | } 206 | } 207 | 208 | @FXML 209 | private void clickCbTwitter(ActionEvent event){ 210 | if(cbTwitter.isSelected()){ 211 | tfTwitter.setDisable(false); 212 | } else{ 213 | tfTwitter.clear(); 214 | tfTwitter.setDisable(true); 215 | } 216 | } 217 | 218 | @FXML 219 | private void clickCbTikTok(ActionEvent event){ 220 | if(cbTikTok.isSelected()){ 221 | tfTikTok.setDisable(false); 222 | } else{ 223 | tfTikTok.clear(); 224 | tfTikTok.setDisable(true); 225 | } 226 | } 227 | 228 | @FXML 229 | private void clickCbPinterest(ActionEvent event){ 230 | if(cbPinterest.isSelected()){ 231 | tfPinterest.setDisable(false); 232 | } else{ 233 | tfPinterest.clear(); 234 | tfPinterest.setDisable(true); 235 | } 236 | } 237 | 238 | @FXML 239 | private void clickCbYouTube(ActionEvent event){ 240 | if(cbYoutube.isSelected()){ 241 | tfYouTube.setDisable(false); 242 | } else{ 243 | tfYouTube.clear(); 244 | tfYouTube.setDisable(true); 245 | } 246 | } 247 | 248 | @FXML 249 | private void clickCbLinkedIn(ActionEvent event){ 250 | if(cbLinkedIn.isSelected()){ 251 | tfLinkedIn.setDisable(false); 252 | } else{ 253 | tfLinkedIn.clear(); 254 | tfLinkedIn.setDisable(true); 255 | } 256 | 257 | } 258 | 259 | @FXML 260 | private void clickGuardar(ActionEvent event) { 261 | String nombre = null; 262 | String cedula = null; 263 | String personaRes = null; 264 | String telefono = null; 265 | String email = null; 266 | String direccion = null; 267 | String sitioWeb = null; 268 | ArrayList redes = new ArrayList<>(); 269 | String descripcion = null; 270 | try{ 271 | nombre = recuperarString(tfNombre); 272 | cedula = recuperarCedula(tfCedula); 273 | personaRes = recuperarString(tfPersonResponable); 274 | telefono = recuperarString(tfTelefono); 275 | email = recuperarString(tfEmail); 276 | direccion = tfDireccion.getText(); 277 | sitioWeb = tfSitioWeb.getText(); 278 | descripcion = recuperarString(tfDescripcion); 279 | 280 | if(cbInstagram.isSelected()){ 281 | String cuenta = recuperarCuenta(tfInstagram); 282 | RedSocial red = new RedSocial(cuenta,R.INSTAGRAM); 283 | redes.add(red); 284 | } 285 | if(cbFacebook.isSelected()){ 286 | String cuenta = recuperarCuenta(tfFacebook); 287 | RedSocial red = new RedSocial(cuenta,R.FACEBOOK); 288 | redes.add(red); 289 | } 290 | if(cbTwitter.isSelected()){ 291 | String cuenta = recuperarCuenta(tfTwitter); 292 | RedSocial red = new RedSocial(cuenta,R.TWITTER); 293 | redes.add(red); 294 | } 295 | if(cbTikTok.isSelected()){ 296 | String cuenta = recuperarCuenta(tfTikTok); 297 | RedSocial red = new RedSocial(cuenta,R.TIKTOK); 298 | redes.add(red); 299 | } 300 | if(cbPinterest.isSelected()){ 301 | String cuenta = recuperarCuenta(tfPinterest); 302 | RedSocial red = new RedSocial(cuenta,R.PINTEREST); 303 | redes.add(red); 304 | } 305 | if(cbYoutube.isSelected()){ 306 | String cuenta = recuperarCuenta(tfYouTube); 307 | RedSocial red = new RedSocial(cuenta,R.YOUTUBE); 308 | redes.add(red); 309 | } 310 | if(cbLinkedIn.isSelected()){ 311 | String cuenta = recuperarCuenta(tfLinkedIn); 312 | RedSocial red = new RedSocial(cuenta,R.LINKEDIN); 313 | redes.add(red); 314 | } 315 | 316 | AdministracionEmprendedoresController.emprendedores.add(new Emprendedor(cedula, nombre, personaRes, telefono, email, direccion, sitioWeb, redes,descripcion)); 317 | Utilitaria.saveListToFileEmprendedor(AdministracionEmprendedoresController.emprendedores); 318 | App.setRoot("administracionEmprendedores"); 319 | 320 | } catch(StringVacio sv){ 321 | mostrarAlerta(sv.getMessage()); 322 | } catch(PersonaConEsaCedula p){ 323 | mostrarAlerta(p.getMessage()); 324 | } catch(IOException e){ 325 | e.printStackTrace(); 326 | } catch (Exception e){ 327 | mostrarAlerta("Error"); 328 | } 329 | } 330 | } 331 | -------------------------------------------------------------------------------- /ProyectoP03G04/src/main/java/ec/edu/espol/proyectop03g04/OpcionAsignarAuspiciantesController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/javafx/FXMLController.java to edit this template 4 | */ 5 | package ec.edu.espol.proyectop03g04; 6 | 7 | import excepciones.DescVacia; 8 | import modelo.*; 9 | import static ec.edu.espol.proyectop03g04.AdministracionFeriasController.codigoFeria; 10 | import static ec.edu.espol.proyectop03g04.AdministracionFeriasController.feriaEscogida; 11 | import static ec.edu.espol.proyectop03g04.AdministracionFeriasController.ferias; 12 | import excepciones.FechaNoPuedeSerDespues; 13 | import excepciones.FechaVacia; 14 | import excepciones.StringVacio; 15 | import java.io.IOException; 16 | import java.net.URL; 17 | import java.time.LocalDate; 18 | import java.util.ArrayList; 19 | import java.util.ResourceBundle; 20 | import javafx.collections.ObservableList; 21 | import javafx.event.ActionEvent; 22 | import javafx.fxml.FXML; 23 | import javafx.fxml.Initializable; 24 | import javafx.geometry.Pos; 25 | import javafx.scene.Node; 26 | import javafx.scene.control.Alert; 27 | import javafx.scene.control.Alert.AlertType; 28 | import javafx.scene.control.Button; 29 | import javafx.scene.control.ButtonType; 30 | import javafx.scene.control.CheckBox; 31 | import javafx.scene.control.ComboBox; 32 | import javafx.scene.control.DatePicker; 33 | import javafx.scene.control.Label; 34 | import javafx.scene.control.ListCell; 35 | import javafx.scene.control.ListView; 36 | import javafx.scene.control.TextArea; 37 | import javafx.scene.control.TextField; 38 | import javafx.scene.image.Image; 39 | import javafx.scene.image.ImageView; 40 | import javafx.scene.layout.Background; 41 | import javafx.scene.layout.BackgroundFill; 42 | import javafx.scene.layout.Border; 43 | import javafx.scene.layout.BorderPane; 44 | import javafx.scene.layout.BorderStroke; 45 | import javafx.scene.layout.BorderStrokeStyle; 46 | import javafx.scene.layout.BorderWidths; 47 | import javafx.scene.layout.CornerRadii; 48 | import javafx.scene.layout.HBox; 49 | import javafx.scene.layout.VBox; 50 | import javafx.scene.paint.Color; 51 | import javafx.scene.text.Font; 52 | import javafx.scene.text.TextAlignment; 53 | import javafx.util.Callback; 54 | import modelo.Auspiciante; 55 | import modelo.Feria; 56 | 57 | /** 58 | * FXML Controller class 59 | * 60 | * @author asala 61 | */ 62 | public class OpcionAsignarAuspiciantesController implements Initializable { 63 | 64 | 65 | @FXML 66 | private BorderPane bpAdminAuspiciantes; 67 | @FXML 68 | private HBox hbHeading; 69 | @FXML 70 | private Button btnRegresar; 71 | @FXML 72 | private ImageView imgHeader2; 73 | @FXML 74 | private VBox vbFerias; 75 | @FXML 76 | private Button btnGuardar; 77 | @FXML 78 | private Button btnCancelar; 79 | @FXML 80 | private Label lblAuspicianteEscogido; 81 | @FXML 82 | private Label lblCedula; 83 | @FXML 84 | private CheckBox cbSi; 85 | @FXML 86 | private CheckBox cbNo; 87 | @FXML 88 | private TextField taDescripcion; 89 | @FXML 90 | private Label lblNombreFeria; 91 | 92 | private boolean incluyeStand; 93 | /** 94 | * Initializes the controller class. 95 | */ 96 | 97 | @Override 98 | public void initialize(URL url, ResourceBundle rb) { 99 | Image img1 = new Image("/imagenes/rueda-de-la-fortuna.png"); 100 | imgHeader2.setImage(img1); 101 | this.cargarFerias(); 102 | Auspiciante auspiciante = AdministracionAuspiciantesController.auspicianteEscogido; 103 | lblAuspicianteEscogido.setText(auspiciante.getNombre()); 104 | lblCedula.setText(auspiciante.getCedula()); 105 | } 106 | 107 | @FXML 108 | private void clickRegresar(ActionEvent event) { 109 | try{ 110 | App.setRoot("administracionAuspiciantes"); 111 | } catch(IOException e){ 112 | e.printStackTrace(); 113 | } 114 | } 115 | 116 | private void verificarAsignar() throws DescVacia{ 117 | if(!(cbNo.isSelected() || cbSi.isSelected())){ 118 | throw new DescVacia("Por favor seleccione si o no"); 119 | } else if((taDescripcion.getText().equals(""))){ 120 | throw new DescVacia("Por favor llene la descripción"); 121 | } 122 | } 123 | 124 | public void mostrarAlerta(String msg) { 125 | Alert alert = new Alert(Alert.AlertType.ERROR); 126 | 127 | alert.setTitle(null); 128 | alert.setHeaderText("Error"); 129 | alert.setContentText(msg); 130 | Button okButton = (Button) alert.getDialogPane().lookupButton(ButtonType.OK); 131 | okButton.setOnAction(event -> { 132 | System.out.println("User clicked OK"); 133 | try{ 134 | App.setRoot("opcionAsignarAuspiciante"); 135 | } catch(IOException e){ 136 | e.printStackTrace(); 137 | } 138 | }); 139 | alert.showAndWait(); 140 | } 141 | 142 | public void mostrarExito(String msg) { 143 | Alert alert = new Alert(Alert.AlertType.INFORMATION); 144 | 145 | alert.setTitle(null); 146 | alert.setHeaderText("Éxito"); 147 | alert.setContentText(msg); 148 | Button okButton = (Button) alert.getDialogPane().lookupButton(ButtonType.OK); 149 | okButton.setOnAction(event -> { 150 | System.out.println("User clicked OK"); 151 | try{ 152 | App.setRoot("opcionAsignarAuspiciante"); 153 | } catch(IOException e){ 154 | e.printStackTrace(); 155 | } 156 | }); 157 | alert.showAndWait(); 158 | } 159 | 160 | private void cargarFerias(){ 161 | // mostrarFerias 162 | ArrayList hbs = new ArrayList<>(); 163 | int index = 0; 164 | int numHBoxes = 0; 165 | if(ferias.size()%2==0){ 166 | numHBoxes = ferias.size()/2; 167 | for(int i=1; i<=numHBoxes;i++){ 168 | HBox hbFerias = new HBox(10); 169 | hbFerias.setPrefWidth(738); 170 | hbFerias.setPrefHeight(219); 171 | hbFerias.setMinWidth(738); 172 | hbFerias.setMinHeight(219); 173 | hbFerias.setMaxWidth(738); 174 | hbFerias.setMaxHeight(219); 175 | hbs.add(hbFerias); 176 | vbFerias.getChildren().add(hbFerias); 177 | } 178 | } else{ 179 | int num = ferias.size() + 1; 180 | numHBoxes = num/2; 181 | for(int i=1; i<=numHBoxes;i++){ 182 | HBox hbFerias = new HBox(10); 183 | hbFerias.setPrefWidth(738); 184 | hbFerias.setPrefHeight(219); 185 | hbFerias.setMinWidth(738); 186 | hbFerias.setMinHeight(219); 187 | hbFerias.setMaxWidth(738); 188 | hbFerias.setMaxHeight(219); 189 | hbs.add(hbFerias); 190 | vbFerias.getChildren().add(hbFerias); 191 | } 192 | } 193 | System.out.println(numHBoxes); 194 | 195 | for (Feria feria: ferias){ 196 | Image img = new Image("/imagenes/carousel_5593709.png"); 197 | ImageView iv = new ImageView(img); 198 | iv.setFitHeight(60); 199 | iv.setFitWidth(60); 200 | VBox vbFeria = new VBox(); 201 | vbFeria.setAlignment(Pos.CENTER); 202 | vbFeria.setSpacing(6); 203 | vbFeria.setPrefHeight(219); 204 | vbFeria.setPrefWidth(364); 205 | Font fontb = Font.font("Arial Rounded MT Bold", 12); 206 | Font fontr = Font.font("Arial Rounded MT", 12); 207 | Button btnSeleccionar = new Button("Seleccionar"); 208 | btnSeleccionar.setFont(fontb); 209 | btnSeleccionar.setStyle("-fx-background-color: indigo; -fx-text-fill: white;"); 210 | Label codigo1 = new Label("Código:"); 211 | Label nombre1 = new Label("Nombre:"); 212 | Label fechaIni1 = new Label("Fecha de Inicio:"); 213 | Label cantEmpre1 = new Label("Cantidad de Emprendedores:"); 214 | Label cantAus1 = new Label("Cantidad de Auspiciantes:"); 215 | Label codigo2 = new Label(feria.getCodigo()); 216 | Label nombre2 = new Label(feria.getNombre()); 217 | Label fechaIni2 = new Label(feria.getFechaIni().toString()); 218 | Label cantEmpre2 = new Label("" + feria.getEmprendedores().size()); 219 | Label cantAus2 = new Label("" + feria.getAuspiciantes().size()); 220 | codigo1.setFont(fontb); 221 | nombre1.setFont(fontb); 222 | fechaIni1.setFont(fontb); 223 | cantEmpre1.setFont(fontb); 224 | cantAus1.setFont(fontb); 225 | codigo2.setFont(fontr); 226 | nombre2.setFont(fontr); 227 | fechaIni2.setFont(fontr); 228 | cantEmpre2.setFont(fontr); 229 | cantAus2.setFont(fontr); 230 | HBox codigo = new HBox(); 231 | codigo.getChildren().addAll(codigo1,codigo2); 232 | codigo.setSpacing(5); 233 | codigo.setAlignment(Pos.CENTER); 234 | HBox nombre = new HBox(); 235 | nombre.getChildren().addAll(nombre1,nombre2); 236 | nombre.setSpacing(5); 237 | nombre.setAlignment(Pos.CENTER); 238 | HBox fechaIni = new HBox(); 239 | fechaIni.getChildren().addAll(fechaIni1,fechaIni2); 240 | fechaIni.setSpacing(5); 241 | fechaIni.setAlignment(Pos.CENTER); 242 | HBox cantEmpre = new HBox(); 243 | cantEmpre.getChildren().addAll(cantEmpre1,cantEmpre2); 244 | cantEmpre.setSpacing(5); 245 | cantEmpre.setAlignment(Pos.CENTER); 246 | HBox cantAus = new HBox(); 247 | cantAus.getChildren().addAll(cantAus1,cantAus2); 248 | cantAus.setSpacing(5); 249 | cantAus.setAlignment(Pos.CENTER); 250 | vbFeria.getChildren().addAll(iv,codigo,nombre,fechaIni,cantEmpre,cantAus, btnSeleccionar); 251 | Border border = new Border(new BorderStroke(javafx.scene.paint.Color.INDIGO, BorderStrokeStyle.SOLID, new CornerRadii(10), new BorderWidths(2))); 252 | vbFeria.setBorder(border); 253 | 254 | HBox hb = hbs.get(index); 255 | hb.getChildren().add(vbFeria); 256 | if(hb.getChildren().size()>=2){ 257 | index+=1; 258 | 259 | } 260 | btnSeleccionar.setOnAction(e -> { 261 | feriaEscogida=feria; 262 | btnGuardar.setDisable(false); 263 | btnCancelar.setDisable(false); 264 | cbSi.setDisable(false); 265 | cbNo.setDisable(false); 266 | taDescripcion.setDisable(false); 267 | lblNombreFeria.setText(feria.getNombre()); 268 | }); 269 | 270 | cbSi.setOnAction(e -> { 271 | cbNo.setSelected(false); 272 | incluyeStand = true; 273 | }); 274 | 275 | cbNo.setOnAction(e -> { 276 | cbSi.setSelected(false); 277 | incluyeStand = false; 278 | }); 279 | 280 | btnGuardar.setOnAction(e ->{ 281 | try { 282 | verificarAsignar(); 283 | Auspiciante auspiciante = AdministracionAuspiciantesController.auspicianteEscogido; 284 | AuspicianteEnFeria AuspicianteEnFeria = new AuspicianteEnFeria(auspiciante,taDescripcion.getText(),incluyeStand); 285 | feriaEscogida.getAuspiciantes().add(AuspicianteEnFeria); 286 | mostrarExito("Guardado con éxito"); 287 | 288 | } catch (DescVacia ex) { 289 | mostrarAlerta(ex.getMessage()); 290 | } 291 | 292 | }); 293 | 294 | btnCancelar.setOnAction(e -> { 295 | try{ 296 | App.setRoot("administracionAuspiciantes"); 297 | } catch(IOException i){ 298 | i.printStackTrace(); 299 | } 300 | }); 301 | } 302 | } 303 | } 304 | --------------------------------------------------------------------------------