Пример #1
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();
  }
Пример #2
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));
  }