private void aceptar() {
    contabilidad.TO.ConMayorAuxiliarTO conMayorAuxiliarTO = null;
    if (jtable.getModel().getRowCount() > 0) {
      conMayorAuxiliarTO =
          this.contabilidadBBMayorAuxiliar1
              .getListaConMayorAuxiliarTO()
              .get(this.jtable.convertRowIndexToModel(this.jtable.getSelectedRow()));
      java.util.List<String> comprobante =
          validaciones.Validacion.separarComprobante(conMayorAuxiliarTO.getMaContable());
      String periodo = comprobante.get(0);
      String motivo = comprobante.get(1);
      String numero = comprobante.get(2);

      JIFAdministrarContable administrarContable =
          new JIFAdministrarContable(
              this.mDIShrimp,
              motivo,
              periodo,
              numero,
              "CONSULTAR",
              "Consulta de Comprobante Contable");
      try {
        administrarContable.setSelected(true);
      } catch (Exception e) {
        shrimp.helper.Excepciones.guardarExcepcionesAC(
            e, getClass().getName(), mDIShrimp.getSisInfoTO());
        this.requestFocus();
      }
      administrarContable.setVisible(true);
    }
    try {
      llenarjTBalanceComprobacion();
      conMayorAuxiliarTO = null;
      jtfBuscar.setText("");
    } catch (java.rmi.RemoteException re) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "Se perdio la conexion. Contacte con el administrador...");
      requestFocus();
    } catch (javax.ejb.EJBException eje) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "Se perdio la conexion. Contacte con el administrador...");
      requestFocus();
    } catch (javax.naming.NameNotFoundException nnfe) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "El programa servidor no esta listo. Intente mas tarde...");
      requestFocus();
    } catch (Exception e) {
      shrimp.helper.Excepciones.guardarExcepcionesAC(
          e, getClass().getName(), mDIShrimp.getSisInfoTO());
      requestFocus();
    }
  }
Example #2
0
 private void limpiar() {
   if (jftfFechaHasta.getValue() == null || jftfFechaDesde.getValue() == null) {
     this.jftfFechaDesde.setValue(validaciones.Validacion.fechaSistema("dd-MM-yyyy"));
     this.jftfFechaHasta.setValue(validaciones.Validacion.fechaSistema("dd-MM-yyyy"));
   }
   this.jtfProveedor.setText("");
   this.jtfBuscar.setText("");
   llenarAtributos();
   proveedorId = "¬";
   try {
     llenarjTable();
   } catch (java.rmi.RemoteException re) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "Se perdio la conexion. Contacte con el administrador...");
   } catch (javax.ejb.EJBException eje) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "Se perdio la conexion. Contacte con el administrador...");
   } catch (javax.naming.NameNotFoundException nnfe) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "El programa servidor no esta listo. Intente mas tarde...");
   } catch (Exception e) {
     shrimp.helper.Excepciones.guardarExcepcionesAC(
         e, getClass().getName(), mDIShrimp.getSisInfoTO());
   }
   proveedorId = null;
 }
 private void jbtnActualizarActionPerformed(java.awt.event.ActionEvent evt) {
   try {
     // TODO add your handling code here:
     llenarAtributos();
     Long tiempoInicio = System.currentTimeMillis();
     llenarjTable();
     long tiempoTotal = System.currentTimeMillis() - tiempoInicio;
     lbTimeEjecucion.setText(
         "Filas: "
             + jtable.getRowCount()
             + "  Tiempo: "
             + FormatoNumero.redondear(((double) tiempoTotal / 1000), 2)
             + " s");
     if (jtable.getRowCount() > 0) {
       jtable.requestFocus();
       jtable.changeSelection(0, 0, false, false);
       barraEstado(true);
       manejoBotones(true);
     } else {
       javax.swing.JOptionPane.showMessageDialog(this, "No hay resultados que mostrar...");
     }
   } catch (java.rmi.RemoteException re) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "Se perdio la conexion. Contacte con el administrador...");
   } catch (javax.ejb.EJBException eje) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "Se perdio la conexion. Contacte con el administrador...");
   } catch (javax.naming.NameNotFoundException nnfe) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "El programa servidor no esta listo. Intente mas tarde...");
   } catch (Exception e) {
     shrimp.helper.Excepciones.guardarExcepcionesAC(
         e, getClass().getName(), mDIShrimp.getSisInfoTO());
   }
 }
 private void jbtnActualizarActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jbtnActualizarActionPerformed
   // TODO add your handling code here:
   accion = "NUEVO";
   llenarAtributos();
   try {
     if (fechaDesde != null && fechaHasta != null) {
       llenarjTableUtilidades();
       manejoControles(true);
       manejoBotones();
     } else
       javax.swing.JOptionPane.showInternalMessageDialog(
           this, "Existe un problema con la fecha desde y/o la fecha hasta..");
   } catch (java.rmi.RemoteException re) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "Se perdio la conexion. Contacte con el administrador...");
   } catch (javax.ejb.EJBException eje) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "Se perdio la conexion. Contacte con el administrador...");
   } catch (javax.naming.NameNotFoundException nnfe) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "El programa servidor no esta listo. Intente mas tarde...");
   } catch (Exception e) {
     shrimp.helper.Excepciones.guardarExcepcionesAC(
         e, getClass().getName(), mDIShrimp.getSisInfoTO());
   }
   if (jtblXiiiSueldo.getRowCount() > 0) {
     jtblXiiiSueldo.requestFocus();
     jtblXiiiSueldo.changeSelection(0, 0, false, false);
   }
 } // GEN-LAST:event_jbtnActualizarActionPerformed
