84,8 → 84,7 |
|
@Override |
public void onError(final Request request, final Throwable exception) { |
// TODO Auto-generated method stub |
|
// TODO Auto-generated method stub |
} |
|
@Override |
113,8 → 112,7 |
observationData.put(obs.getNumeroOrdre(),obs); |
} |
} |
} else { |
|
} else { |
observationData = new ListeObservation(0) ; |
} |
|
135,78 → 133,80 |
public void modifierEnMasse(final Rafraichissable r, String identifiant, |
final Observation obs) { |
|
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST,Configuration.getServiceBaseUrl()+ "/InventoryObservationList/" + identifiant + "/" + obs.getNumeroOrdre()+ "/") ; |
|
String postData = "ce_utilisateur=" |
+ identifiant ; |
if(obs.getNomSaisi() != null) { |
postData += "&nom_sel=" + URL.encodeComponent(obs.getNomSaisi()); |
} |
if(obs.getNumeroNomenclaturalSaisi() != null) { |
postData += "&nom_sel_nn=" + obs.getNumeroNomenclaturalSaisi(); |
} |
|
if(obs.getIdentifiantLocalite() != null) { |
postData += "&ce_zone_geo=" + obs.getIdentifiantLocalite(); |
} |
|
if(obs.getLocalite() != null) { |
postData += "&zone_geo=" + URL.encodeComponent(obs.getLocalite()); |
} |
|
if(obs.getDate() != null) { |
postData += "&date_observation=" + obs.getDate(); |
} |
|
if(obs.getLieudit() != null) { |
postData += "&lieudit="+ URL.encodeComponent(obs.getLieudit()); |
} |
|
if(obs.getStation() != null) { |
postData += "&station="+ URL.encodeComponent(obs.getStation()); |
} |
|
if(obs.getMilieu() != null) { |
postData += "&milieu="+ URL.encodeComponent(obs.getMilieu()); |
} |
|
if(obs.getCommentaire() != null) { |
postData += "&commentaire="+obs.getCommentaire(); |
} |
|
if(obs.getLatitude() != null ) { |
postData += "&latitude="+URL.encodeComponent(""+obs.getLatitude()); |
} |
|
if(obs.getLongitude() != null) { |
postData += "&longitude="+URL.encodeComponent(""+obs.getLongitude()); |
} |
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST,Configuration.getServiceBaseUrl()+ "/InventoryObservationList/" + identifiant + "/" + obs.getNumeroOrdre()+ "/") ; |
|
String postData = "ce_utilisateur=" |
+ identifiant ; |
if(obs.getNomSaisi() != null) { |
postData += "&nom_sel=" + URL.encodeComponent(obs.getNomSaisi()); |
} |
if(obs.getNumeroNomenclaturalSaisi() != null) { |
postData += "&nom_sel_nn=" + obs.getNumeroNomenclaturalSaisi(); |
} |
|
if(obs.getIdentifiantLocalite() != null) { |
postData += "&ce_zone_geo=" + obs.getIdentifiantLocalite(); |
} |
|
if(obs.getLocalite() != null) { |
postData += "&zone_geo=" + URL.encodeComponent(obs.getLocalite()); |
} |
|
if(obs.getDate() != null) { |
postData += "&date_observation=" + obs.getDate(); |
} |
|
if(obs.getLieudit() != null) { |
postData += "&lieudit="+ URL.encodeComponent(obs.getLieudit()); |
} |
|
if(obs.getStation() != null) { |
postData += "&station="+ URL.encodeComponent(obs.getStation()); |
} |
|
if(obs.getMilieu() != null) { |
postData += "&milieu="+ URL.encodeComponent(obs.getMilieu()); |
} |
|
if(obs.getCommentaire() != null) { |
postData += "&commentaire="+obs.getCommentaire(); |
} |
|
if(obs.getLatitude() != null ) { |
postData += "&latitude="+URL.encodeComponent(""+obs.getLatitude()); |
} |
|
if(obs.getLongitude() != null) { |
postData += "&longitude="+URL.encodeComponent(""+obs.getLongitude()); |
} |
|
if(obs.getAbondance() != null) { |
postData += "&abondance="+URL.encodeComponent(""+obs.getAbondance()); |
} |
|
if(obs.getCertitude() != null) { |
postData += "&certitude="+URL.encodeComponent(""+obs.getCertitude()); |
} |
|
try { |
|
rb.sendRequest(postData, new RequestCallback() { |
try { |
rb.sendRequest(postData, new RequestCallback() { |
|
@Override |
public void onError(Request request, Throwable exception) { |
// TODO Auto-generated method stub |
|
} |
@Override |
public void onError(Request request, Throwable exception) { |
// TODO Auto-generated method stub |
|
} |
|
@Override |
public void onResponseReceived(Request request, |
Response response) { |
if(observationModele != null) { |
observationModele.obtenirListeObservation(r); |
} |
@Override |
public void onResponseReceived(Request request, |
Response response) { |
if(observationModele != null) { |
observationModele.obtenirListeObservation(r); |
} |
|
|
}) ; |
|
} catch (RequestException e) { |
|
} |
|
} |
}) ; |
} catch (RequestException e) { |
} |
} |
|
/** |
227,7 → 227,6 |
+ identifiant |
+ "/" |
+ numerosOrdre); |
|
try { |
rb.sendRequest(postData, new RequestCallback() { |
|
250,9 → 249,7 |
return ; |
} |
} |
|
}); |
|
r.rafraichir("OK", true) ; |
|
} catch (RequestException e) { |
259,7 → 256,6 |
// TODO Auto-generated catch block |
e.printStackTrace(); |
} |
|
} |
|
} |