906,6 → 906,30 |
} |
|
private void modifierObservation() { |
|
if(departement.equals("000null") || departement.equals("")) { |
String[] depCom = commune.getText().split(" "); |
if(depCom.length > 1) { |
String dep = depCom[1].replace('(', ' '); |
dep =dep.replace(')', ' '); |
dep = dep.trim(); |
dep = dep.replace('\\',' '); |
dep = dep.trim(); |
|
try |
{ |
int nDep = Integer.parseInt(dep); |
if(nDep > 0 && nDep < 110) { |
departement = dep ; |
} |
} |
catch(NumberFormatException e) |
{ |
departement = "" ; |
} |
} |
} |
|
Observation obs=new Observation(espece.getText(),numeroNom,commune.getText(),departement,lieudit.getText(),station.getText(),milieu.getText(), comment.getText(),date.getRawValue()); |
obs.setNumeroOrdre(numeroOrdre); |
|