Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. @Override
  2. public void onResponse(String response) {
  3. Log.d("success", response);
  4. Toast.makeText(SystemActivity.this, "succesful!, Toast.LENGTH_SHORT).show();
  5. }
  6. }, new Response.ErrorListener() {
  7. @Override
  8. public void onErrorResponse(VolleyError error) {
  9. Log.d("error", error.toString());
  10. }
  11. });
  12.  
  13.  
  14. getparams();
  15.  
  16. mQueue.add(stringRequest);
  17. //put-volley
  18.  
  19. }
  20.  
  21. //put-volley
  22.  
  23. protected Map<String, String> getparams() {
  24. Map<String, String> params = new HashMap<String, String>();
  25. params.put("NotesID", corusername); //NotesID
  26. params.put("Password", renewpass);
  27.  
  28. return params;
  29. }
  30. //put-volley
  31.  
  32. if (entity == null)
  33. {
  34. return Request.CreateErrorResponse(HttpStatusCode.NotFound, "customers with userid = " + userID + "is not found");
  35. }
  36. else
  37. {
  38. entity.NotesID = account.NotesID;
  39. entity.Password = account.Password;
  40.  
  41. entities.SaveChanges();
  42. return Request.CreateResponse(HttpStatusCode.OK, entity);
  43. }
  44.  
  45. }
  46. }
  47. catch (Exception ex)
  48. {
  49. return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex);
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement