RoadFlow2.1 临时演示

GetNote.ashx.cs 920B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. namespace WebForm.Controls.SelectDictionary
  6. {
  7. /// <summary>
  8. /// GetNote 的摘要说明
  9. /// </summary>
  10. public class GetNote : IHttpHandler
  11. {
  12. public void ProcessRequest(HttpContext context)
  13. {
  14. context.Response.ContentType = "text/plain";
  15. string id = context.Request.QueryString["id"];
  16. Guid gid;
  17. string note = "";
  18. if (id.IsGuid(out gid))
  19. {
  20. var dict = new RoadFlow.Platform.Dictionary().Get(gid, true);
  21. if (dict != null)
  22. {
  23. note = dict.Note;
  24. }
  25. }
  26. context.Response.Write(note);
  27. }
  28. public bool IsReusable
  29. {
  30. get
  31. {
  32. return false;
  33. }
  34. }
  35. }
  36. }