Package base

Examples of base.Cliente


      botonEliminar.setText("Eliminar");
      botonEliminar.setBounds(new Rectangle(237, 15, 100, 20));
      //botonEliminar.setIcon(new ImageIcon(getClass().getResource("/imagenes/eliminar.gif")));
      botonEliminar.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent e) {
          Cliente c = new Cliente();
          c.setIdCliente(Integer.valueOf(textoId.getText()));
          Cliente cliente=new Cliente();
          for(int i=0;i<ClienteDTO.listaClientes().size();i++ ){
            cliente =(Cliente)ClienteDTO.listaClientes().get(i);
            if (cliente.getIdCliente().equals(c.getIdCliente()))
              break;
          }
          int opcion = JOptionPane.showConfirmDialog(null,"�Est� seguro que desea eliminar al clientes?");
          if(opcion == JOptionPane.YES_OPTION)
          {
            ClienteDTO.EliminaCliente(c);
            cargarTablaClientes();
          }
         
        }
      });
     
     
      botonNuevo = new JButton();
      //botonNuevo.setIcon(new ImageIcon(getClass().getResource("/imagenes/agregar.gif")));
      botonNuevo.setBounds(new Rectangle(10, 15, 100, 20));
      botonNuevo.setText("Nuevo");
      botonNuevo.addActionListener(new java.awt.event.ActionListener()
              {
                public void actionPerformed(java.awt.event.ActionEvent e)
                {
                  AltaCliente a = new AltaCliente(AbmCliente.this);
                  AbmCliente.this.removeAll();
                  AbmCliente.this.add(a);
                  AbmCliente.this.repaint();
                }
              });
         
      botonModificar = new JButton();
      botonModificar.setText("Modificar");
      botonModificar.setBounds(new Rectangle(124,15, 100, 20));
      //botonModificar.setIcon(new ImageIcon(getClass().getResource("/imagenes/modificar.gif")));
      botonModificar.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent e) {
          Cliente c=new Cliente();
          c.setIdCliente(Integer.valueOf(textoId.getText()));
          Cliente cliente=new Cliente();
          for(int i=0;i<ClienteDTO.listaClientes().size();i++ ){
            cliente =(Cliente)ClienteDTO.listaClientes().get(i);
            if (cliente.getIdCliente().equals(c.getIdCliente()))
              break;
          }
          ModificarCliente m=new ModificarCliente(AbmCliente.this,cliente);
          AbmCliente.this.removeAll();
          AbmCliente.this.repaint();
View Full Code Here


 
 
  public void cargarTablaClientes()
  {
    dtm.setNumRows(0);
    Cliente cliente = new Cliente();
    for(int i=0;i<ClienteDTO.listaClientes().size();i++ )
    {
      cliente =(Cliente)ClienteDTO.listaClientes().get(i);
      insertarFila(cliente);
    }
View Full Code Here

 
  private void clickEnTablaClientes()
  {
    int id = Integer.parseInt((String) table.getValueAt(table.getSelectedRow(), 0));
   
    Cliente cliente = ClienteDTO.buscarCliente(id);
   
    textoId.setText(String.valueOf(cliente.getIdCliente()));
    textoNyA.setText(cliente.getNombreApellido());
    textoTipoId.setText(cliente.getTipoIdFiscal());
    textoIdFiscal.setText(cliente.getIdFiscal());
    textoTelefono.setText(cliente.getTelefono());
   
    cliente = null;
  }
View Full Code Here

      }

      public void actionPerformed(ActionEvent e) {
       
        int id = Integer.parseInt((String) abmCliente.tabla.getValueAt(fila, 0));
          Cliente cliente = halconController.GetClienteById(id);
                  
          if (columna==mod){
           
            ModificarCliente m = new ModificarCliente(this.abmCliente, cliente);
            abmCliente.removeAll();
View Full Code Here

TOP

Related Classes of base.Cliente

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.