SHARE
TWEET

Untitled

a guest Jun 25th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private void A1ActionPerformed (java.awt.event.ActionEvent evt) {
  2.         try {
  3.             Object day = cmbHari.getSelectedItem ();
  4.             Object stud = cmbStud.getSelectedItem ();
  5.             String sql = "SELECT * FROM message where id_kursi = '" + A1.getText () + "' AND id_film = '" + txtIDFilm.getText () + "' AND start = '" + txtJam.getText () + "' AND day = '"+ day +"' AND studio = '"+ stud +"' ";
  6.             Stat statement = conn.createStatement ();
  7.             ResultSet result = stat.executeQuery (sql);
  8.             if (result.equals (true)) {
  9.                 JOptionPane.showMessageDialog (null, "Seat has been booked");
  10.             } else {
  11.                 JOptionPane.showMessageDialog (null, "Seat booked");
  12.                 txtKur.setText ("A1");
  13.             }
  14.         } catch (SQLException ex) {
  15.             Logger.getLogger (belitiket.class.getName ()). Log (Level.SEVERE, null, ex);
  16.         }
  17.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top