Dim dr As DataRow = e.DataRow
Select Case e.DataCol.Name
Case "客户类别"
If dr.IsNull("分公司") = False
Dim fdr As DataRow = e.DataTable.Find("客户名称 = '" & dr("客户名称") & "' and 分公司 is null")
If fdr IsNot Nothing Then
Dim lst As new List(of String)
lst.AddRange(fdr("客户类别").split(","))
For Each nm As String In dr("客户类别").split(",")
If lst.Contains(nm) = False Then
lst.Add(nm)
End If
Next
fdr("客户类别") = String.Join(",",lst.ToArray)
End If
End If
End Select