Copy codeThe Code is as follows:SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCreate procedure [dbo]. [Pagination]@ Page int = 1, -- current Page number@ PageSize int = 10, -- number of records per page (page size)@ Table nvarchar (500), -- Table
Recently, we have a project requirement to achieve horizontal slide view switching (display by PAGE)
The first thing that comes to mind is imageswitcher + viewfilpper. I don't want to use this effect, let alone the customer's feeling: The sliding
Copy Code code as follows:
SET ANSI_NULLS on
Go
SET QUOTED_IDENTIFIER ON
Go
CREATE PROCEDURE [dbo]. [Pagination]
@Page int = 1,--current page number
@PageSize int = 10--Number of record bars per page (page size)
@Table nvarchar
The basic logical idea is the same as. NET, which is to configure through the entity class to be configured through an array, logic is relatively simple, based on the criteria to determine the stitching of the paging HTML.
Here are a few simple features:
1: Support the display of related buttons or not configuration
2: Support per page number, text name, HTML tag class name free configuration
3: Support URL rewrite pages (you need to add rewrite rules in the configuration array yourself)
s
The basic logical thinking and. NET, is to be configured through the entity classes replaced by the array configuration, the logic is relatively simple, based on the conditions to determine the Mosaic page HTML.
Here are a few simple features:
1: Support the display of related buttons or not configuration
2: Support the number of pages per page, text name, HTML tag class name free configuration
3: URL-rewritten pages are supported (you need to add rewrite rules to the configuration array you
We'll take the SQL stored procedure first.
Paging stored procedures.
The code is as follows
Copy Code
CREATE PROCEDURE [dbo]. [Proc_splitpage] --Add The parameters for the stored procedure here @tblName VA Rchar (255),--table name @strFields varchar (1000) = ' * ',--columns that need to be returned, Default * @strOrder varchar (255) = ',--sorted field name, required @strOrderType varchar = ' ASC ',--Sort by default ASC @PageSize int = 10, -page size,
Pear's pager pagination class is a very useful PHP paging class, scalability is very strong, able to adapt to the needs of various paging situation, at least I in a few years large and small projects, basically not for paging extra code, all are used pager, It shows the pager of the availability of the strong. Here's how to use the code to see the example:
Examp
Pear Pager Page class is a very useful PHP paging class, extensibility is very strong, able to adapt to the needs of various paging situation, at least I have a few years of large and small projects, basically no extra code for pagination, all are used pager, This is the pager of usability. The following code looks at its use example:Example 1PLAIN TEXTPhp:
req
Advancing Informatics for healthcare and healthcare applications have become an international the priority. There is increased effort to transform reactive care to proactive and preventive care, clinic-centric to patient-centered Practice, training-based interventions to globally aggregated evidence, and episodic response to continuous well-being mon Itoring and maintenance.ICSH (International Conference fo
Part three of our article series on the common phases of type 2 diabetes managementby Lance PorterAlmost everyone begins taking insulin (for either type 1 or type 2 diabetes) starts with a program of multiple daily I Njections, using either a needle and syringe or an insulin pen. Standard treatment today are one daily shot of long-acting insulin plus a shot of fast-acting insulin with each meal.However, there is an alternative:the insulin pump. An insulin pump are a computerized device about the
Overviewthrough the analysis of the previous article, we know where the pager module is located throughout SQLite. It is the core module of SQLite, which plays a number of important roles. As a transaction manager, it implements the acid characteristics of transactions through concurrency control and failback, is responsible for the atomic commit and rollback of transactions, as a page manager, it handles reading and writing data pages from a file, an
action, but this is not the focus of our consideration ). After paging, we only take the objects corresponding to the user request page. To maximize code reuse, I have done the following:
1. Create a new pager class with int attributes such as beginpage, endpage, currentpage, pagesize, and total, it represents the start page, end page, current page, number of records on each page, and total number of records, which are mainly used for displaying pa
How to use:
First add the Mvcpager.dll reference to the MVC project.
Front Code
Front desk:
@{Layout = null; @using Webdiyer.WebControls.Mvc @model pagedlist
Background code
Using System;
Using System.Collections.Generic;
Using System.Linq;
Using System.Web;
Using SYSTEM.WEB.MVC;
Using WEBDIYER.WEBCONTROLS.MVC;
Namespace Mvcapplication6.controllers
{public
class Homecontroller:controller
{
////Get
: /home/public
actionresult Index (int pageindex=1, int pagesize=2)
{
list
number displayed per page is required, two basic parameters, currentPage and pageSize, are required;
To query the table content, you need a form with the query conditions;
Because you need to modify and delete and remember the current page, a flag is required to indicate the operation type currently in progress;
To make our program more flexible, add the iner to be loaded after obtaining data, and add pager to be loaded by the paging control,
The det
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.