Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HashMap<String, String> params = new HashMap<>();
- params.put(ArST.Cd_AR, Cd_AR);
- params.put(ArUbicazioneST.Cd_MG, Cd_MG);
- params.put(ArUbicazioneST.Cd_MGUbicazione, Cd_MGUbicazione);
- params.put("Cd_MGEsercizio", Cd_Esercizio);
- params.put(ArLottoST.Cd_ARLotto, Cd_ARLotto);
- params.put("Quantita", String.valueOf(Qta));
- params.put(MGMovIntST.Id_MGMovInt, String.valueOf(Id_MGMovInt));
- new AsyncTask<HashMap<String, String>, JSONObject, Void>() {
- @Override
- protected Void doInBackground(HashMap<String, String>... hashMaps) {
- HashMap<String, String> params = new HashMap<String, String>();
- params = hashMaps[0];
- String buffer = HttpConnection.sendDataByPost(URL_INSERT_POST, params);
- if (buffer == null) this.cancel(true);
- else {
- try {
- JSONObject object = new JSONObject(buffer);
- publishProgress(object);
- } catch (JSONException e) {
- e.printStackTrace();
- }
- }
- return null;
- }
- @Override
- protected void onProgressUpdate(JSONObject... values) {
- int MGMov = 0;
- try {
- MGMov = values[0].getInt("Id_MGMov");
- if (MGMov != 0) loadScan.onLoad(true);
- else this.cancel(true);
- } catch (JSONException e) {
- e.printStackTrace();
- this.cancel(true);
- }
- super.onProgressUpdate(values);
- }
- }.execute(params);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement