) {
JOptionPane.showMessageDialog(null, "All data cannot be empty");
} else {
sess.getTransaction().begin();
LogInformation log = new LogInformation();
if(item == null || item.getId() == null){
log.setCreateDate(new Timestamp(System.currentTimeMillis()));
log.setCreateBy(token.getUser().getId());
} else {
log = item.getLogInformation();
}
log.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
log.setLastUpdateBy(token.getUser().getId());
log.setActiveFlag(1);
if(cmbCategory.getItemCount()==0) JOptionPane.showMessageDialog(null, "Please insert category first");
if(cmbUom.getItemCount()==0) JOptionPane.showMessageDialog(null, "Please insert Unit Of Measurement first");
Check check = new Check();