Exemplo n.º 1
0
 private void cargarTablaBuscador(List<DiscapacidadDetalle> list) {
   DefaultTableModel dtm = buscador.getDtm();
   dtm.setRowCount(0);
   for (DiscapacidadDetalle detalle : list) {
     dtm.addRow(
         new Object[] {
           detalle.getDiscapacidad(),
           detalle.getTipoDocumento().getNombre(),
           detalle.getSubTipoDocumento() != null
               ? detalle.getSubTipoDocumento().getNombre()
               : null,
           detalle.getDocumentoNumero(),
           detalle.getDocumentoFecha() == null
               ? null
               : UTIL.DATE_FORMAT.format(detalle.getDocumentoFecha()),
           Objects.toString(detalle.getApellido(), "")
               + " "
               + Objects.toString(detalle.getNombre(), ""),
           detalle.getPeriodoYear(),
           detalle.getObservacion(),
           detalle.getDiscapacidad().getBarcode(),
           detalle.getDiscapacidad().getPrecintos().isEmpty()
               ? "No"
               : "Si " + detalle.getDiscapacidad().getPrecintos().size(),
           detalle.getDiscapacidad().getRecibo() != null
               ? detalle.getDiscapacidad().getRecibo().getNumero()
               : null
         });
   }
 }
Exemplo n.º 2
0
 private void cargarTablaDetalle(DiscapacidadDetalle detalle) {
   DefaultTableModel dtm = (DefaultTableModel) abmPanel.getjTable1().getModel();
   dtm.addRow(
       new Object[] {
         detalle,
         detalle.getTipoDocumento().getNombre(),
         detalle.getSubTipoDocumento() != null ? detalle.getSubTipoDocumento().getNombre() : null,
         detalle.getDocumentoNumero(),
         (detalle.getDocumentoFecha() != null
             ? UTIL.DATE_FORMAT.format(detalle.getDocumentoFecha())
             : null),
         (detalle.getApellido() == null ? "" : detalle.getApellido())
             + " "
             + (detalle.getNombre() == null ? "" : detalle.getNombre()),
         detalle.getPeriodoYear(),
         detalle.getObservacion()
       });
 }