ajout sauvegarde MPD
This commit is contained in:
@@ -188,7 +188,7 @@ public class TestTexteMNP{
|
||||
////System.out.println(agf.getPromotion().monPrint());
|
||||
|
||||
////System.out.println("==========================");
|
||||
////System.out.println("Partition du groupe racine en 3 groupes TD.");
|
||||
////System.out.println("Partition du groupe racine en 3 groupes TD.");*/
|
||||
agf.createPartition(agf.getPromotion(), "TD",4);
|
||||
//////System.out.println(agf.getPromotion().monPrint());
|
||||
|
||||
@@ -198,8 +198,7 @@ public class TestTexteMNP{
|
||||
////System.out.println("== Cette version ajoute les étudiants automatiquement pour une partition ");
|
||||
for(Groupe g : racineDeLaPartition.getSousGroupes()){
|
||||
////System.out.println(g.monPrint());
|
||||
}
|
||||
|
||||
}/*
|
||||
////System.out.println("==========================");
|
||||
////System.out.println("Création d'un changement");
|
||||
Iterator<Groupe> itgr = racineDeLaPartition.getSousGroupes().iterator();
|
||||
@@ -248,13 +247,13 @@ public class TestTexteMNP{
|
||||
"chaignea", "Chaigneauphpmyadmin");
|
||||
try{
|
||||
PreparedStatement pst = cnx.prepareStatement(
|
||||
"INSERT INTO `Etudiant` (`id`, `nom`, `prenom`) VALUES (?, ?, ?);");
|
||||
for(Etudiant et: agf.getPromotion().getEtudiants()){
|
||||
pst.setInt(1, et.getId());
|
||||
pst.setString(2, et.getNom());
|
||||
pst.setString(3, et.getPrenom());
|
||||
pst.executeQuery();
|
||||
}
|
||||
"INSERT INTO `CONTIENT` (`idGroupe`, `idEt`) VALUES (?, ?);");
|
||||
Groupe g=agf.getPromotion();
|
||||
for(Etudiant et: g.getEtudiants()){
|
||||
pst.setInt(1, g.getId());
|
||||
pst.setInt(2, et.getId());
|
||||
pst.executeQuery();
|
||||
}
|
||||
pst.close();
|
||||
}catch(SQLException ef){
|
||||
System.out.println("erreur dans la preparation");
|
||||
|
Reference in New Issue
Block a user