Ejemplo n.º 1
0
  public List<DetallesVenta> execute() {

    Connection connection = null;
    DetallesVentaGateway venta = PersistenceFactory.getDetallesVentaGateaway();
    List<DetallesVenta> lista = null;

    try {

      connection = Jdbc.getConnection();
      venta.setConnection(connection);
      lista = venta.listAll();

    } catch (SQLException e) {
      e.printStackTrace();
    } finally {
      Jdbc.close(connection);
    }
    return lista;
  }