Exemplo n.º 1
0
 private void txtClienteActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_txtClienteActionPerformed
   this.txtRazonSocial.setText("");
   if (this.txtCliente.getText().trim().length() > 0) {
     presenter.getBuscarClienteHandler().stateChanged(new ChangeEvent(this));
   }
   this.cmdBuscar.requestFocus();
 }
Exemplo n.º 2
0
  private void cmdCancelarActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_cmdCancelarActionPerformed
    presenter.getCancelarImpresionHandler().stateChanged(new ChangeEvent(this));
    this.txtCliente.setText("");
    this.txtRazonSocial.setText("");

    SimpleDateFormat formatea = new SimpleDateFormat("dd/MM/yyyy");
    this.txtFecha.setText(formatea.format(GregorianCalendar.getInstance().getTime()));

    GenericoTableModel aModel = (GenericoTableModel) this.tblEnvios.getModel();
    aModel.limpiar();
    this.tblEnvios.addNotify();
    this.txtCliente.requestFocus();
  }
Exemplo n.º 3
0
  private void cmdBuscarActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_cmdBuscarActionPerformed
    GenericoTableModel aModel = (GenericoTableModel) this.tblEnvios.getModel();
    aModel.limpiar();
    this.tblEnvios.addNotify();
    if (txtFecha.getText().trim().length() > 0) {
      SimpleDateFormat formateador = new SimpleDateFormat("dd/MM/yyyy");
      try {
        fechaBusqueda = formateador.parse(txtFecha.getText());
      } catch (Exception e) {
        Icon Icon = null;
        JOptionPane.showMessageDialog(
            this, "La fecha no posee formato correcto", "Envios", JOptionPane.ERROR_MESSAGE, Icon);
      }
    }

    presenter.getBuscarEnvioHandler().stateChanged(new ChangeEvent(this));
  }
Exemplo n.º 4
0
  private void cmdEnviarActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_cmdEnviarActionPerformed
    Icon Icon = null;
    java.awt.event.ActionEvent evt2 = null;
    int rows = this.tblEnvios.getModel().getRowCount();
    if (rows == 0 || this.tblEnvios.getSelectedRow() == -1) {
      JOptionPane.showMessageDialog(
          this,
          "Debe seleccionar/buscar al menos un envío",
          "Envios",
          JOptionPane.INFORMATION_MESSAGE,
          Icon);
    } else {

      presenter.getEnviarImpresionHandler().stateChanged(new ChangeEvent(this));
      this.cmdCancelarActionPerformed(evt2);
      JOptionPane.showMessageDialog(
          this,
          "Los envios fueron enviados a impresora",
          "Envios",
          JOptionPane.INFORMATION_MESSAGE,
          Icon);
    }
  }