1 Attachment(s)
populate a complex list of object
I'm working to rebuild a very old 16bit application used to manage games championship. (I have no access to source code).
Since there are multiple teams, multiple match and multiple gamefield, the old app manage them(to known who is playing and where), in a table like the attached picture.
Attachment 187811
In this example the cmapionship is on 3 days. in red days, green matchs, yellow teams and with the gamefield.
It seem to me that this structure is not very db friendly, so I'm thinking to use a class like the follow as "row" and save them in db.
Code:
Public Class OdtItem
Private _team As Integer
Public Property Team As String
Get
Return _team
End Get
Set(ByVal value As String)
_team = value
End Set
End Property
Private _day As Integer
Public Property Day As Integer
Get
Return _day
End Get
Set(ByVal value As Integer)
_day = value
End Set
End Property
Private _gamefield As Integer
Public Property Gamefield As Integer
Get
Return _gamefield
End Get
Set(ByVal value As Integer)
_gamefield = value
End Set
End Property
Private _match As Integer
Public Property Match As Integer
Get
Return _match
End Get
Set(ByVal value As Integer)
_match = value
End Set
End Property
End Class
End Module
So given the numers of days, the numbers of match for every day, and a list of the avaible gamefield, and the numbers of teams, I need to populate a list of this OdtItems, so I can store it in db.
My iusse is that I can't figure out how to iterate to populate all the field of OdtItem togheter.
So I'm doubt of my approch.
Any better idea?
Any advice?
Re: populate a complex list of object
You say 4 days, i see only 3 (2 matches on day 1, 3 matches on day 2, 2 matches on day3)
and the gamefield completely escapes me. What is the significiance of the "1"'s and "2"'s?
Are Teams playing against each other, or each team plays for itself?
That's just for the start....
Re: populate a complex list of object
Quote:
Originally Posted by
Zvoni
You say 4 days, i see only 3 (2 matches on day 1, 3 matches on day 2, 2 matches on day3)
and the gamefield completely escapes me. What is the significiance of the "1"'s and "2"'s?
Are Teams playing against each other, or each team plays for itself?
That's just for the start....
You are right: I made a digit mistake. days are 3.
Each team plays for itself, it's actually more a group of players (that play for itself).
for gamefields, I think I'm wrong translating from my language: it's the place where they play, and this places are numbered.
It's something similar as it work on olympic trap.
Re: populate a complex list of object
Please note that the table I posted is the way that the old DOS program display and store data, but I'm not bounded to that.