We could think about:
- Grouping the data by Name
- Process all groupmembers
- When any member of a group fails, then set the status to all
We recommend to work on Datarow levels eg Groups = List(Of List(Of DataRow)) as a heavy CopyToDataTable will get lost the origin DataTable Identities
Assign Activity:
Groups | List(Of List(Of DataRow)) =
(From d in yourDataTableVar.AsEnumerable
Group d by k=d("Name").ToString.Trim into grp=Group
Select g = grp.ToList).ToList
For each Activity | grp in Groups | TypeArgument: List(Of DataRow)
- For each Activity | mbr = gpr | TypeArgument: DataRow
- Process the members (e.g. Account number), track the status and break innerloop by issues
- For each Activity | mbr2 = gpr | TypeArgument: DataRow
- Set the status to all members from the group