有这么一个目录树窗口(当中包括厂区|部门|业务员|类型)四个结点,现在有个核算单位的下拉窗口,当类型不空时,核算单位=类型,当类型为空时,核算单位=厂区,以下的代码错在哪里
if e.node.level=3 Then
Dim ps() As String = e.node.fullpath.split("\")
Dim tr As Row =Tables("客户表").current
Dim dr As DataRow =DataTables("厂区").find("厂区='" & ps(0) & "' And 部门 = '" & ps(1) & "' and 业务员 ='"& ps(2) &"' and 类型='"& ps(3) & "'")
If dr IsNot Nothing Then
tr("核算单位")=dr("类型")
Else tr("核算单位")=dr("厂区")
e.form.dropdownbox.value=tr("核算单位")
End If
e.form.dropdownbox.closedropdown()
End If