码迷,mamicode.com
首页 > 其他好文 > 详细

分页实体

时间:2015-01-25 00:08:58      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:

   1: using Newtonsoft.Json;
   2: using Sunrise.General.Utils;
   3:  
   4: namespace Sunrise.General.Data {
   5:     /// <summary>
   6:     ///  分页处理类
   7:     /// </summary>
   8:     public class PageData<T> {
   9:         private int pageSize = 15;
  10:         private string status = MessageUtil.Success;
  11:         private string message = "加载成功!";
  12:  
  13:         /// <summary>
  14:         /// 总数
  15:         /// </summary>
  16:         [JsonProperty("total")]
  17:         public int TotalCount {
  18:             set;
  19:             get;
  20:         }
  21:  
  22:         /// <summary>
  23:         /// 页面显示的条数
  24:         /// </summary>
  25:         [JsonProperty("pageSize")]
  26:         public int PageSize {
  27:             get {
  28:                 return this.pageSize;
  29:             }
  30:             set {
  31:                 this.pageSize = value;
  32:             }
  33:         }
  34:  
  35:         /// <summary>
  36:         /// 页数
  37:         /// </summary>
  38:         [JsonProperty("pageCount")]
  39:         public int PageCount {
  40:             set;
  41:             get;
  42:         }
  43:  
  44:         /// <summary>
  45:         /// 当前页
  46:         /// </summary>
  47:         [JsonProperty("currentIndex")]
  48:         public int CurrentPageIndex {
  49:             set;
  50:             get;
  51:         }
  52:  
  53:         /// <summary>
  54:         /// 当前页数据
  55:         /// </summary>
  56:         [JsonProperty("data")]
  57:         public T Data {
  58:             set;
  59:             get;
  60:         }
  61:  
  62:         /// <summary>
  63:         /// 响应消息
  64:         /// </summary>
  65:         [JsonProperty("message")]
  66:         public string Message {
  67:             get {
  68:                 return this.message;
  69:             }
  70:             set {
  71:                 this.message = value;
  72:             }
  73:         }
  74:  
  75:         /// <summary>
  76:         /// 消息响应状态
  77:         /// </summary>
  78:         [JsonProperty("status")]
  79:         public string Status {
  80:             get {
  81:                 return this.status;
  82:             }
  83:             set {
  84:                 this.status = value;
  85:             }
  86:         }
  87:  
  88:         /// <summary>
  89:         /// 用户自定义
  90:         /// </summary>
  91:         public object UserObject {
  92:             get;
  93:             set;
  94:         }
  95:     }
  96: }

分页实体

标签:

原文地址:http://www.cnblogs.com/hornet/p/4246830.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!