C
Chip Mayan
I need a little help, of coarse!
I have created a class with get and set procedures (below). I want to
"fill" the class with information from a table and be able to access
that information like I would an array or a dataset. How do I set the
information in the class, and how do I get it back from the class. I
know how to open the table and walk through it, I just need to know
how to work with the class to store and retrieve information. Any
help would be great!
Thanks,
Chip
<Serializable()> Public Class BaseClass
Private _Description
Private _Code
Private _Matl
Private _ValveSize
Private _EndConn
Private _Act
Private _Pack
Private _TrimForm
Private _TrimMatl
Public Property Description() As String
Get
Description = _Description
End Get
Set(ByVal Value As String)
_Description = Value
End Set
End Property
Public Property Code() As String
Get
Code = _Code
End Get
Set(ByVal Value As String)
_Code = Value
End Set
End Property
Public Property Matl() As String
Get
Matl = _Matl
End Get
Set(ByVal Value As String)
_Matl = Value
End Set
End Property
Public Property ValveSize() As String
Get
ValveSize = _ValveSize
End Get
Set(ByVal Value As String)
_ValveSize = Value
End Set
End Property
Public Property EndConn() As String
Get
EndConn = _EndConn
End Get
Set(ByVal Value As String)
_EndConn = Value
End Set
End Property
Public Property Act() As String
Get
Act = _Act
End Get
Set(ByVal Value As String)
_Act = Value
End Set
End Property
Public Property Pack() As String
Get
Pack = _Pack
End Get
Set(ByVal Value As String)
_Pack = Value
End Set
End Property
Public Property TrimForm() As String
Get
TrimForm = _TrimForm
End Get
Set(ByVal Value As String)
_TrimForm = Value
End Set
End Property
Public Property TrimMatl() As String
Get
TrimMatl = _TrimMatl
End Get
Set(ByVal Value As String)
_TrimMatl = Value
End Set
End Property
Public Overrides Function ToString() As String
Return _Code
End Function
End Class
I have created a class with get and set procedures (below). I want to
"fill" the class with information from a table and be able to access
that information like I would an array or a dataset. How do I set the
information in the class, and how do I get it back from the class. I
know how to open the table and walk through it, I just need to know
how to work with the class to store and retrieve information. Any
help would be great!
Thanks,
Chip
<Serializable()> Public Class BaseClass
Private _Description
Private _Code
Private _Matl
Private _ValveSize
Private _EndConn
Private _Act
Private _Pack
Private _TrimForm
Private _TrimMatl
Public Property Description() As String
Get
Description = _Description
End Get
Set(ByVal Value As String)
_Description = Value
End Set
End Property
Public Property Code() As String
Get
Code = _Code
End Get
Set(ByVal Value As String)
_Code = Value
End Set
End Property
Public Property Matl() As String
Get
Matl = _Matl
End Get
Set(ByVal Value As String)
_Matl = Value
End Set
End Property
Public Property ValveSize() As String
Get
ValveSize = _ValveSize
End Get
Set(ByVal Value As String)
_ValveSize = Value
End Set
End Property
Public Property EndConn() As String
Get
EndConn = _EndConn
End Get
Set(ByVal Value As String)
_EndConn = Value
End Set
End Property
Public Property Act() As String
Get
Act = _Act
End Get
Set(ByVal Value As String)
_Act = Value
End Set
End Property
Public Property Pack() As String
Get
Pack = _Pack
End Get
Set(ByVal Value As String)
_Pack = Value
End Set
End Property
Public Property TrimForm() As String
Get
TrimForm = _TrimForm
End Get
Set(ByVal Value As String)
_TrimForm = Value
End Set
End Property
Public Property TrimMatl() As String
Get
TrimMatl = _TrimMatl
End Get
Set(ByVal Value As String)
_TrimMatl = Value
End Set
End Property
Public Overrides Function ToString() As String
Return _Code
End Function
End Class