Nenhuma Descrição

Peoplewebsite.cs 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using CallCenter.Utility;
  2. using Newtonsoft.Json;
  3. using Newtonsoft.Json.Linq;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Net;
  9. using System.Security.Cryptography;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. namespace CallCenter.QuartzService
  13. {
  14. public class Peoplewebsite : QuartzJob
  15. {
  16. public Peoplewebsite()
  17. {
  18. CronExpression = "0 0/30 * * * ?";
  19. DoWork += GetLY;
  20. }
  21. public void GetLY(object sender, EventArgs e)
  22. {
  23. if (Configs .GetValue ("APP_CODE")== "314f185e71e74dd8879ab154746f7681")
  24. {
  25. // WebClient web = new WebClient();
  26. // web.Encoding = Encoding.UTF8;
  27. // string Dataurl = web.DownloadString("http://localhost/APPS/GetLY" + "?display=1&searchState=wait_to_answer");
  28. var Dataurl = HttpMethods.HttpPost("http://localhost/APPS/GetLY" + "?display=1&searchState=wait_to_answer");
  29. LogFactory.GetLogger("33333").Warn(Dataurl);
  30. if (!string.IsNullOrEmpty(Dataurl))
  31. {
  32. var Dataur2 = HttpMethods.HttpPost("http://localhost/APPS/GetLY" + "?display=2&searchState=wait_to_first_explain");
  33. // string Dataur2 = web.DownloadString("http://localhost/APPS/GetLY" + "?display=2&searchState=wait_to_first_explain");
  34. LogFactory.GetLogger("444444").Warn(Dataur2);
  35. if (!string.IsNullOrEmpty(Dataur2))
  36. {
  37. var Dataur3 = HttpMethods.HttpPost("http://localhost/APPS/GetLY" + "?display=2&searchState=wait_to_second_explain");
  38. // string Dataur3 = web.DownloadString("http://localhost/APPS/GetLY" + "?display=2&searchState=wait_to_second_explain");
  39. LogFactory.GetLogger("55555").Warn(Dataur3);
  40. }
  41. }
  42. }
  43. }
  44. }
  45. }