예제 #1
0
 private void llenarListaProveedores(String busqueda) throws Exception {
   listaInvProveedorTO =
       shrimp.inventario.delegate.InventarioDelegate.getInstance()
           .getProveedorTO(sisUsuarioEmpresaTO.getEmpCodigo(), busqueda);
   if (listaInvProveedorTO.size() > 0) {
     invProveedorTO = listaInvProveedorTO.get(0);
     proveedorId = invProveedorTO.getProvCodigo();
     jtfProveedor.setText(invProveedorTO.getProvNombre());
   } else {
     shrimp.inventario.formularios.JDBuscarProveedores dialog =
         new shrimp.inventario.formularios.JDBuscarProveedores(
             mDIShrimp,
             new javax.swing.JFrame(),
             true,
             sisUsuarioEmpresaTO.getEmpCodigo(),
             busqueda,
             sisUsuarioEmpresaTO.getUsrCodigo(),
             false);
     dialog.setLocationRelativeTo(null);
     invProveedorTO = dialog.invProveedorTO;
     if (invProveedorTO != null) {
       proveedorId = invProveedorTO.getProvCodigo();
       jtfProveedor.setText(invProveedorTO.getProvNombre());
     } else {
       proveedorId = null;
       jtfProveedor.setText("");
     }
   }
 }
 private void obtenerRangoCuentas() throws Exception {
   bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
   this.contabilidadBBCuentas = new shrimp.contabilidad.beanbinding.ContabilidadBBCuentas();
   this.contabilidadBBCuentas.setListaConCuentasTO(
       shrimp.contabilidad.delegate.ContabilidadDelegate.getInstance()
           .getRangoCuentasTO(
               sisUsuarioEmpresaTO.getEmpCodigo(),
               codigoCuentaDesdeAux,
               codigoCuentaHastaAux,
               largoCuenta,
               sisUsuarioEmpresaTO.getUsrCodigo(),
               mDIShrimp.getSisInfoTO()));
   this.bindingGroup.bind(); // consigue los datos
 }
예제 #3
0
 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
 /** 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());
   }
 }