Package ventas.com.entity

Examples of ventas.com.entity.Cliente


  private String mensaje;
  private String accion;
        private Cliente cliente;

  public BeanClientes() {
    cliente = new Cliente();
    lista = new ArrayList<Cliente>();
  }
View Full Code Here


                PreparedStatement pstm = cn.prepareStatement(query);
                nombre = "%" + nombre + "%";
                pstm.setString(1, nombre);
                ResultSet rs = pstm.executeQuery();
                while( rs.next() ){
                        Cliente cli = new Cliente();
                        cli.setId(rs.getLong("IdCliente"));
                        cli.setNombre(rs.getString("nombre"));
                        cli.setDireccion(rs.getString("direccion"));
                        cli.setRuc(rs.getString("ruc"));
                        cli.setTelefono(rs.getString("telefono"));
                        cli.setEmail(rs.getString("email"));
                        lista.add(cli);
                }
        } catch (Exception e) {
                throw e;
        } finally {
View Full Code Here

    }

    @Override
    public Cliente consultarPorId(long id) throws Exception {
        Connection cn = null;
        Cliente cli = null;
        try {
                cn = AccesoDB.getConnection();
                String query = "select * from clientes where IdCliente = ?";
                PreparedStatement pstm = cn.prepareStatement(query);
                pstm.setLong(1, id);
                ResultSet rs = pstm.executeQuery();
                if (rs.next()) {
                    cli = new Cliente();
                    cli.setId(rs.getLong("IdCliente"));
                    cli.setNombre(rs.getString("nombre"));
                    cli.setDireccion(rs.getString("direccion"));
                    cli.setRuc(rs.getString("ruc"));
                    cli.setTelefono(rs.getString("telefono"));
                    cli.setEmail(rs.getString("email"));
            }
        } catch (Exception e) {
                throw e;
        } finally {
                try {
View Full Code Here

TOP

Related Classes of ventas.com.entity.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.