当前位置: 首页>>代码示例>>C#>>正文


C# Paging类代码示例

本文整理汇总了C#中Paging的典型用法代码示例。如果您正苦于以下问题:C# Paging类的具体用法?C# Paging怎么用?C# Paging使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Paging类属于命名空间,在下文中一共展示了Paging类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ActionsForBoardRequest

		public ActionsForBoardRequest(IBoardId board, ISince since, Paging paging, IEnumerable<ActionType> types)
			: base(board, "actions")
		{
			this.AddTypeFilter(types);
			this.AddSince(since);
			this.AddPaging(paging);
		}		
开发者ID:Bunk,项目名称:trellow,代码行数:7,代码来源:ActionsForBoardRequest.cs

示例2: ActionsForMemberRequest

		public ActionsForMemberRequest(IMemberId member, ISince since, Paging paging, IEnumerable<ActionType> filter)
			: base(member, "actions")
		{
			this.AddTypeFilter(filter);
			this.AddSince(since);
			this.AddPaging(paging);
		}
开发者ID:Geniegl,项目名称:Trello.NET,代码行数:7,代码来源:ActionsForMemberRequest.cs

示例3: ActionsForOrganizationRequest

		public ActionsForOrganizationRequest(IOrganizationId organization, ISince since, Paging paging, IEnumerable<ActionType> filter)
			: base(organization, "actions")
		{
			this.AddTypeFilter(filter);
			this.AddSince(since);
			this.AddPaging(paging);
		}
开发者ID:KennyBu,项目名称:Trello.NET,代码行数:7,代码来源:ActionsForOrganizationRequest.cs

示例4: Get_Page

        /// <summary>
        /// 分頁
        /// </summary>
        /// <param name="total">總數量</param>
        /// <param name="current_page">目前頁數</param>
        /// <param name="page_count">單頁數量</param>
        /// <returns>分頁</returns>
        public static Paging Get_Page(int total, int current_page = 1, int page_count = 10, int pages = 5)
        {
            Paging page = new Paging();

            int count = pages;
            int count_com = Convert.ToInt32(Math.Floor((double)count / 2));

            page.First = 1;
            int last = Convert.ToInt32(Math.Ceiling((double)total / (double)page_count));
            page.Last = last <= 0 ? 1 : last;
            page.Total = total;
            page.Now = current_page;

            page.Back = (current_page > 1) ? current_page - 1 : current_page;
            page.Next = (current_page < last) ? current_page + 1 : current_page;

            int start = current_page - count_com;
            page.Start = (start < 1) ? 1 : start;

            int end = page.Start + count - 1;
            end = (end >= last) ? last : end;
            page.End = (end == 0) ? 1 : end;

            return page;
        }
开发者ID:kakaci123,项目名称:Program-Git-Foundation,代码行数:32,代码来源:Method.cs

示例5: ActionsForCardRequest

		public ActionsForCardRequest(ICardId card, ISince since, Paging paging, IEnumerable<ActionType> filter)
			: base(card, "actions")
		{
			this.AddTypeFilter(filter);
			this.AddSince(since);
			this.AddPaging(paging);
		}
开发者ID:Geniegl,项目名称:Trello.NET,代码行数:7,代码来源:ActionsForCardRequest.cs

示例6: Get

        public IEnumerable<Activity> Get(Feed feed, Paging paging)
        {
            SortedSet<Activity> activities = new SortedSet<Activity>(Activity.Comparer);

            foreach (var streamId in feed.Streams)
            {
                var streamIdQuery = Convert.ToBase64String(streamId);

                var prepared = session
                        .Prepare(LoadActivityStreamQueryTemplate)
                        .Bind(streamIdQuery, paging.Timestamp)
                        .SetAutoPage(false)
                        .SetPageSize(paging.Take);

                var rowSet = session.Execute(prepared);
                foreach (var row in rowSet.GetRows())
                {
                    using (var stream = new MemoryStream(row.GetValue<byte[]>("data")))
                    {
                        var storedActivity = (Activity)serializer.Deserialize(stream);
                        activities.Add(storedActivity);
                    }
                }
            }
            return activities.Take(paging.Take);
        }
开发者ID:spardadanthe,项目名称:ActivityStreams,代码行数:26,代码来源:ActivityStore.cs

示例7: NotificationsForMeRequest

		public NotificationsForMeRequest(IMemberId member, IEnumerable<NotificationType> filter, ReadFilter readFilter, Paging paging)
			: base(member, "notifications")
		{
			AddTypeFilter(filter);
			this.AddFilter(readFilter, "read_filter");
			this.AddPaging(paging);
		}
