Dim 集合1 As List(of String) = DataTables("员工").GetValues("姓名")
Select Case e.DataCol.Name
Case "活动一参与"
Dim 集合2 As new List(of String)
If e.NewValue IsNot Nothing Then 集合2.AddRange(e.NewValue.split(","))
集合2.AddRange(e.DataRow("活动二参与").split(","))
集合2.AddRange(e.DataRow("活动三参与").split(","))
e.DataRow("剩余人员") = String.join(",",(集合1.Except(集合2)).ToArray)
Case "活动二参与"
Dim 集合2 As new List(of String)
If e.NewValue IsNot Nothing Then 集合2.AddRange(e.NewValue.split(","))
集合2.AddRange(e.DataRow("活动一参与").split(","))
集合2.AddRange(e.DataRow("活动三参与").split(","))
e.DataRow("剩余人员") = String.join(",",(集合1.Except(集合2)).ToArray)
Case "活动三参与"
Dim 集合2 As new List(of String)
If e.NewValue IsNot Nothing Then 集合2.AddRange(e.NewValue.split(","))
集合2.AddRange(e.DataRow("活动一参与").split(","))
集合2.AddRange(e.DataRow("活动二参与").split(","))
e.DataRow("剩余人员") = String.join(",",(集合1.Except(集合2)).ToArray)
End Select