Results 1 to 4 of 4

Thread: populate a complex list of object

Threaded View

  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.

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