Results 1 to 4 of 4

Thread: populate a complex list of object

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2015
    Posts
    174

    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.
    Name:  table.jpg
Views: 566
Size:  20.2 KB
    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?
    Last edited by hannibal smith; Jun 13th, 2023 at 02:47 AM.

  2. #2
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    5,261

    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....
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2015
    Posts
    174

    Re: populate a complex list of object

    Quote Originally Posted by Zvoni View Post
    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.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jun 2015
    Posts
    174

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width