开发者ID:Bunk,项目名称:trellow,代码行数:7,代码来源:NotificationsForMeRequest.cs

示例8: ActionsForListRequest

		public ActionsForListRequest(IListId list, ISince since, Paging paging, IEnumerable<ActionType> filter)
			: base(list, "actions")
		{
			this.AddTypeFilter(filter);
			this.AddSince(since);
			this.AddPaging(paging);
		}
开发者ID:Bunk,项目名称:trellow,代码行数:7,代码来源:ActionsForListRequest.cs

示例9: ProcessRequest

        public void ProcessRequest(HttpContext context)
        {
            this.context = context;
            context.Response.ContentType = "text/json";

            int count;
            List<Employee> result = Employee.GetEmployeesFilter(this.Start, this.Limit, this.Sort, out count);
            Paging<Employee> pagingEmployees = new Paging<Employee>(result, count);

            StoreResponseData sr = new StoreResponseData();
            sr.Total = pagingEmployees.TotalRecords;

            sr.Data = JSON.Serialize(from e in pagingEmployees.Data select new
            {
                  e.Address,
                  e.BirthDate,
                  e.City,
                  e.Country,
                  e.EmployeeID,
                  e.Extension,
                  e.FirstName,
                  e.HireDate,
                  e.HomePhone,
                  e.LastName,
                  e.Notes,
                  e.PhotoPath,
                  e.PostalCode,
                  e.Region,
                  e.ReportsTo,
                  e.Title,
                  e.TitleOfCourtesy
            });

            sr.Return();
        }
开发者ID:extnet,项目名称:Ext.NET.Examples,代码行数:35,代码来源:EmployeesControler.ashx.cs

示例10: DataSelectParameter

		public DataSelectParameter(string fullName, ICondition condition, string scope, Paging paging, Sorting[] sortings) : base(fullName)
		{
			_condition = condition;
			_scope = scope;
			_paging = paging;
			_sortings = sortings;
		}
开发者ID:Zongsoft,项目名称:Zongsoft.Data,代码行数:7,代码来源:DataSelectParameter.cs

示例11: ConstructorToken

		[Test] public void ConstructorToken()
		{
			Paging p = new Paging();
			Assert.AreEqual(string.Format("{0},{1}",int.MaxValue,0),p.Token);
			
			p = new Paging(7,55);
			Assert.AreEqual(string.Format("{0},{1}",55,7),p.Token);
		}
开发者ID:RedwardsiPipeline,项目名称:VersionOne.SDK.NET.APIClient,代码行数:8,代码来源:PagingTester.cs

示例12: AddPaging

		public static void AddPaging(this RestRequest request, Paging paging)
		{
			if (paging == null)
				return;

			request.AddParameter("limit", paging.Limit, ParameterType.GetOrPost);
			request.AddParameter("page", paging.Page, ParameterType.GetOrPost);
		}
开发者ID:kareem613,项目名称:Trello.NET,代码行数:8,代码来源:RestRequestExtensions.cs

示例13: TokenEqualsToString

		[Test] public void TokenEqualsToString()
		{
			Paging p = new Paging(5,25);

			string value = string.Format("{0},{1}",25,5);
			Assert.AreEqual(value,p.Token);
			Assert.AreEqual(value,p.ToString());
		}
开发者ID:RedwardsiPipeline,项目名称:VersionOne.SDK.NET.APIClient,代码行数:8,代码来源:PagingTester.cs

示例14: GetPages

    public static Paging GetPages(int itemCount, int itemsPerPage)
    {
        int page;
        int.TryParse(HttpContext.Current.Request.QueryString["page"], out page);
        if (page == 0) page = 1;

        var pages = new Paging { ItemsPerPage = itemsPerPage, CurrentPage = page, PreviousPage = page - 1, NextPage = page + 1, TotalPages = Math.Ceiling(itemCount / (Double)itemsPerPage), Skip = (page*itemsPerPage) - itemsPerPage, Take = itemsPerPage };
        return pages;
    }
开发者ID:tgdh,项目名称:clearlead,代码行数:9,代码来源:Paging.cs

示例15: SqlSentenceBuilder

 public SqlSentenceBuilder()
 {
     Select = new List<Part>();
     From = new List<FromPart>();
     Where = new List<WherePart>();
     GroupBy = new List<Part>();
     Having = new List<Part>();
     OrderBy = new List<Part>();
     Paging = new Paging();
 }
开发者ID:panicoenlaxbox,项目名称:SqlSentence,代码行数:10,代码来源:SqlSentenceBuilder.cs


注:本文中的Paging类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。