Example #5
0
 private void eventoKeyPressControles(java.awt.event.KeyEvent evt) {
   if (evt.getKeyChar() == java.awt.event.KeyEvent.VK_ESCAPE) cancelar();
   if (evt.getKeyCode() == java.awt.event.KeyEvent.VK_F5) {
     try {
       int opcion =
           javax.swing.JOptionPane.showInternalConfirmDialog(
               rootPane, "Si actualiza el formulario, los datos se perderan..", title, 0);
       if (opcion == 0) {
         llenarCombo();
       }
     } catch (java.rmi.RemoteException re) {
       javax.swing.JOptionPane.showMessageDialog(
           null, "Se perdio la conexion. Contacte con el administrador...");
     } catch (javax.ejb.EJBException eje) {
       javax.swing.JOptionPane.showMessageDialog(
           null, "Se perdio la conexion. Contacte con el administrador...");
     } catch (javax.naming.NameNotFoundException nnfe) {
       javax.swing.JOptionPane.showMessageDialog(
           null, "El programa servidor no esta listo. Intente mas tarde...");
     } catch (Exception e) {
       shrimp.helper.Excepciones.guardarExcepcionesAC(
           e, getClass().getName(), mDIShrimp.getSisInfoTO());
     }
   }
 }
 private void escogerSector() {
   try {
     if (this.jcboCP.getSelectedIndex() > -1) {
       produccion.TO.PrdListaSectorTO prdListaSectorTO =
           this.produccionBBSector1.getListaPrdListaSectorTO().get(this.jcboCP.getSelectedIndex());
       this.codigoSector = "'" + prdListaSectorTO.getSecCodigo() + "'";
     }
   } catch (Exception e) {
     shrimp.helper.Excepciones.guardarExcepcionesAC(
         e, getClass().getName(), mDIShrimp.getSisInfoTO());
   }
 }
