Example #1
0
 public void mouseClicked(MouseEvent e) {
   SistemaBBEmpresa bbEmpresa1 = new SistemaBBEmpresa();
   try {
     bbEmpresa1.setListaSisListaEmpresaTO(
         SistemaDelegate.getInstance().getListaLoginEmpresaTO(sisInfoTO.getInfUsuario()));
   } catch (Exception ex) {
     Logger.getLogger(StatusBar.class.getName()).log(Level.SEVERE, null, ex);
   }
   if (bbEmpresa1.getListaSisListaEmpresaTO().size() == 1) {
     return;
   }
   mostrarEmpresas();
 }
  /** 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();
    }
  }
 /** 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 llenarComboPeriodo() throws Exception {
   this.sistemaBBPeriodo1.setListaPeriodoTO(
       shrimp.sistema.delegate.SistemaDelegate.getInstance()
           .getListaSisPeriodoTO(sisUsuarioEmpresaTO.getEmpCodigo()));
   this.bindingGroup.bind();
   this.jcboPeriodo.updateUI();
   listaPeriodoTO = sistemaBBPeriodo1.getListaPeriodoTO();
   if (listaPeriodoTO.size() > 0) {
     this.jcboPeriodo.setSelectedIndex(0);
     sistema.TO.SisListaPeriodoTO sisListaPeriodoTO =
         this.sistemaBBPeriodo1.getListaPeriodoTO().get(this.jcboPeriodo.getSelectedIndex());
     perCodigo = sisListaPeriodoTO.getPerCodigo();
   } else {
     perCodigo = "";
     javax.swing.JOptionPane.showMessageDialog(
         this,
         "No se pudieron cargar datos de la Base de Datos...\n\nPosibles razones:"
             + "\n- No existen datos en la tabla Periodo."
             + "\n\nCorrija el error ingresando los datos necesarios o contacte con el administrador");
     this.requestFocus();
   }
 }
  /** 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 #6
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) {
    }
  }