相关的存储过程 ---实现分页
CREATE procedure Proc_Enterprise_Get_CustomerResumeLoad_By_CID
(
@CID int , --公司编号
@CurrentPage int, --当前页数,从0开始
@PageSize int, --每页的数量
@RecordCount int out, --记录数
@PageCount int out --页数
)
as
declare @FieldList nvarchar( 4000 )
declare @where nvarchar( 4000 )
set @FieldList='DLID,
(select top 1 PerName from PerCustomerInfoTab where PerID in (select PerID from PerCustomerResumeTab where ResumeID = CustomerResumeDownLoadTab.ResumeID)) as PerName,
dbo.GetSexByID((select top 1 PerSex from PerCustomerInfoTab where PerID in (select PerID from PerCustomerResumeTab where ResumeID = CustomerResumeDownLoadTab.ResumeID ))) as PerSex,
dbo.GetDegreeByID ((select top 1 PerDegree from PerCustomerInfoTab where PerID in (select PerID from PerCustomerResumeTab where ResumeID = CustomerResumeDownLoadTab.ResumeID )) ) as PerDegree,
(select top 1 dbo.GetPosition(PurPosition) from PerCustomerPurposeTab where CustomerResumeDownLoadTab.ResumeID = PerCustomerPurposeTab.ResumeID ) as PositionName
'
set @where = 'ResumeID is not null and Status = 1 and CID =' + cast( @CID as nvarchar( 1000 ))
exec CrmPageGetPagesByMoreField
@FieldList,
'CustomerResumeDownLoadTab',
@where,
'CCreateDateTime desc , DLID desc',
'DLID',
@CurrentPage ,
@PageSize ,
@RecordCount out,
@PageCount out
GO