Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 203 Rev 217
Line 137... Line 137...
137
		} catch (RequestException e) {
137
		} catch (RequestException e) {
138
			// TODO Auto-generated catch block
138
			// TODO Auto-generated catch block
139
			e.printStackTrace();
139
			e.printStackTrace();
140
		}
140
		}
141
	}
141
	}
-
 
142
	
-
 
143
	public void modifierEnMasse(final Rafraichissable r, String identifiant,
-
 
144
			final Observation obs) {
-
 
145
 
-
 
146
				RequestBuilder rb = new RequestBuilder(RequestBuilder.POST,Configuration.getServiceBaseUrl()+ "/InventoryObservationList/" + identifiant + "/" + obs.getNumeroOrdre()+ "/") ;
-
 
147
				
-
 
148
				String postData = "identifiant="
-
 
149
					+ identifiant ;
-
 
150
				if(obs.getNomSaisi() != null) {
-
 
151
					postData += "&nom_sel=" + URL.encodeComponent(obs.getNomSaisi());
-
 
152
				}
-
 
153
					/* + "&num_nom_sel=" + obs.getNumeroNomenclaturalSaisi()
-
 
154
					 
-
 
155
					+ "&location=" + URL.encodeComponent(obs.getLocalite())
-
 
156
					+ "&id_location=" + obs.getIdentifiantLocalite() 
-
 
157
					+ "&date_observation=" +  obs.getDate()
-
 
158
					+ "&lieudit="+ URL.encodeComponent(obs.getLieudit()) 
-
 
159
					+ "&station="+ URL.encodeComponent(obs.getStation()) 
-
 
160
					+"&milieu="+ URL.encodeComponent(obs.getMilieu())
-
 
161
					+"&commentaire="+URL.encodeComponent(""+obs.getCommentaire())
-
 
162
					*/
-
 
163
					/*+"&mots_cles="+URL.encodeComponent(obs.getMotsCles()) */;
-
 
164
 
-
 
165
				
-
 
166
				try {
-
 
167
					
-
 
168
					rb.sendRequest(postData, new RequestCallback() {
-
 
169
 
-
 
170
						public void onError(Request request, Throwable exception) {
-
 
171
							// TODO Auto-generated method stub
-
 
172
							
-
 
173
						}
-
 
174
 
-
 
175
						public void onResponseReceived(Request request,
-
 
176
								Response response) {
-
 
177
							
-
 
178
							observationModele.obtenirListeObservation(r);
-
 
179
							
-
 
180
						}
-
 
181
						
-
 
182
						
-
 
183
					}) ;
-
 
184
					
-
 
185
				} catch (RequestException e) {
-
 
186
					
-
 
187
			}
-
 
188
		
-
 
189
	}
Line 142... Line 190...
142
 
190
 
143
	/**
191
	/**
144
	 * Supprime les observations possédant les identifiants données
192
	 * Supprime les observations possédant les identifiants données
145
	 * @param r le rafraichissable à avertir de la mise à jour
193
	 * @param r le rafraichissable à avertir de la mise à jour