Example #7
0
 private void cancelar() {
   this.accion = "CANCELAR";
   manejoControlesBotones(true);
   barraEstado(false);
   insertarFechaOriginal(desdeOriginal, hastaOriginal);
   jcboCP.requestFocus();
   try {
     this.bbResumenCorrida1.setPrdListaResumenCorridaTO(new ArrayList());
     llenarjTable();
   } catch (Exception ex) {
     shrimp.helper.Excepciones.guardarExcepcionesAC(
         ex, getClass().getName(), mDIShrimp.getSisInfoTO());
   }
 }
  /** Creates new form JIFDesbloqueoContable */
  public JIFRestaurarContable(shrimp.componentes.GUI.MDIShrimp mDIShrimp, String titulo) {
    super(
        titulo, true, // resizable
        true, // closable
        true, // maximizable
        true); // iconifiable
    this.mDIShrimp = mDIShrimp;
    this.sisUsuarioEmpresaTO = mDIShrimp.getSisUsuarioEmpresaTO();
    try {
      sisGrupoTO =
          shrimp.sistema.delegate.SistemaDelegate.getInstance()
              .sisGrupoUsuariosTO(mDIShrimp.getSisInfoTO());
      if (sisGrupoTO.getGruConfigurar()) {
        initComponents();
        initCombos();
        limpiar();
        llenarBindingGroup();
        llenarComboTipoContable();
        llenarComboPeriodo();
        eventos();
        eventosKeyFormulario();
        bloquearDesbloquearControles(true);
        this.setVisible(true);
        mDIShrimp.desktopPane.add(this);
      } else {
        shrimp.helper.JDVentanaMensajes.showMessageDialog(
            new java.awt.Frame(),
            "No tiene permisos para manipular el sistema",
            javax.swing.JOptionPane.ERROR_MESSAGE,
            javax.swing.JOptionPane.DEFAULT_OPTION);
      }

    } catch (java.rmi.RemoteException re) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "Se perdio la conexion. Contacte con el administrador...");
      this.requestFocus();
    } catch (javax.ejb.EJBException eje) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "Se perdio la conexion. Contacte con el administrador...");
      this.requestFocus();
    } catch (javax.naming.NameNotFoundException nnfe) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "El programa servidor no esta listo. Intente mas tarde...");
      this.requestFocus();
    } catch (Exception e) {
      shrimp.helper.Excepciones.guardarExcepcionesAC(
          e, getClass().getName(), mDIShrimp.getSisInfoTO());
      this.requestFocus();
    }
  }
  private void buscar() {
    try {
      fechaDesde =
          validaciones.Validacion.fecha(
              jftfFechaDesde.getText().trim(), "dd-MM-yyyy", "yyyy-MM-dd");
      fechaHasta =
          validaciones.Validacion.fecha(
              jftfFechaHasta.getText().trim(), "dd-MM-yyyy", "yyyy-MM-dd");
      codigoCuentaDesde = jtfCuentaDesde.getText().trim();
      codigoCuentaHasta = jtfCuentaHasta.getText().trim();

      guardarParametroAux();
      llenarjTBalanceComprobacion();

      sorter = new javax.swing.table.TableRowSorter(jtable.getModel());
      if (jtable.getRowCount() > 0) {
        jtable.requestFocus();
        jtable.changeSelection(0, 0, false, false);
      } else {
        javax.swing.JOptionPane.showMessageDialog(this, "No hay resultados que mostrar...");
        this.jftfFechaDesde.requestFocus();
      }
    } catch (java.rmi.RemoteException re) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "Se perdio la conexion. Contacte con el administrador o intentelo más tarde...");
      jtable.requestFocus();
      if (jtable.getRowCount() > 0) {
        jtable.changeSelection(0, 0, false, false);
      }
    } catch (javax.ejb.EJBException eje) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "Se perdio la conexion. Contacte con el administrador o intentelo más tarde...");
      jtable.requestFocus();
      if (jtable.getRowCount() > 0) {
        jtable.changeSelection(0, 0, false, false);
      }
    } catch (javax.naming.NameNotFoundException nnfe) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "El programa servidor no esta listo. Intente mas tarde...");
      jtable.requestFocus();
      if (jtable.getRowCount() > 0) {
        jtable.changeSelection(0, 0, false, false);
      }
    } catch (Exception e) {
      shrimp.helper.Excepciones.guardarExcepcionesAC(
          e, getClass().getName(), mDIShrimp.getSisInfoTO());
    }
  }
  private boolean buscarDetalleContable(String codigoCuenta, String estado) {
    boolean encontro = false;
    if (estado.equals("DESDE")) {
      this.codigoCuentaDesde = codigoCuenta;
    }
    if (estado.equals("HASTA")) {
      this.codigoCuentaHasta = codigoCuenta;
    }
    try {
      llenarComboPlanCuentas(codigoCuenta);
    } catch (java.rmi.RemoteException re) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "Se perdio la conexion. Contacte con el administrador...");
    } catch (javax.ejb.EJBException eje) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "Se perdio la conexion. Contacte con el administrador...");
    } catch (javax.naming.NameNotFoundException nnfe) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "El programa servidor no esta listo. Intente mas tarde...");
    } catch (Exception e) {
      shrimp.helper.Excepciones.guardarExcepcionesAC(
          e, getClass().getName(), mDIShrimp.getSisInfoTO());
    }

    for (contabilidad.TO.ConCuentasTO conCuentasTO : listaConCuentasTO) {
      if (estado.equals("DESDE")) {
        if (conCuentasTO.getCuentaCodigo().equals(codigoCuenta)) {
          encontro = true;
          jftfFechaHasta.requestFocus();
          jlblNombreCuentaDesde.setText(conCuentasTO.getCuentaDetalle().trim());
          break;
        } else {
          jtfCuentaDesde.requestFocus();
        }
      }
      if (estado.equals("HASTA")) {
        if (conCuentasTO.getCuentaCodigo().equals(codigoCuenta)) {
          encontro = true;
          jbtnActualizar.requestFocus();
          jlblNombreCuentaHasta.setText(conCuentasTO.getCuentaDetalle().trim());
          break;
        } else {
          jtfCuentaHasta.requestFocus();
        }
      }
    }
    return encontro;
  }
