У меня есть Access база и пространство имен с классами для полного или частичного сбора данных о книге.
Вот классы
Namespace Book
Public MustInherit Class clsBooks
Private _Name As String
Private _Annotation As String
Public BookCollection As Collection = New Collection
Public _Only As Boolean
Public Property Name() As String
Get
Return _Name
End Get
Set(ByVal Value As String)
_Name = Value
End Set
End Property
Public Property Annotation() As String
Get
Return _Annotation
End Get
Set(ByVal Value As String)
_Annotation = Value
End Set
End Property
Public Property OnlyRead() As Boolean
Get
Return _Only
End Get
Set(ByVal Value As Boolean)
_Only = Value
End Set
End Property
End Class
Public MustInherit Class Authors
Inherits clsBooks
Private _Author1 As String
Private _Author2 As String
Private _OtherAuthors
Private _Proof_Reader As String
Private _Editor As String
Private _Translator As String
Public Property Author1()
Get
Return _Author1
End Get
Set(ByVal Value)
_Author1 = Value
End Set
End Property
Public Property Author2()
Get
Return _Author2
End Get
Set(ByVal Value)
Author2 = Value
End Set
End Property
Public Property OtherAuthors()
Get
Return _OtherAuthors
End Get
Set(ByVal Value)
_OtherAuthors = Value
End Set
End Property
Public Property Editor()
Get
Return _Editor
End Get
Set(ByVal Value)
_Editor = Value
End Set
End Property
Public Property Proof_Reader()
Get
Return _Proof_Reader
End Get
Set(ByVal Value)
_Proof_Reader = Value
End Set
End Property
Public Property Translator()
Get
Return _Translator
End Get
Set(ByVal Value)
_Translator = Value
End Set
End Property
End Class
Public MustInherit Class BookAllInfo
Inherits Authors
Private _ISBN As String
Private _BBK As String
Private _Publishing As String
Private _Publicyear As String
Public Property ISBN()
Get
Return _ISBN
End Get
Set(ByVal Value)
_ISBN = Value
End Set
End Property
Public Property BBK()
Get
Return _BBK
End Get
Set(ByVal Value)
_BBK = Value
End Set
End Property
Public Property Publishing()
Get
Return _Publishing
End Get
Set(ByVal Value)
_Publishing = Value
End Set
End Property
Public Property Publicyear()
Get
Return _Publicyear
End Get
Set(ByVal Value)
_Publicyear = Value
End Set
End Property
End Class
End Namespace
Наверное кто english знает, поймет :)
'General Declarations
Imports Библиотека.Book
'Создаем переменную для управления
Dim bk As New AllBookInfo
'Присваиваем свойсвам переменной тексты из текстбоксов (эту часть я опустил)
Мне, собственно, нужен код для сохранения в бд data.mdb (table books) значений свойств переменной, каждое
свойство в свое поле записи в таблице.
Всем спасибо!
Ответить
|