createprocedure[dbo].[sp_Public]
(@startIndexvarchar(10),
@endIndexvarchar(10),
@tablevarchar(30),--表名
@fieldvarchar(50),--根据哪一列排序
@flagvarchar(10),--主键,排序字段
@wherestrvarchar(2000)
)
as
begin
declare@strvarchar(2000)
set@str='withtemptblas(SELECTROW_NUMBER()OVER(ORDERBY'+@field+''+@flag+')ASRow,*from'+@table+')
SELECT*FROMtemptblwhereRowbetween'+@startIndex+'and'+@endIndex+''+@wherestr
exec(@str)
end
execsp_Public'1','2','vi_UserInfo_DepertInfo','vi_UserInfo_DepertInfo.uid','asc',''
createproceduresp_GetPerson
(@startIndexint,
@endIndexint,
@
docountbit)
as
setnocounton
if(@docount=1)
selectcount(*)frompersonwhere1=1
else
begin
declare@indextabletable(idintidentity(1,1),nidint)
setrowcount@endIndex
insertinto@indextable(nid)selectidfrompersonwhere1=1orderbyascdesc
select*frompersonO,@indextabletwhereO.id=t.nid
andt.idbetween@3710167@qq.com
end
setnocountoff
createproceduresp_GetPerson
(@startIndexint,
@endIndexint)
as
setnocounton
begin
declare@indextabletable(idintidentity(1,1),nidint)
setrowcount@endIndex
insertinto@indextable(nid)selectidfrompersonwhere1=1orderbyascdesc
select*frompersonO,@indextabletwhereO.id=t.nid
andt.idbetween@3710167@qq.com
end
setnocountoff
//全选
functionCheckAll(cb){
varctrlAll=document.all;
varctrlEveryID;
//循环所有
文档元素
for(vari=0;i
ctrlEveryID=ctrlAll[i].id;