RoadFlow2.1 临时演示

GetEvents.ashx.cs 999B

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