Example #11
0
 private void formularioJIFPago(String contable) {
   java.util.List<String> comprobantes = validaciones.Validacion.separar(contable, "|");
   String periodo = comprobantes.get(0);
   String numero = comprobantes.get(2);
   shrimp.cartera.formularios.JIFCarConsultaPagos administrarPagos =
       new shrimp.cartera.formularios.JIFCarConsultaPagos(
           this.mDIShrimp, "Consulta de Pagos", "CONSULTAR", periodo, numero);
   try {
     administrarPagos.setSelected(true);
   } catch (Exception e) {
     shrimp.helper.Excepciones.guardarExcepcionesAC(
         e, getClass().getName(), mDIShrimp.getSisInfoTO());
     requestFocus();
   }
   administrarPagos.setVisible(true);
 }
Example #12
0
  private void jbtnReconstruirActualizarActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
    try {
      eventoKeyPressPadre();
      this.accion = "AMBOS";
      manejoControlesBotones(false);
      desde =
          jftfDesde.getValue() == null
              ? null
              : "'"
                  + validaciones.Validacion.fecha(jftfDesde.getText(), "dd-MM-yyyy", "yyyy-MM-dd")
                  + "'";
      hasta =
          jftfHasta.getValue() == null
              ? null
              : "'"
                  + validaciones.Validacion.fecha(jftfHasta.getText(), "dd-MM-yyyy", "yyyy-MM-dd")
                  + "'";
      this.jbtnActualizar.setEnabled(false);
      // hilo.init(this, bbResumenCorrida1, empresa, codigoSector, desde, hasta, tipoResumen);
      // hilo.start();
      Long tiempoInicio = System.currentTimeMillis();
      bbResumenCorrida1.setPrdListaResumenCorridaTO(
          ProduccionDelegate.getInstance()
              .getListaResumenCorridaTO(empresa, codigoSector, desde, hasta, tipoResumen));
      llenarjTable();
      long tiempoTotal = System.currentTimeMillis() - tiempoInicio;
      lbTimeEjecucion.setText(
          "Filas: "
              + jtable.getRowCount()
              + "  Tiempo: "
              + FormatoNumero.redondear(((double) tiempoTotal / 1000), 2)
              + " s");
      if (jtable.getRowCount() > 0) {
        jtable.requestFocus();
        jtable.changeSelection(0, 0, false, false);
        barraEstado(true);
        manejoControlesBotones(false);
      } else {
        javax.swing.JOptionPane.showMessageDialog(this, "No hay resultados que mostrar...");
      }

    } catch (Exception ex) {
      shrimp.helper.Excepciones.guardarExcepcionesAC(
          ex, getClass().getName(), mDIShrimp.getSisInfoTO());
    }
  }
