查询翻页优化第1/2页(6)


        If CLng(iPageSize)<1 Then iPageSize = iDefaultPageSize
    End Property

    '//定义当前页码
    Public Property Let Page(s)
        iPage = s
        If Not isNumeric(iPage) Then iPage = 1
        If CLng(iPage)<1 Then iPage = 1
        Call CaculatePageCount()
        If CLng(iPage)>CLng(iPageCount) And iPageCount>0 Then iPage = iPageCount
    End Property

    '//自定义查询语句
    Public Property Let Sql(s)
        sSqlString = s
    End Property

    '//-------------------- 输出属性 --------------------//'
    '//取得当前条件下的记录数
    Public Property Get RecordCount
        If isNull(iRecCount) Then CaculateRecCount()
        RecordCount = iRecCount
    End Property

    '//取得当前页码
    Public Property Get Page
        Page = iPage
    End Property

    '//取得当前页码
    Public Property Get AbsolutePage
        AbsolutePage = iPage
    End Property

    '//取得当前查询的条件
    Public Property Get Condition
        If Len(sCondition)<1 Then makeCondition()
        Condition = sCondition
    End Property

    '//取得总的记录数
    Public Property Get TotalRecordCount
        If isNull(iTotalRecCount) Then CaculateTotalRecCount()
        TotalRecordCount = iTotalRecCount
    End Property

    '//取得总页数
    Public Property Get PageCount
        If isNull(iPageCount) Then CaculatePageCount()

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/3577.html