Нет описания

Peoplewebsite.cs 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. // WebClient web = new WebClient();
  24. // web.Encoding = Encoding.UTF8;
  25. // string Dataurl = web.DownloadString("http://localhost/APPS/GetLY" + "?display=1&searchState=wait_to_answer");
  26. var Dataurl = HttpMethods.HttpPost("http://localhost/APPS/GetLY" ,"display=1&searchState=wait_to_answer");
  27. LogFactory.GetLogger("33333").Warn(Dataurl);
  28. if (!string.IsNullOrEmpty(Dataurl))
  29. {
  30. var Dataur2 = HttpMethods.HttpPost("http://localhost/APPS/GetLY" ,"display=2&searchState=wait_to_first_explain");
  31. // string Dataur2 = web.DownloadString("http://localhost/APPS/GetLY" + "?display=2&searchState=wait_to_first_explain");
  32. LogFactory.GetLogger("444444").Warn(Dataur2);
  33. if (!string.IsNullOrEmpty(Dataur2))
  34. {
  35. var Dataur3 = HttpMethods.HttpPost("http://localhost/APPS/GetLY" , "display=2&searchState=wait_to_second_explain");
  36. // string Dataur3 = web.DownloadString("http://localhost/APPS/GetLY" + "?display=2&searchState=wait_to_second_explain");
  37. LogFactory.GetLogger("55555").Warn(Dataur3);
  38. }
  39. }
  40. }
  41. }
  42. }