摘要: 本人新手刚在webform转到mvc 像linq ef啥的,都是不会的不行不行的,不会就问群友,找资料今天本屌遇到了一个分页组合查询的问题,解决了2个小时,把代码共享给大家话不多话,直接上代码,理论上的东东我就不描述,初中没毕业文化太低也描述不了新建一个表达式数的操作类public static ... 阅读全文
posted @ 2015-03-18 15:56 Jason.裕哥 阅读(382) 评论(0) 推荐(0) 编辑
摘要: using System.Collections.Generic;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Data;using System.IO;namespace helper{ public class helper { public static DataSet ExecuteDataset(string connString, CommandType txtType, string sql) { SqlConnection conn = new SqlConnection 阅读全文
posted @ 2011-08-16 13:59 Jason.裕哥 阅读(721) 评论(1) 推荐(0) 编辑
摘要: create proc [up_delete_nclass]@did int aswith my1 as(select * from NewsClass where id = @did union all select NewsClass.* from my1, NewsClass where my1.id = NewsClass.parentID)delete from NewsClass where exists (select id from my1 where my1.id = NewsClass.id) 阅读全文
posted @ 2011-08-05 09:09 Jason.裕哥 阅读(161) 评论(0) 推荐(0) 编辑
摘要: create procedure pagefunction --利用SQL 2005中的Row_number() ( @tblName varchar(255), -- 表名 @strGetFields varchar(1000) = '*', -- 需要返回的列 @OrderName varchar(255)='', -- 排序的字段名 @PageSize int = 10, -- 页尺寸 @PageIndex int = 1, -- 页码 @doCount bit = 0, -- 返回记录总数, 非 0 值则返回 @OrderType bit = 0, -- 阅读全文
posted @ 2011-08-05 09:09 Jason.裕哥 阅读(253) 评论(0) 推荐(0) 编辑