参考代码
If e.DataCol.Name = "审签序号" Then
If e.DataRow.IsNull(e.DataCol) Then
e.DataRow("审核意见") = Nothing
Else
Dim str As String = ""
Dim lxs As List(Of String) = DataTables("人员增减").GetValues("渠道", "审签序号 = '" & e.NewValue & "'")
For Each lx As String In lxs
If lx Like "*辞职*" Then
For Each dr As DataRow In DataTables("人员增减").Select("审签序号 = '" & e.NewValue & "' and 渠道 = '" & lx & "'")
str &= dr("姓名") & "由" & dr("原工作单位及职务") & lx & "到" & dr("现工作单位及职务") & ";"
Next
Else
Dim drs As List(of DataRow) = DataTables("人员增减").Select("审签序号 = '" & e.NewValue & "' and 渠道 = '" & lx & "'")
str &= drs(0)("姓名") & "等" & drs.Count & "人" & lx & ";"
End If
Next
e.DataRow("审核意见") = str.Trim(";") & "."
End If
End If