RoadFlow2.1 临时演示

Test1.ashx.cs 1.2KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. namespace WebForm
  6. {
  7. /// <summary>
  8. /// Test1 的摘要说明
  9. /// </summary>
  10. public class Test1 : IHttpHandler
  11. {
  12. public void ProcessRequest(HttpContext context)
  13. {
  14. context.Response.ContentType = "text/plain";
  15. string title = context.Request.QueryString["title"];
  16. string page;
  17. System.Data.DataTable dt = new RoadFlow.Platform.Log().GetPagerData(out page, "", title, "", "", "", "");
  18. System.Text.StringBuilder sb = new System.Text.StringBuilder();
  19. foreach (System.Data.DataRow user in dt.Rows)
  20. {
  21. sb.Append("<tr><td value='" + user["ID"] + "'>" + user["Title"] + "</td><td>" + user["Type"] + "</td><td>" + user["UserName"] + "</td><td>" + user["WriteTime"] + "</td></tr>");
  22. }
  23. context.Response.Write("{\"count\":" + new RoadFlow.Platform.Log().GetCount() + ",\"data\":\"" + sb.ToString() + "\"}");
  24. }
  25. public bool IsReusable
  26. {
  27. get
  28. {
  29. return false;
  30. }
  31. }
  32. }
  33. }