ajax+asp无限级分类树型结构的代码

2019-09-14 07:20:28于丽

            sParentPath=trim(rs("ParentPath"))
            nDepth=trim(rs("Depth"))
            nRootID=trim(rs("RootID"))
            nChild=trim(rs("Child"))
            nOrderID=trim(rs("OrderID"))
            sFilePath=trim(rs("FilePath"))
        end if
        set rs=nothing        
    End Sub

    Public Function FAddCheck()        '类别添加检查函数,结果为0表示通过检查,为1表示有错误发生,有错误发生时退出函数,将错误信息写入错误变量ErrorStr
        dim temprs
        FAddCheck=0
        if sClassName="" then        '类名为空
            FAddCheck=1
            ErrorStr="类名不能为空!"
            exit Function
        else            
            if nParentID="" then        '父id为空
                FAddCheck=1
                ErrorStr="父id不能为空!"
                exit Function
            else
                if nParentID<>0 then
                    set temprs=conn.execute("select ClassID From ArticleClass where ClassID=" & nParentID)        '父类别不存在
                    if temprs.eof then
                        FAddCheck=1