- 博客(0)
- 资源 (22)
- 收藏
- 关注
高效率 分页
/* QQ312430633 */<br>CREATE PROCEDURE [dbo].[les_AllowPaging] <br>@pageindex int,<br>@PageSize int,<br>@tsql varchar(4000)<br>as<br><br><br><br>Declare @AllowPagingSql varchar(4000)<br><br><br>set @AllowPagingSql=<br>'select * from <br>(<br>SELECT ROW_NUMBER() OVER(ORDER BY orderbyID DESC) AS AllowPagingId, * FROM ( select *, 1 as orderbyID from ( '+@tsql +' ) as tbs1 ) <br> as Tabl1 <br>) as table2 <br>where AllowPagingId between '<br>+convert(varchar(10),((@pageindex-1) * @PageSize+1))+' and '<br>+convert(varchar(10), @pageindex * @PageSize)<br>set @AllowPagingSql= replace( @AllowPagingSql,'$','''')<br>exec (@AllowPagingSql)<br><br>set @AllowPagingSql='select <br>case <br> when count(*)%'+convert(varchar(10),@PageSize)+'=0 then count(*)/'+convert(varchar(10),@PageSize)+'<br> when count(*)%'+convert(varchar(10),@PageSize)+'<>0 then count(*)/'+convert(varchar(10),@PageSize)+'+1<br>end as pageCount,count(*) as RowsCount from ('+replace(@tsql,'$','''')+') as tab1'<br>exec (@AllowPagingSql)<br>/* <br>exec [les_AllowPaging] 15,100,' select * from sys.sysobjects '<br>exec [les_AllowPaging] 15,100,' select top 100 percent * from sys.sysobjects order by id' <br>ORDER BY 需要 percent<br>传入语句中存在分号需要先把传入语句格式化.<br>C# 例 <br>string SqlStr = " select * from sys.sysobjects where name like ''";<br>SqlStr=SqlStr.Replace("'", "$");<br>*/<br>
2008-06-25
WinForm传值程序不调用构造函数
呵呵,首先说明本人菜鸟一个
看了些窗体传值的例题都是用构造函数
可我觉得构造函数想实现即时传值好象不行
呵呵,我总是理解不了构造函数(菜吧)
我所以就想了这样个办法来实现传值
using System;
using System.Collections.Generic;
using System.Text;
namespace WindowsApplication1
{
class Class1
{
public static string send = "";
}
}
2008-01-10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人