一個顯示Grid的VBScript對象

來源:互聯網
上載者:User
vbscript|對象|顯示 是根據MS提供的代碼修改而成,目前還不支援編輯,可以排序、查詢、分頁顯示
<%@ Language=VBScript %>
<% Option Explicit %>
<%
Class classDataGrid

Private m_strSQL
Private m_strConn
Private m_strRowColor1
Private m_strRowColor2
Private m_strMode
Private m_strProcessPage
                        
Private m_strTitle
Private m_strRSName
Private m_strFindFields

Public Property Get SQL()
    SQL = m_strSQL
End Property

Public Property Let SQL(strSQL)
    m_strSQL = strSQL
End Property

Public Property Get Conn()
    Conn = m_strConn
End Property

Public Property Let Conn(strConn)
    m_strConn = strConn
End Property

Public Property Get RowColor1()
    If IsNull(m_strRowColor1) Or Len(m_strRowColor1) = 0 Then
        RowColor1 = "#ffffff"
    Else
        RowColor1 = m_strRowColor1
    End If
End Property

Public Property Let RowColor1(strRowColor1)
    m_strRowColor1 = strRowColor1
End Property

Public Property Get RowColor2()
    If IsNull(m_strRowColor2) Or Len(m_strRowColor2) = 0 Then
        RowColor2 = "#00ffff"
    Else
        RowColor2 = m_strRowColor2
    End If
End Property

Public Property Let RowColor2(strRowColor2)
    m_strRowColor2 = strRowColor2
End Property

Public Property Get Mode()
    If IsNull(m_strMode) Or Len(m_strMode) = 0 Then
        Mode = "View"
    Else
        Mode = m_strMode
    End If
End Property

Public Property Let Mode(strMode)
    If strMode <> "View" And strMode <> "Edit" Then
        Response.Write ("模式錯誤——只允許使用View和Edit<br>")
        Response.End
    Else
        m_strMode = strMode
    End If
End Property

Public Property Get ProcessPage()
    ProcessPage = m_strProcessPage
End Property

Public Property Let ProcessPage(strProcessPage)
    m_strProcessPage = strProcessPage
End Property

Public Property Get Title()
    If IsNull(m_strTitle) Or Len(m_strTitle) = 0 Then
        Title = "Data Grid"
    Else
        Title = m_strTitle
    End If
End Property

Public Property Let Title(strTitle)
    m_strTitle = strTitle
End Property

Public Property Get RSName()
    If IsNull(m_strRSName) Or Len(m_strRSName) = 0 Then
        RSName = "Grid"
    Else
        RSName = m_strRSName
    End If
End Property

Public Property Let RSName(strRSName)
    m_strRSName = strRSName
End Property

Public Property Get FindFields()
    FindFields = m_strFindFields
End Property

Public Property Let FindFields(strFindFields)
    m_strFindFields = strFindFields
End Property

Sub ShowDataGrid()

Dim intPageNum
Dim objConn
Dim objRS
Dim intAbs
Dim intCurrentPage
Dim intFindCol
Dim intPageSize
Dim intRow
Dim intCol
Dim i
Dim intPos
Dim intDisplayRows
Dim strSort
Dim strSortDir
Dim strLastSort
Dim strLastSortDir
Dim strColor
Dim strFind
Dim boolFind
Dim boolFound



相關文章

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。