public boolean Validacija(char mode) { if (vl.isEmpty(jpDetail.jlrBrojdok)) return false; if (getRaQueryDataSet().getBigDecimal("IZNOS").signum() <= 0) { jpDetail.jraIznos.requestFocus(); JOptionPane.showMessageDialog( this.getWindow(), "Pogrešan iznos uplate!", "Greška", JOptionPane.ERROR_MESSAGE); return false; } if (mode == 'N') { vl.execSQL( "SELECT MAX(rbr) AS num FROM kamupl WHERE knjig='" + getRaQueryDataSet().getString("KNJIG") + "' AND brojdok='" + getRaQueryDataSet().getString("BROJDOK") + "' AND cpar=" + getRaQueryDataSet().getInt("CPAR")); vl.RezSet.open(); if (vl.RezSet.rowCount() > 0) getRaQueryDataSet().setInt("RBR", vl.RezSet.getInt("NUM") + 1); else getRaQueryDataSet().setInt("RBR", 1); } return true; }
private boolean myValid() { if (vl.isEmpty(jpGetVrnal.jlrCVRNAL)) return false; if (vl.isEmpty(jtDATUMKNJ)) return false; if (vl.isEmpty(jtDATUMDO)) return false; return true; }