Example #13
0
 private void escogerSector() {
   try {
     if (this.jcboCP.getSelectedIndex() > -1) {
       produccion.TO.PrdListaSectorTO prdListaSectorTO =
           this.produccionBBSector1.getListaPrdListaSectorTO().get(this.jcboCP.getSelectedIndex());
       this.codigoSector = prdListaSectorTO.getSecCodigo();
     } else
       javax.swing.JOptionPane.showMessageDialog(
           this, "Tiene que seleccionar un dato de la lista...\nIntente de nuevo...");
   } catch (javax.ejb.EJBException eje) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "Se perdio la conexion. Contacte con el administrador...");
   } catch (Exception e) {
     shrimp.helper.Excepciones.guardarExcepcionesAC(
         e, getClass().getName(), mDIShrimp.getSisInfoTO());
   }
 }
 private void jbtnRestaurarActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jbtnRestaurarActionPerformed
   // TODO add your handling code here:
   try {
     String mensaje =
         shrimp.contabilidad.delegate.ContabilidadDelegate.getInstance()
             .restaurarConContable(
                 sisUsuarioEmpresaTO.getEmpCodigo(),
                 perCodigo,
                 tipCodigo,
                 conNumero,
                 sisUsuarioEmpresaTO.getUsrCodigo(),
                 mDIShrimp.getSisInfoTO());
     if (mensaje.charAt(0) == 'T') {
       shrimp.helper.JDVentanaMensajes.showMessageDialog(
           new java.awt.Frame(),
           mensaje.substring(1),
           javax.swing.JOptionPane.INFORMATION_MESSAGE,
           javax.swing.JOptionPane.DEFAULT_OPTION);
       limpiar();
       bloquearDesbloquearControles(true);
     } else {
       shrimp.helper.JDVentanaMensajes.showMessageDialog(
           new java.awt.Frame(),
           mensaje.substring(1),
           javax.swing.JOptionPane.ERROR_MESSAGE,
           javax.swing.JOptionPane.DEFAULT_OPTION);
     }
   } catch (java.rmi.RemoteException re) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "Se perdio la conexion. Contacte con el administrador...");
     this.requestFocus();
   } catch (javax.ejb.EJBException eje) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "Se perdio la conexion. Contacte con el administrador...");
     this.requestFocus();
   } catch (javax.naming.NameNotFoundException nnfe) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "El programa servidor no esta listo. Intente mas tarde...");
     this.requestFocus();
   } catch (Exception e) {
     shrimp.helper.Excepciones.guardarExcepcionesAC(
         e, getClass().getName(), mDIShrimp.getSisInfoTO());
     this.requestFocus();
   }
 } // GEN-LAST:event_jbtnRestaurarActionPerformed
 private void jbtnExportarActionPerformed(java.awt.event.ActionEvent evt) {
   // TODO add your handling code here:
   try {
     guardarExcel();
   } catch (java.rmi.RemoteException re) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "Se perdio la conexion. Contacte con el administrador...");
   } catch (javax.ejb.EJBException eje) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "Se perdio la conexion. Contacte con el administrador...");
   } catch (javax.naming.NameNotFoundException nnfe) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "El programa servidor no esta listo. Intente mas tarde...");
   } catch (Exception e) {
     shrimp.helper.Excepciones.guardarExcepcionesAC(
         e, getClass().getName(), mDIShrimp.getSisInfoTO());
   }
 }
 /** Creates new form JIFRrhhAnticipo */
 public JIFRrhhUtilidadesConsulta(shrimp.componentes.GUI.MDIShrimp mDIShrimp, String titulo) {
   super(
       titulo, true, // resizable
       true, // closable
       true, // maximizable
       true); // iconifiable
   mDIShrimp.jTabbedPane.setVisible(false);
   this.mDIShrimp = mDIShrimp;
   this.sisUsuarioEmpresaTO = mDIShrimp.getSisUsuarioEmpresaTO();
   this.empresa = sisUsuarioEmpresaTO.getEmpCodigo();
   this.usuario = sisUsuarioEmpresaTO.getUsrCodigo();
   initComponents();
   accion = "INICIO";
   eventosKeyFormulario();
   tabulacion();
   teclasBotonesCalientes();
   manejoControles(false);
   limpiar();
   try {
     llenarComboSector();
     llenarComboPeriodo();
     sisGrupoTO =
         shrimp.sistema.delegate.SistemaDelegate.getInstance()
             .sisGrupoUsuariosTO(mDIShrimp.getSisInfoTO());
     manejoBotones();
     this.setVisible(true);
     mDIShrimp.desktopPane.add(this);
     eventos();
   } catch (java.rmi.RemoteException re) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "Se perdio la conexion. Contacte con el administrador...");
   } catch (javax.ejb.EJBException eje) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "Se perdio la conexion. Contacte con el administrador...");
   } catch (javax.naming.NameNotFoundException nnfe) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "El programa servidor no esta listo. Intente mas tarde...");
   } catch (Exception e) {
     shrimp.helper.Excepciones.guardarExcepcionesAC(
         e, getClass().getName(), mDIShrimp.getSisInfoTO());
   }
 }
 private void cancelar() {
   try {
     accion = "CANCELAR";
     fechaDesde = null;
     fechaHasta = null;
     llenarjTableUtilidades();
     manejoBotones();
     manejoControles(false);
     limpiar();
     jcboPeriodo.requestFocus();
   } catch (java.rmi.RemoteException re) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "Se perdio la conexion. Contacte con el administrador...");
   } catch (javax.ejb.EJBException eje) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "Se perdio la conexion. Contacte con el administrador...");
   } catch (javax.naming.NameNotFoundException nnfe) {
     javax.swing.JOptionPane.showMessageDialog(
         null, "El programa servidor no esta listo. Intente mas tarde...");
   } catch (Exception e) {
     shrimp.helper.Excepciones.guardarExcepcionesAC(
         e, getClass().getName(), mDIShrimp.getSisInfoTO());
   }
 }
  /** Creates new form JIFReporteBalanceGeneral */
  public JIFReporteMayorAuxiliarMultiple(
      shrimp.componentes.GUI.MDIShrimp mDIShrimp,
      String titulo,
      String cuenta,
      String desde,
      String hasta) {
    initComponents();
    this.setVisible(true);
    mDIShrimp.desktopPane.add(this);
    super.inicializar();
    this.setTitle(titulo);
    jPanel3.setBounds(0, 0, 520, 110);
    jPanelDatos.add(jPanel3, jlblNombreCuentaDesde);
    this.cuenta = cuenta;
    ////////////////////////////////////////////////////////
    mDIShrimp.jTabbedPane.setVisible(false);
    this.mDIShrimp = mDIShrimp;
    this.sisUsuarioEmpresaTO = mDIShrimp.getSisUsuarioEmpresaTO();
    guardarParametroAux();
    initCombos();
    tabulacion();
    eventosKeyFormulario();
    eventoKeyPress();
    teclasBotonesCalientes();
    barraEstado(false);
    // guardarParametroAux();
    if (cuenta != null) {
      try {
        this.contabilidadBBCuentas1 = new shrimp.contabilidad.beanbinding.ContabilidadBBCuentas();
        this.contabilidadBBCuentas1.setListaConCuentasTO(
            shrimp.contabilidad.delegate.ContabilidadDelegate.getInstance()
                .getListaBuscarConCuentas(sisUsuarioEmpresaTO.getEmpCodigo(), cuenta, null));

        listaConCuentasTO = contabilidadBBCuentas1.getListaConCuentasTO();

        for (contabilidad.TO.ConCuentasTO conCuentasTO : listaConCuentasTO) {
          if (conCuentasTO.getCuentaCodigo().equals(cuenta)) {

            jlblNombreCuentaDesde.setText(conCuentasTO.getCuentaDetalle().trim());
            break;
          }
        }
      } catch (Exception e) {
        shrimp.helper.Excepciones.guardarExcepcionesAC(
            e, getClass().getName(), mDIShrimp.getSisInfoTO());
      }
    }

    jtable.addMouseListener(
        new java.awt.event.MouseAdapter() {

          public void mouseClicked(java.awt.event.MouseEvent evt) {
            jtblMayorMouseClicked(evt);
          }
        });

    try {
      eventoKeyPressPadre();
      contabilidadBBMayorAuxiliar1 =
          new shrimp.contabilidad.beanbinding.ContabilidadBBMayorAuxiliar();

      obtenerEstructura();
      this.estGrupo1 = listaEstructuraTO.get(0).getEstGrupo1();
      this.estGrupo2 = listaEstructuraTO.get(0).getEstGrupo2();
      this.estGrupo3 = listaEstructuraTO.get(0).getEstGrupo3();
      this.estGrupo4 = listaEstructuraTO.get(0).getEstGrupo4();
      this.estGrupo5 = listaEstructuraTO.get(0).getEstGrupo5();
      this.estGrupo6 = listaEstructuraTO.get(0).getEstGrupo6();
      largoCuenta =
          listaEstructuraTO.get(0).getEstGrupo1()
              + listaEstructuraTO.get(0).getEstGrupo2()
              + listaEstructuraTO.get(0).getEstGrupo3()
              + listaEstructuraTO.get(0).getEstGrupo4()
              + listaEstructuraTO.get(0).getEstGrupo5()
              + listaEstructuraTO.get(0).getEstGrupo6();
      obtenerRangoCuentas();
      llenarCombo();
      if (cuenta != null || desde != null || hasta != null) {
        jtfCuentaDesde.setText(cuenta);
        jftfFechaDesde.setValue(validaciones.Validacion.fecha(desde, "yyyy-MM-dd", "dd-MM-yyyy"));
        jftfFechaHasta.setValue(validaciones.Validacion.fecha(hasta, "yyyy-MM-dd", "dd-MM-yyyy"));
        buscar();
      }
      sisGrupoTO =
          shrimp.sistema.delegate.SistemaDelegate.getInstance()
              .sisGrupoUsuariosTO(mDIShrimp.getSisInfoTO());

    } catch (java.rmi.RemoteException re) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "Se perdio la conexion. Contacte con el administrador o intentelo más tarde...");
      jtable.requestFocus();
      if (jtable.getRowCount() > 0) {
        jtable.changeSelection(0, 0, false, false);
      }
    } catch (javax.ejb.EJBException eje) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "Se perdio la conexion. Contacte con el administrador o intentelo más tarde...");
      jtable.requestFocus();
      if (jtable.getRowCount() > 0) {
        jtable.changeSelection(0, 0, false, false);
      }
    } catch (javax.naming.NameNotFoundException nnfe) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "El programa servidor no esta listo. Intente mas tarde...");
      jtable.requestFocus();
      if (jtable.getRowCount() > 0) {
        jtable.changeSelection(0, 0, false, false);
      }
    } catch (Exception e) {
      shrimp.helper.Excepciones.guardarExcepcionesAC(
          e, getClass().getName(), mDIShrimp.getSisInfoTO());
    }

    jbtnActualizar.addActionListener(
        new java.awt.event.ActionListener() {

          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbtnActualizarActionPerformed(evt);
          }
        });

    jbtnExportar.addActionListener(
        new java.awt.event.ActionListener() {

          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbtnExportarActionPerformed(evt);
          }
        });

    jbtnImprimir.addActionListener(
        new java.awt.event.ActionListener() {

          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbtnImprimirActionPerformed(evt);
          }
        });

    if (cuenta != null) {
      jbtnActualizarActionPerformed(null);
    } else {
      try {
        robot = new Robot();
        robot.keyPress(KeyEvent.VK_ESCAPE);
        robot.keyRelease(KeyEvent.VK_ESCAPE);
      } catch (Exception ex) {
      }
    }
  }
