298,7 → 298,7 |
|
if (mode.equals("AJOUT")) { |
// Ajout des informations sur la Structure |
//mediateur.ajouterStructure(this, structure); |
mediateur.ajouterStructure(this, structure); |
// L'ajout des relations StructureAPersonne se fait quand la structure a été ajoutée |
// Voir la méthode rafraichir(). |
} else if (mode.equals("MODIF")) { |
323,7 → 323,8 |
ArrayList<String> messages = new ArrayList<String>(); |
|
// Vérification des infos sur la structure |
if ( (identificationOnglet.getData("acces").equals(true) && (nomStructureChp.getValue() == null || nomStructureChp.getValue().equals(""))) || |
if ( (identificationOnglet.getData("acces").equals(true) && nomStructureChp.getValue() == null) || |
(identificationOnglet.getData("acces").equals(true) && nomStructureChp.getValue().equals("")) || |
(identificationOnglet.getData("acces").equals(false) && identification.getNom().equals(""))) { |
messages.add("Veuillez indiquez un nom à l'institution."); |
} |
663,7 → 664,9 |
structure.setCourriel(emailChp.getValue()); |
structure.setUrl(Structure.URL_SITE, urlChp.getValue()); |
|
if (nbreTotalPersonneStructureChp.getValue() != null) { |
structure.setNbrePersonne(nbreTotalPersonneStructureChp.getValue().intValue()); |
} |
|
return structure; |
} |
670,7 → 673,11 |
} |
|
private void peuplerStructureIdentification() { |
if (identification != null && identificationOnglet.getData("acces").equals(false)) { |
if (mode.equals("AJOUT")) { |
// Indique que l'ongleta pu être modifié pour la méthode collecter... |
identificationOnglet.setData("acces", true); |
} |
if (mode.equals("MODIF") && identification != null && identificationOnglet.getData("acces").equals(false)) { |
idStructureChp.setValue(identification.getId()); |
nomStructureChp.setValue(identification.getNom()); |
if (!identification.getIdAlternatif().isEmpty()) { |
993,7 → 1000,7 |
} |
|
// Ajout de la personne dans la liste correspondant à son état (ajouté ou modifié) |
if (personne.get("etat").equals("A")) {// Une personne ajoutée |
if (personne.get("etat") != null && personne.get("etat").equals("A")) {// Une personne ajoutée |
personnelAjoute.put(""+i, personne); |
} else {// Une personne modifiée |
personnelModifie.put(personne.getId(), personne); |
1073,8 → 1080,8 |
cp.setFrame(true); |
|
List<StructureAPersonne> personnes = new ArrayList<StructureAPersonne>(); |
personnes.add(new StructureAPersonne(Valeur.FONCTION_DIRECTEUR, StructureAPersonne.ROLE_EQUIPE)); |
personnes.add(new StructureAPersonne(Valeur.FONCTION_CONSERVATEUR, StructureAPersonne.ROLE_EQUIPE)); |
personnes.add(new StructureAPersonne(StructureAPersonne.FONCTION_DIRECTEUR, StructureAPersonne.ROLE_EQUIPE)); |
personnes.add(new StructureAPersonne(StructureAPersonne.FONCTION_CONSERVATEUR, StructureAPersonne.ROLE_EQUIPE)); |
|
personnelGrilleMagazin = new ListStore<StructureAPersonne>(); |
personnelGrilleMagazin.add(personnes); |