Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 1.35 KB | None | 0 0
  1. def sql = new Sql(conn)
  2.  
  3.  
  4.  
  5.   try{
  6.  
  7.   Statement stmt = conn.createStatement();
  8.  
  9.     ResultSet rs;
  10.  
  11.     rs = stmt.executeQuery(query);
  12.  
  13.    
  14.  
  15.     while (rs.next()){
  16.  
  17.       typ = rs.getString("Typ_transakcji")                                   
  18.  
  19.   
  20.  
  21.   table = "<style type=\"text/css\">" +
  22.  
  23.             "table.tftable {font-size:10px;color:#333333;width:100%;border-width: 1px;border-color: #a9a9a9;border-collapse: collapse;}" +
  24.  
  25.             "table.tftable th {font-size:12px;background-color:#b8b8b8;border-width: 1px;padding: 8px;border-style: solid;border-color: #a9a9a9;}" +
  26.  
  27.             "table.tftable tr {background-color:#ffffff;}" +
  28.  
  29.             "table.tftable td {font-size:12px;border-width: 1px;padding: 8px;border-style: solid;border-color: #a9a9a9;}" +
  30.  
  31.             "</style>" +
  32.  
  33.             "<table class=\"tftable\">" +
  34.  
  35.            
  36.  
  37.             "<tr><td><b>Typ</b></td><td>Kontrahent</td><td>Nr Faktury</td></tr>" +
  38.  
  39.     "<tr><td>${typ}</td><td>${kontrahent}</td><td>${nrFaktury}</td></tr>" +
  40.  
  41.             "</table>"
  42.  
  43.     }
  44.  
  45.                 } finally{
  46.  
  47.       sql.close()
  48.  
  49.     }
  50.  
  51.   
  52.  
  53.   
  54.  
  55.   
  56.  
  57.     return table
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement