When importing in a CSV file, the code is supposed to update the status under certain conditions:
- If a player AND TeamID match:
- Then Update the Status of the necessary Team
- If a player is found, but the TeamID does not match
- Update the Status AND the TeamID of the matching ID
- If a player's nickname is found but the name is GUEST99999:
- Update the TeamID AND Membership ID
- If the nickname AND player number are not found, but the TeamID some how matches..
|
For Each player In lstFileData |
|
Dim index As Integer = lstTournTeams.IndexOf(lstTournTeams.Find(Function(p) p.PlayerA.MembershipNumber = player.PlayerA.MembershipNumber And p.TeamID = player.TeamID And p.PlayerA.MembershipNumber <> "GUEST99999")) |
|
|
|
Dim altIndex As Integer = lstTournTeams.IndexOf(lstTournTeams.Find(Function(p) p.PlayerA.MembershipNumber = player.PlayerA.MembershipNumber And p.TeamID = player.TeamID And p.PlayerA.MembershipNumber <> "GUEST99999")) |
|
|
|
Dim teamIDSearch As Integer = lstTournTeams.IndexOf(lstTournTeams.Find(Function(p) p.TeamID = player.TeamID And p.TeamID <> "0")) |
|
|
|
If index <> -1 Then |
|
If lstTournTeams(index).Status < player.Status Then |
|
lstTournTeams(index).Status = player.Status |
|
lstTournTeams(index).TeamID = player.TeamID |
|
End If |
|
|
|
ElseIf altIndex <> -1 And (player.PlayerA.MembershipNumber <> "GUEST99999" Or player.PlayerA.MembershipNumber <> "0000000986") Then |
|
lstTournTeams(altIndex).TeamID = player.TeamID |
|
lstTournTeams(altIndex).Status = player.Status |
|
|
|
Else |
|
lstTournTeams.Add(player) |
|
End If |
|
Next |
When importing in a CSV file, the code is supposed to update the status under certain conditions:
TCG-Registration-Helper/TCG+ Registration Helper/Registration - Individual.vb
Lines 1080 to 1100 in 8e3037a