RoadFlow2.1 临时演示

CheckCode.ashx.cs 738B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. namespace WebForm.Platform.Dictionary
  6. {
  7. /// <summary>
  8. /// CheckCode 的摘要说明
  9. /// </summary>
  10. public class CheckCode : IHttpHandler
  11. {
  12. public void ProcessRequest(HttpContext context)
  13. {
  14. context.Response.ContentType = "text/plain";
  15. string code = context.Request.Form["value"];
  16. string id = context.Request["id"];
  17. context.Response.Write(new RoadFlow.Platform.Dictionary().HasCode(code, id) ? "唯一代码重复" : "1");
  18. }
  19. public bool IsReusable
  20. {
  21. get
  22. {
  23. return false;
  24. }
  25. }
  26. }
  27. }