Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 224 Rev 229
Line 904... Line 904...
904
		Observation obs=new Observation(espece.getText(),numeroNom,commune.getText(),departement,lieudit.getText(),station.getText(),milieu.getText(), comment.getText(),date.getRawValue());	
904
		Observation obs=new Observation(espece.getText(),numeroNom,commune.getText(),departement,lieudit.getText(),station.getText(),milieu.getText(), comment.getText(),date.getRawValue());	
905
		observationMediateur.ajouterObservation(obs);
905
		observationMediateur.ajouterObservation(obs);
906
	}
906
	}
Line 907... Line 907...
907
	
907
	
-
 
908
	private void modifierObservation() {
-
 
909
		
-
 
910
		if(departement.equals("000null") || departement.equals("")) {
-
 
911
			String[] depCom = commune.getText().split(" ");
-
 
912
			if(depCom.length > 1) {
-
 
913
				String dep = depCom[1].replace('(', ' ');
-
 
914
				dep =dep.replace(')', ' ');
-
 
915
				dep = dep.trim();
-
 
916
				dep = dep.replace('\\',' ');
-
 
917
				dep = dep.trim();
-
 
918
				
-
 
919
				try
-
 
920
				{
-
 
921
					int nDep = Integer.parseInt(dep);
-
 
922
					if(nDep > 0 && nDep < 110) {
-
 
923
						departement = dep ;
-
 
924
					}
-
 
925
				}
-
 
926
				catch(NumberFormatException e)
-
 
927
				{
-
 
928
					departement = "" ;
-
 
929
				}
-
 
930
			}
-
 
931
		}
908
	private void modifierObservation() {
932
		
909
		Observation obs=new Observation(espece.getText(),numeroNom,commune.getText(),departement,lieudit.getText(),station.getText(),milieu.getText(), comment.getText(),date.getRawValue());
933
		Observation obs=new Observation(espece.getText(),numeroNom,commune.getText(),departement,lieudit.getText(),station.getText(),milieu.getText(), comment.getText(),date.getRawValue());
Line 910... Line 934...
910
		obs.setNumeroOrdre(numeroOrdre);
934
		obs.setNumeroOrdre(numeroOrdre);