Select Case e.DataCol.Name
Case "部门类别"
Dim bmlbs As List(Of String) = DataTables("部门信息表").GetValues("部门类别")
Dim lydws As List(Of String) = DataTables("部门信息表").GetValues("领用单位表名")
For Each bmlb As String In bmlbs
If DataTables("部门信息表").Datacols.Contains(bmlb) Then
If e.DataRow("部门类别") = bmlb Then
For Each lydw As String In lydws
If DataTables("部门信息表").Datacols.Contains(lydw) Then
e.DataRow("分配表名") = lydw
End If
Next
End If
End If
Next
End Select
麻烦给看一下为什么不起作用