If e.DataCol.Name = "来电_单位" OrElse e.DataCol.Name = "通知_办报员" Then
Dim dr As DataRow
Dim Filter As String
Dim a As String
Dim b As String
Filter = "[单位_名称] = '" & e.DataRow("通知_单位") & "' And [用户_姓名] = '" & e.DataRow("通知_办报员") & "'"
dr = DataTables("人员管理").Find(Filter)
If dr IsNot Nothing Then
If dr.IsNull("电话_手机2") Then
a = ""
Else
a = ","
End If
If dr.IsNull("电话_手机3") Then
b = ","
Else
b = ""
End If
e.DataRow("通知_办公电话") = dr("电话_办公室")
e.DataRow("通知_移动电话") = dr("电话_手机1") & a & dr("电话_手机2") & b & dr("电话_手机3")
Else
e.DataRow("通知_办公电话") = Nothing
End If
End If
[此贴子已经被作者于2016/3/10 22:07:58编辑过]