t N = xml.selectSingleNode('command/param[name='CustomerID']/value')
N.Text = CustomerID
Set xml = executeSPWithReturn(xml.xml)
productName = xml.selectSingleNode('values/ProductName').Text
' 显示text域
txtResult.Text = ''
Me.txtResult.Visible = True
dgResult.Visible = False
' 显示product名
txtResult.Text = '最近的产品是: ' & productName
End Sub
Sub getCustomerList()
Dim sXML As String
Dim i As Integer
Dim s As String
sXML = getCommandXML('getCustomerList')
Set RCustomers = getRecordset(sXML)
Set dgCustomers.DataSource = RCustomers
End Sub
Sub getCustomerDetail(CustomerID As String)
' 找出列表中相关联的ID号
Dim sXML As String
Dim R As Recordset
Dim F As Field
Dim s As String
Dim N As IXMLDOMNode
Dim xml As DOMDocument
sXML = getCommandXML('CustOrderHist')
Set xml = New DOMDocument
xml.loadXML sXML
Set N = xml.selectSingleNode('command/param[name='CustomerID']/value')
N.Text = CustomerID
Set R = getRecordset(xml.xml)
' 隐藏 text , 因为它是一个记录集
txtResult.Visible = False
dgResult.Visible = True
Set dgResult.DataSource = R
End Sub
Function getRecordset(sXML As String) As Recordset
Dim R As Recordset
Dim xml As DOMDocument
Set xml = getData(sXML)
Debug.Print TypeName(xml)
On Error Resume Next
N.Text = CustomerID
Set xml = executeSPWithReturn(xml.xml)
productName = xml.selectSingleNode('values/ProductName').Text
' 显示text域
txtResult.Text = ''
Me.txtResult.Visible = True
dgResult.Visible = False
' 显示product名
txtResult.Text = '最近的产品是: ' & productName
End Sub
Sub getCustomerList()
Dim sXML As String
Dim i As Integer
Dim s As String
sXML = getCommandXML('getCustomerList')
Set RCustomers = getRecordset(sXML)
Set dgCustomers.DataSource = RCustomers
End Sub
Sub getCustomerDetail(CustomerID As String)
' 找出列表中相关联的ID号
Dim sXML As String
Dim R As Recordset
Dim F As Field
Dim s As String
Dim N As IXMLDOMNode
Dim xml As DOMDocument
sXML = getCommandXML('CustOrderHist')
Set xml = New DOMDocument
xml.loadXML sXML
Set N = xml.selectSingleNode('command/param[name='CustomerID']/value')
N.Text = CustomerID
Set R = getRecordset(xml.xml)
' 隐藏 text , 因为它是一个记录集
txtResult.Visible = False
dgResult.Visible = True
Set dgResult.DataSource = R
End Sub
Function getRecordset(sXML As String) As Recordset
Dim R As Recordset
Dim xml As DOMDocument
Set xml = getData(sXML)
Debug.Print TypeName(xml)
On Error Resume Next
| 对此文章发表了评论 |