Example #19
0
  /** Creates new form JIFResumenPesca */
  public JIFResumenPesca(shrimp.componentes.GUI.MDIShrimp mDIShrimp, String titulo) {

    mDIShrimp.jTabbedPane.setVisible(false);
    this.mDIShrimp = mDIShrimp;
    this.sisUsuarioEmpresaTO = mDIShrimp.getSisUsuarioEmpresaTO();
    empresa = this.sisUsuarioEmpresaTO.getEmpCodigo();
    try {
      eventoKeyPressPadre();
      initComponents();
      super.inicializar();
      this.setTitle(titulo);
      initCombos();
      jPanel1.setBounds(0, 0, 350, 110);
      jPanelDatos.add(jPanel1);
      teclasBotonesCalientes();
      eventosKeyFormulario();
      tabulacion();
      eventoKeyPress();
      barraEstado(false);
      manejoControlesBotones(true);

      desde = null;
      hasta = null;
      empresa = "¬";

      llenarBindingGroup();
      empresa = sisUsuarioEmpresaTO.getEmpCodigo();
      llenarCombo();

      fechaServidor = ProduccionDelegate.getInstance().consultarFechaMaxMin(empresa, tipoResumen);
      if (!fechaServidor.trim().isEmpty()) {
        desdeOriginal = fechaServidor.substring(0, fechaServidor.indexOf(",") - 1);
        hastaOriginal = fechaServidor.substring(fechaServidor.indexOf(",") + 1);
        jftfDesde.setValue(
            validaciones.Validacion.fecha(desdeOriginal, "yyyy-MM-dd", "dd-MM-yyyy"));
        jftfHasta.setValue(
            validaciones.Validacion.fecha(hastaOriginal, "yyyy-MM-dd", "dd-MM-yyyy"));
        this.setVisible(true);
        mDIShrimp.desktopPane.add(this);
      } else {
        JOptionPane.showMessageDialog(null, "No existen datos en corrida");
      }
      jbtnActualizar.addActionListener(
          new java.awt.event.ActionListener() {

            public void actionPerformed(java.awt.event.ActionEvent evt) {
              jbtnReconstruirActualizarActionPerformed(evt);
            }
          });
      jbtnImprimir.addActionListener(
          new java.awt.event.ActionListener() {

            public void actionPerformed(java.awt.event.ActionEvent evt) {
              jbtnImprimirActionPerformed(evt);
            }
          });
      jbtnExportar.addActionListener(
          new java.awt.event.ActionListener() {

            public void actionPerformed(java.awt.event.ActionEvent evt) {
              jbtnExportarActionPerformed(evt);
            }
          });

      try {
        String aux = codigoSector;
        this.codigoSector = "'@'";
        llenarjTable();
        this.codigoSector = aux;
      } catch (Exception ex) {
        shrimp.helper.Excepciones.guardarExcepcionesAC(
            ex, getClass().getName(), mDIShrimp.getSisInfoTO());
      }
    } catch (java.rmi.RemoteException re) {
      JOptionPane.showMessageDialog(
          null, "Se perdio la conexion. Contacte con el administrador...");
    } catch (javax.ejb.EJBException eje) {
      JOptionPane.showMessageDialog(
          null, "Se perdio la conexion. Contacte con el administrador...");
    } catch (NameNotFoundException nnfe) {
      JOptionPane.showMessageDialog(
          null, "El programa servidor no esta listo. Intente mas tarde...");
    } catch (Exception e) {
      shrimp.helper.Excepciones.guardarExcepcionesAC(
          e, getClass().getName(), mDIShrimp.getSisInfoTO());
    }

    try {
      robot = new Robot();
      robot.keyPress(KeyEvent.VK_ESCAPE);
      robot.keyRelease(KeyEvent.VK_ESCAPE);
    } catch (Exception ex) {
    }
  }
  /** Creates new form JIFRrhhDetalleAnticipos */
  public JIFRrhhConsolidadoBonosViaticos(
      shrimp.componentes.GUI.MDIShrimp mDIShrimp, String titulo) {
    /*
     * Para obtner cargar el formulario padre con el hijo
     */
    initComponents();
    this.setVisible(true);
    mDIShrimp.desktopPane.add(this);
    super.inicializar();
    this.setTitle(titulo);
    jPanel3.setBounds(0, 0, 200, 110);
    jPanelDatos.add(jPanel3);
    ////////////////////////////////////////////////////////
    mDIShrimp.jTabbedPane.setVisible(false);
    this.mDIShrimp = mDIShrimp;
    this.sisUsuarioEmpresaTO = mDIShrimp.getSisUsuarioEmpresaTO();
    teclasBotonesCalientes();
    eventosKeyFormulario();
    tabulacion();
    try {
      eventoKeyPressPadre();
      limpiar();
      eventos();
      manejoBotones(false);
      barraEstado(false);
    } catch (javax.ejb.EJBException eje) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "Se perdio la conexion. Contacte con el administrador...");
    } catch (Exception e) {
      shrimp.helper.Excepciones.guardarExcepcionesAC(
          e, getClass().getName(), mDIShrimp.getSisInfoTO());
    }
    jbtnActualizar.addActionListener(
        new java.awt.event.ActionListener() {

          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbtnActualizarActionPerformed(evt);
          }
        });

    jbtnExportar.addActionListener(
        new java.awt.event.ActionListener() {

          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbtnExportarActionPerformed(evt);
          }
        });

    jbtnImprimir.addActionListener(
        new java.awt.event.ActionListener() {

          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbtnImprimirActionPerformed(evt);
          }
        });

    try {
      robot = new Robot();
      robot.keyPress(KeyEvent.VK_ESCAPE);
      robot.keyRelease(KeyEvent.VK_ESCAPE);
    } catch (Exception ex) {
    }
  }
