DAL分页
using System.Collections.Generic;
using LModel.DTO;
using Newtonsoft.Json;
using System.Data.SqlClient;
using System.Data;
using DBHelper;
{
public class PageCommon
{
{
SqlParameter[] parms =
{
new SqlParameter("@tableName",model.tableName),
new SqlParameter("@indexCol",model.IndexCol),
new SqlParameter("@pageSize",model.PageSize),
new SqlParameter("@pageIndex",model.PageIndex),
new SqlParameter("@orderCol",model.OrderCol),
new SqlParameter("@where",model.StrWhere),
new SqlParameter("@columns",model.Columns),
};
///调用存储过程
DataSet ds = DbHelperSQL.ExecuteDataset(DbHelperSQL.ConnB2c,CommandType.StoredProcedure, "p_paging",parms);
//转换类型
var list = JsonConvert.DeserializeObject<List<T>>(JsonConvert.SerializeObject(ds.Tables[0]));
PageInfo<T> pageinfo = new PageInfo<T>();
}
}
DAL分页的更多相关文章
- C#关于分页显示
---<PS:本人菜鸟,大手子还请高台贵手> 以下是我今天在做分页时所遇到的一个分页显示问题,使用拼写SQL的方式写的,同类型可参考哦~ ------------------------- ...
- MVC分页
http://www.cnblogs.com/iamlilinfeng/p/4075292.html 目录 一.Contrl与View数据传递(多表数据) 二.分页控件介绍 三.MVC源码说明 四.源 ...
- Linq的分页
真有趣. C#里面的List对象.set对象,都可以直接使用Linq(这是因为,它们都实现了接口IEnumable?),比如说:Where().OrderBy()什么的.假如有点SQL基础的人,一看这 ...
- asp.net sql 分页,,优化 排序 及分页,
调用代码: <%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix ...
- 【转】AspNetPager分页控件用法
AspNetPager分页控件解决了分页中的很多问题,直接采用该控件进行分页处理,会将繁琐的分页工作变得简单化,下面是我如何使用AspNetPager控件进行分页处理的详细代码: 1.首先到www.w ...
- EF 之 MVC 排序,查询,分页 Sorting, Filtering, and Paging For MVC About EF
最近悟出来一个道理,在这儿分享给大家:学历代表你的过去,能力代表你的现在,学习代表你的将来. 十年河东十年河西,莫欺少年穷 学无止境,精益求精 上篇博客我们学习了EF CodeFirst增删改查 ...
- [渣译文] 使用 MVC 5 的 EF6 Code First 入门 系列:排序、筛选和分页
这是微软官方教程Getting Started with Entity Framework 6 Code First using MVC 5 系列的翻译,这里是第三篇:排序.筛选和分页 原文:Sort ...
- 关于MySql的DBHelper类以及数据分页
前端: <%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix=& ...
- 存储过程分页 Ado.Net分页 EF分页 满足90%以上
存储过程分页: create proc PR_PagerDataByTop @pageIndex int, @pageSize int, @count int out as select top(@p ...
随机推荐
- 验证码无法显示,服务器端出现异常:Could not initialize class sun.awt.X11GraphicsEnvironment
异常信息: Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvir ...
- [LeetCode] Exam Room 考试房间
In an exam room, there are N seats in a single row, numbered 0, 1, 2, ..., N-1. When a student enter ...
- 轮播效果/cursor
cursor属性:改变鼠标中的属性 例如: cursor:pointer(鼠标移动上去变小手) <!doctype html> <html> <head> < ...
- RHEL7 配置网络yum源
redhat系统安装好尽管默认带有yum,但是redhat的更新包只对注册用户有效(收费).所以需要更换yum源. 基本的流程就是: 1.删除redhat7.0系统自带的yum软件包: 2.自行下载所 ...
- 基于js的数据结构与算法-数组
Given an array of integers, return indices of the two numbers such that they add up to a specific ta ...
- 香港,将军澳,TKO,服务器,运维,机房,云清洗
目前香港到大陆速度最快.最稳定线路之一. 线路也是唯一华南华北一样快速的线路,是100%的“双线”,不存在其他香港线路网通访问比电信慢的问题. (香港)将军澳TKO机房网络速度快捷,机房内部环境配有意 ...
- charles-web端开发者实用功能点
##网速模拟功能 throttle功能对于前端来说非常实用,可以看页面在低网速下的表现,从而找出优化的点. 在线上环境通常有些因为网速慢导致的bug,在本机无法重现,那时候就很抓瞎,如果嫌远程麻烦,推 ...
- [译文]Domain Driven Design Reference(七)—— 大型战略设计结构
本书是Eric Evans对他自己写的<领域驱动设计-软件核心复杂性应对之道>的一本字典式的参考书,可用于快速查找<领域驱动设计>中的诸多概念及其简明解释. 上周末电脑硬盘文件 ...
- monkey 命令详解
monkey命令详解 1. $ adb shell monkey <event-count> <event-count>是随机发送事件数 例 ...
- Python函数声明以及与其他编程语言数据类型的比较
1.函数声明 与其它大多数语言一样 Python 有函数,但是它没有像 C++ 一样的独立的头文件:或者像 Pascal 一样的分离的 interface / implementation 段.在需 ...