This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Contador } from "./modulos/contador.js"; | |
| import { Separador } from "./modulos/separador.js"; | |
| var areaTexto = document.getElementById("salida"); | |
| console.log(areaTexto === undefined); | |
| var accionContador = new Contador(areaTexto); | |
| var accionSeparador = new Separador(areaTexto); | |
| var botonIncrementar = document.getElementById("botonContador"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Separador { | |
| constructor(tArea) { | |
| this.areaTexto = tArea; | |
| } | |
| separadorMas() { | |
| var texto = this.areaTexto.value; | |
| texto = texto + "++++++++++" + "\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Contador { | |
| constructor(tArea) { | |
| this.conteo = 0; | |
| this.texto = tArea; | |
| } | |
| incrementar() { | |
| console.log("Incrementar"); | |
| this.conteo++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package mx.ticom.autoreporte; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.lang.reflect.InvocationTargetException; | |
| import java.text.ParseException; | |
| import java.util.ArrayList; | |
| import java.util.logging.Level; | |
| import java.util.logging.Logger; | |
| import mx.ticom.autoreporte.dao.EmpleadosDAO; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package mx.ticom.autoreporte.reporte; | |
| import java.io.File; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.lang.reflect.Field; | |
| import java.lang.reflect.InvocationTargetException; | |
| import java.math.BigDecimal; | |
| import java.util.ArrayList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package mx.ticom.autoreporte.dao; | |
| import java.text.ParseException; | |
| import java.text.SimpleDateFormat; | |
| import java.util.ArrayList; | |
| import java.util.logging.Level; | |
| import java.util.logging.Logger; | |
| import mx.ticom.autoreporte.vo.DatosReporteEmpleados; | |
| public class EmpleadosDAO { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package mx.ticom.autoreporte.dao; | |
| import java.math.BigDecimal; | |
| import java.math.MathContext; | |
| import java.text.ParseException; | |
| import java.text.SimpleDateFormat; | |
| import java.util.ArrayList; | |
| import java.util.Calendar; | |
| import java.util.Date; | |
| import mx.ticom.autoreporte.vo.DatosReporteProductos; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package mx.ticom.autoreporte.vo; | |
| import java.math.BigDecimal; | |
| import java.util.Date; | |
| import mx.ticom.autoreporte.anotaciones.ColumnaReporte; | |
| public class DatosReporteProductos { | |
| @ColumnaReporte(nombreColumna="Fecha del producto") | |
| private Date fecha; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package mx.ticom.autoreporte.vo; | |
| import java.util.Date; | |
| import mx.ticom.autoreporte.anotaciones.ColumnaReporte; | |
| public class DatosReporteEmpleados { | |
| @ColumnaReporte(nombreColumna="Fecha del contrato") | |
| private Date fechaContrato; | |
| @ColumnaReporte(nombreColumna="Nombre del Empleado") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected <TipoGenerico> void agregarDatos(Row fila, TipoGenerico dato) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { | |
| Class clase = dato.getClass(); | |
| Field[] campos = clase.getDeclaredFields(); | |
| int numCelda = 0; | |
| for (Field campo : campos) { | |
| ColumnaReporte columna = campo.getAnnotation(ColumnaReporte.class); | |
| Cell celda = fila.createCell(numCelda); | |
| if (columna != null) { |