AjaxResult.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace LeaRun.Util.WebControl
  6. {
  7. /// <summary>
  8. /// 表示Ajax操作结果
  9. /// </summary>
  10. public class AjaxResult
  11. {
  12. /// <summary>
  13. /// 获取 Ajax操作结果类型
  14. /// </summary>
  15. public ResultType type { get; set; }
  16. /// <summary>
  17. /// 获取 Ajax操作结果编码
  18. /// </summary>
  19. public int errorcode { get; set; }
  20. /// <summary>
  21. /// 获取 消息内容
  22. /// </summary>
  23. public string message { get; set; }
  24. /// <summary>
  25. /// 获取 返回数据
  26. /// </summary>
  27. public object resultdata { get; set; }
  28. }
  29. /// <summary>
  30. /// 表示 ajax 操作结果类型的枚举
  31. /// </summary>
  32. public enum ResultType
  33. {
  34. /// <summary>
  35. /// 消息结果类型
  36. /// </summary>
  37. info = 0,
  38. /// <summary>
  39. /// 成功结果类型
  40. /// </summary>
  41. success = 1,
  42. /// <summary>
  43. /// 警告结果类型
  44. /// </summary>
  45. warning = 2,
  46. /// <summary>
  47. /// 异常结果类型
  48. /// </summary>
  49. error = 3
  50. }
  51. }