<Public>
<property name="Types">
<get/>
</property>
<method name="GetTypeName">
<parameter name="iVal"/>
</method>
</Public> <implements type="ASP" id="ASP"/> <script language="VBScript">
<![CDATA[ Option Explicit
Private Const MODULE_NAME = "bzDemo.wsc" Private Const DOC_DEF_ID =
Private Const LOG_CLASS_ID = Dim auDemo,dbDemo,auCommon
Set auDemo = CreateObject("auDemo.wsc")
Set dbDemo = CreateObject("dbDemo.wsc")
Set auCommon = CreateObject("auCommon.wsc") Dim arrType(,)
arrType(,) = : arrType(,) = "类型1"
arrType(,) = : arrType(,) = "类型2"
arrType(,) = : arrType(,) = "类型3" Public Function Get_Types()
Get_Types = arrType
End Function Public Function GetTypeName(iVal)
Dim i
GetTypeName = "?"
For i = To UBound(arrType,)
If arrType(,i) = iVal Then
GetTypeName = arrType(,i)
Exit For
End If
Next
End Function Private Function fnAddLog(idDemo,dtEventTime,sEventType,idEventHandler,sEventDescription)
Dim dbLog
Set dbLog = CreateObject("dbLog.wsc")
Call dbLog.AddLog(LOG_CLASS_ID,idDemo,dtEventTime,sEventType,idEventHandler,sEventDescription,Null,Null,Null,Null,Null)
End Function Function ListLog(idDemo,dtLogFrom,dtLogTo)
Dim dbLog
Set dbLog = CreateObject("dbLog.wsc")
Set ListLog = dbLog.ListLog3(Array(LOG_CLASS_ID),dtLogFrom,dtLogTo,idDemo,Null,Null,Null,Null,"LogTimeDESC")
End Function Public Function AddDemo(sName,iAge)
Dim arrNewContent(,),idDemo
arrNewContent(,) = "Name" : arrNewContent(,) = sName
arrNewContent(,) = "Age" : arrNewContent(,) = iAge
If Not auDemo.CanAddNews(auCommon.Logon_UID,True,arrNewContent) Then Err.Raise ,MODULE_NAME,"你没有新建的权限。" idDemo = dbDemo.Add(sName,iAge) Dim sLog
sLog = ""
Call fnAddLog(idDemo,Now,"新增",auCommon.Logon_UID,sLog)
AddDemo = idDemo
End Function ]]>
</script>
04-20 19:11