ajout selection etudiant BD, et petite modif Visuelle
This commit is contained in:
@@ -251,13 +251,15 @@ public class AbstractGroupeFactoryNP implements AbstractGroupeFactory {
|
||||
Set<Etudiant> s=new LinkedHashSet<>();
|
||||
//on retourne tous les etudiants
|
||||
if(nomEtu==null){
|
||||
for(Etudiant et:this.getPromotion().getEtudiants()){
|
||||
s.add(et);
|
||||
if(this.getPromotion()!=null){
|
||||
for(Etudiant et:this.getPromotion().getEtudiants()){
|
||||
s.add(et);
|
||||
}
|
||||
}
|
||||
//ceux qui sont connu mais pas dans la promo
|
||||
Connection cnx=this.cnx();
|
||||
try{
|
||||
PreparedStatement pst=cnx.prepareStatement("SELECT * FROM Etudiant natural join CONTIENT where Etudiant.id NOT IN (SELECT CONTIENT.idEt FROM CONTIENT) Group by Etudiant.id;");
|
||||
PreparedStatement pst=cnx.prepareStatement("SELECT * FROM Etudiant where Etudiant.id NOT IN (SELECT CONTIENT.idEt FROM CONTIENT) Group by Etudiant.id;");
|
||||
ResultSet rs=pst.executeQuery();
|
||||
while(rs.next()){
|
||||
s.add(new EtudiantNP(rs.getString(2), rs.getString(3), rs.getInt(1)));
|
||||
|
Reference in New Issue
Block a user