1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
if(comboBox_2.getSelectedItem().toString()!=null)
statement = connection.prepareStatement("UPDATE Client SET Nom_projet=? WHERE IDClient=(SELECT IDClient FROM Client WHERE Nom=? AND Prenom=?)");
statement.setString(1, comboBox_2.getSelectedItem().toString());
statement.setString(2,comboBox.getSelectedItem().toString());
statement.setString(3,comboBox_1.getSelectedItem().toString());
statement.executeUpdate( );
if(textField.getText()!=null)
statement = connection.prepareStatement("UPDATE Client SET prix_loge=? WHERE IDClient=(SELECT IDClient FROM Client WHERE Nom=? AND Prenom=?)");
statement.setString(1, textField.getText());
statement.setString(2,comboBox.getSelectedItem().toString());
statement.setString(3,comboBox_1.getSelectedItem().toString());
statement.executeUpdate( );
if(idbloc.getText() !=null)
statement = connection.prepareStatement("UPDATE Liste SET Bloc=? WHERE IDClient=(SELECT IDClient FROM Client WHERE Nom=? AND Prenom=?)");
statement.setString(1, idbloc.getText());
statement.setString(2,comboBox.getSelectedItem().toString());
statement.setString(3,comboBox_1.getSelectedItem().toString());
statement.executeUpdate( );
if(comboBox_1.getSelectedItem().toString()!=null)
statement = connection.prepareStatement("UPDATE Liste SET Type=? WHERE IDClient=(SELECT IDClient FROM Client WHERE Nom=? AND Prenom=?)");
statement.setString(1, comboBox_3.getSelectedItem().toString());
statement.setString(2,comboBox.getSelectedItem().toString());
statement.setString(3,comboBox_1.getSelectedItem().toString());
statement.executeUpdate( );
if(surf.getText()!=null)
statement = connection.prepareStatement("UPDATE Liste SET Surface=?WHERE IDClient=(SELECT IDClient FROM Client WHERE Nom=? AND Prenom=?)");
statement.setString(1, surf.getText());
statement.setString(2,comboBox.getSelectedItem().toString());
statement.setString(3,comboBox_1.getSelectedItem().toString());
statement.executeUpdate( );
if(comboBox_4.getSelectedItem().toString()!=null)
statement = connection.prepareStatement("UPDATE Liste SET Etage=? WHERE IDClient=(SELECT IDClient FROM Client WHERE Nom=? AND Prenom=?)");
statement.setString(1, comboBox_2.getSelectedItem().toString());
statement.setString(2,comboBox.getSelectedItem().toString());
statement.setString(3,comboBox_1.getSelectedItem().toString());
statement.executeUpdate( );
if(n.getText()!=null)
statement = connection.prepareStatement("UPDATE Client SET N°_loge=? WHERE IDClient=(SELECT IDClient FROM Client WHERE Nom=? AND Prenom=?)");
statement.setString(1, n.getText());
statement.setString(2,comboBox.getSelectedItem().toString());
statement.setString(3,comboBox_1.getSelectedItem().toString());
statement.executeUpdate( ); |
Partager