Advertisement
myrazel

Untitled

Jan 6th, 2015
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. public void insertDetailTransaksi(Integer trId, List<TrTeaDetail> trDetail){
  2. session.beginTransaction();
  3. for(TrTeaDetail td:trDetail ){
  4. td.setTransactionID(trId);
  5. session.save(td);
  6. Tea t = td.product();
  7. int qt = t.getTeaQty();
  8. int qte = td.getQuantityTea();
  9. t.setTeaQty(t.getTeaQty()-td.getQuantityTea());
  10. session.update(t);
  11. }
  12. session.getTransaction().commit();
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement