Subversion Repositories eFlore/Applications.coel

Rev

Rev 245 | Rev 268 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 245 Rev 263
Line 296... Line 296...
296
			StructureValorisation valorisation = collecterStructureValorisation();
296
			StructureValorisation valorisation = collecterStructureValorisation();
297
			collecterStructurePersonnel();
297
			collecterStructurePersonnel();
Line 298... Line 298...
298
			
298
			
299
			if (mode.equals("AJOUT")) {
299
			if (mode.equals("AJOUT")) {
300
				// Ajout des informations sur la Structure
300
				// Ajout des informations sur la Structure
301
				//mediateur.ajouterStructure(this, structure);
301
				mediateur.ajouterStructure(this, structure);
302
				// L'ajout des relations StructureAPersonne se fait quand la structure a été ajoutée
302
				// L'ajout des relations StructureAPersonne se fait quand la structure a été ajoutée
303
				// Voir la méthode rafraichir().
303
				// Voir la méthode rafraichir().
304
			} else if (mode.equals("MODIF")) {
304
			} else if (mode.equals("MODIF")) {
305
				// Modification des informations sur la Structure
305
				// Modification des informations sur la Structure
Line 321... Line 321...
321
	
321
	
322
	private Boolean verifierFormulaire() {
322
	private Boolean verifierFormulaire() {
Line 323... Line 323...
323
		ArrayList<String> messages = new ArrayList<String>();
323
		ArrayList<String> messages = new ArrayList<String>();
324
		
324
		
-
 
325
		// Vérification des infos sur la structure
325
		// Vérification des infos sur la structure
326
		if (	(identificationOnglet.getData("acces").equals(true) && nomStructureChp.getValue() == null) ||
326
		if (	(identificationOnglet.getData("acces").equals(true) && (nomStructureChp.getValue() == null || nomStructureChp.getValue().equals(""))) || 
327
				(identificationOnglet.getData("acces").equals(true) && nomStructureChp.getValue().equals("")) ||
327
				(identificationOnglet.getData("acces").equals(false) && identification.getNom().equals(""))) {
328
				(identificationOnglet.getData("acces").equals(false) && identification.getNom().equals(""))) {
Line 328... Line 329...
328
			messages.add("Veuillez indiquez un nom à l'institution.");
329
			messages.add("Veuillez indiquez un nom à l'institution.");
Line 661... Line 662...
661
			structure.setTelephone(telChp.getValue());
662
			structure.setTelephone(telChp.getValue());
662
			structure.setFax(faxChp.getValue());
663
			structure.setFax(faxChp.getValue());
663
			structure.setCourriel(emailChp.getValue());
664
			structure.setCourriel(emailChp.getValue());
664
			structure.setUrl(Structure.URL_SITE, urlChp.getValue());
665
			structure.setUrl(Structure.URL_SITE, urlChp.getValue());
Line -... Line 666...
-
 
666
			
665
			
667
			if (nbreTotalPersonneStructureChp.getValue() != null) {
-
 
668
				structure.setNbrePersonne(nbreTotalPersonneStructureChp.getValue().intValue());
Line 666... Line 669...
666
			structure.setNbrePersonne(nbreTotalPersonneStructureChp.getValue().intValue());
669
			}
667
			
670
			
668
			return structure;
671
			return structure;
Line 669... Line 672...
669
		}
672
		}
-
 
673
	}
-
 
674
	
-
 
675
	private void peuplerStructureIdentification() {
-
 
676
		if (mode.equals("AJOUT")) {
670
	}
677
			// Indique que l'ongleta pu être modifié pour la méthode collecter...
671
	
678
			identificationOnglet.setData("acces", true);
672
	private void peuplerStructureIdentification() {
679
		}
673
		if (identification != null && identificationOnglet.getData("acces").equals(false)) {
680
		if (mode.equals("MODIF") && identification != null && identificationOnglet.getData("acces").equals(false)) {
674
			idStructureChp.setValue(identification.getId());
681
			idStructureChp.setValue(identification.getId());
675
			nomStructureChp.setValue(identification.getNom());
682
			nomStructureChp.setValue(identification.getNom());
Line 991... Line 998...
991
					if (specialite != null && !specialite.equals("")) {
998
					if (specialite != null && !specialite.equals("")) {
992
						personne.setSpecialite(specialite);
999
						personne.setSpecialite(specialite);
993
					}
1000
					}
Line 994... Line 1001...
994
					
1001
					
995
					// Ajout de la personne dans la liste correspondant à son état (ajouté ou modifié)
1002
					// Ajout de la personne dans la liste correspondant à son état (ajouté ou modifié)
996
					if (personne.get("etat").equals("A")) {// Une personne ajoutée
1003
					if (personne.get("etat") != null && personne.get("etat").equals("A")) {// Une personne ajoutée
997
						personnelAjoute.put(""+i, personne);
1004
						personnelAjoute.put(""+i, personne);
998
					} else {// Une personne modifiée
1005
					} else {// Une personne modifiée
999
						personnelModifie.put(personne.getId(), personne);
1006
						personnelModifie.put(personne.getId(), personne);
1000
					}
1007
					}
Line 1071... Line 1078...
1071
		cp.setWidth(1250);
1078
		cp.setWidth(1250);
1072
		cp.setHeight("100%");
1079
		cp.setHeight("100%");
1073
		cp.setFrame(true);
1080
		cp.setFrame(true);
Line 1074... Line 1081...
1074
		
1081
		
1075
		List<StructureAPersonne> personnes = new ArrayList<StructureAPersonne>();
1082
		List<StructureAPersonne> personnes = new ArrayList<StructureAPersonne>();
1076
		personnes.add(new StructureAPersonne(Valeur.FONCTION_DIRECTEUR, StructureAPersonne.ROLE_EQUIPE));
1083
		personnes.add(new StructureAPersonne(StructureAPersonne.FONCTION_DIRECTEUR, StructureAPersonne.ROLE_EQUIPE));
Line 1077... Line 1084...
1077
		personnes.add(new StructureAPersonne(Valeur.FONCTION_CONSERVATEUR, StructureAPersonne.ROLE_EQUIPE));
1084
		personnes.add(new StructureAPersonne(StructureAPersonne.FONCTION_CONSERVATEUR, StructureAPersonne.ROLE_EQUIPE));
1078
		
1085
		
1079
		personnelGrilleMagazin = new ListStore<StructureAPersonne>();
1086
		personnelGrilleMagazin = new ListStore<StructureAPersonne>();