Example #21
0
  /** Creates new form JIFRrhhDetalleAnticipos */
  public JIFCarPagosDetalle(shrimp.componentes.GUI.MDIShrimp mDIShrimp, String titulo) {
    /* Para obtner cargar el formulario padre con el hijo */
    this.mDIShrimp = mDIShrimp;
    this.sisUsuarioEmpresaTO = mDIShrimp.getSisUsuarioEmpresaTO();
    initComponents();
    super.inicializar();
    this.setTitle(titulo);
    jPanel3.setBounds(0, 0, 380, 110);
    jPanelDatos.add(jPanel3);
    ////////////////////////////////////////////////////////
    tabulacion();
    accion = "INICIO";
    eventosKeyFormulario();
    jcboCP.requestFocus();
    try {
      eventoKeyPressPadre();
      limpiar();
      llenarCombo();
      eventos();
      eventoPopupMenu();
      sisGrupoTO =
          shrimp.sistema.delegate.SistemaDelegate.getInstance()
              .sisGrupoUsuariosTO(mDIShrimp.getSisInfoTO());
      manejoBotones();
      manejoControles(false);
      barraEstado(false);
      this.setVisible(true);
      mDIShrimp.desktopPane.add(this);
    } catch (java.rmi.RemoteException re) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "Se perdio la conexion. Contacte con el administrador...");
      jcboCP.setSelectedIndex(-1);
    } catch (javax.ejb.EJBException eje) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "Se perdio la conexion. Contacte con el administrador...");
      jcboCP.setSelectedIndex(-1);
    } catch (javax.naming.NameNotFoundException nnfe) {
      javax.swing.JOptionPane.showMessageDialog(
          null, "El programa servidor no esta listo. Intente mas tarde...");
      jcboCP.setSelectedIndex(-1);
    } catch (Exception e) {
      shrimp.helper.Excepciones.guardarExcepcionesAC(
          e, getClass().getName(), mDIShrimp.getSisInfoTO());
    }

    jbtnActualizar.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbtnActualizarActionPerformed(evt);
          }
        });

    jbtnExportar.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbtnExportarActionPerformed(evt);
          }
        });

    jbtnImprimir.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbtnImprimirActionPerformed(evt);
          }
        });

    try {
      robot = new Robot();
      robot.keyPress(KeyEvent.VK_ESCAPE);
      robot.keyRelease(KeyEvent.VK_ESCAPE);
    } catch (Exception ex) {
    }
  }