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
|
void jButton4_actionPerformed(ActionEvent e) {
if(e.getSource()==jButton4){
try {
connection con = new connection();
String C=this.jTextField1.getText();
int CIN=Integer.parseInt(C);
String nom = this.jTextField2.getText();
String prenom = this.jTextField3.getText();
String idF=this.jTextField4.getText();
int id_filiere=Integer.parseInt(idF);
String idp=this.jTextField5.getText();
int id_PFE=Integer.parseInt(idp);
String nc=this.jTextField6.getText();
int NCE=Integer.parseInt(nc);
String email = this.jTextField7.getText();
String sql = "DELETE FROM Etudiant WHERE nom='missaoui'";
con.stmt.executeUpdate(sql);
con.stmt.close();
JOptionPane.showMessageDialog(null, " voulez-vous vraiment supprimer cet Etudiant",
"information",
JOptionPane.INFORMATION_MESSAGE);
/////////
}
catch (NumberFormatException ex) {
JOptionPane.showMessageDialog(null, ex.getMessage(), "erreur",
JOptionPane.QUESTION_MESSAGE);
}
catch (SQLException ex) {
JOptionPane.showMessageDialog(null, ex.getMessage(), "erreur",
JOptionPane.QUESTION_MESSAGE);
}}
}
} |
Partager