RoadFlow2.1 临时演示

Combox_GetTexts.ashx.cs 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. namespace WebForm.Tests
  6. {
  7. /// <summary>
  8. /// Combox_GetTexts 的摘要说明
  9. /// </summary>
  10. public class Combox_GetTexts : IHttpHandler
  11. {
  12. public void ProcessRequest(HttpContext context)
  13. {
  14. context.Response.ContentType = "text/plain";
  15. string values = context.Request.QueryString["values"];
  16. System.Text.StringBuilder texts = new System.Text.StringBuilder();
  17. RoadFlow.Platform.Log Log = new RoadFlow.Platform.Log();
  18. foreach (string value in values.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries))
  19. {
  20. if (value.IsGuid())
  21. {
  22. var log = Log.Get(value.ToGuid());
  23. if (log != null)
  24. {
  25. texts.Append(log.Title);
  26. texts.Append(",");
  27. }
  28. }
  29. }
  30. context.Response.Write(texts.ToString().TrimEnd(','));
  31. }
  32. public bool IsReusable
  33. {
  34. get
  35. {
  36. return false;
  37. }
  38. }
  39. }
  40. }