www.pudn.com > opy_LMS.rar > frmBooks.frm
VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form frmBooks
BorderStyle = 3 'Fixed Dialog
Caption = "图书管理"
ClientHeight = 6135
ClientLeft = 45
ClientTop = 330
ClientWidth = 8160
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 6135
ScaleWidth = 8160
ShowInTaskbar = 0 'False
Begin TabDlg.SSTab SSTab1
Height = 5415
Left = 120
TabIndex = 0
Top = 600
Width = 7935
_ExtentX = 13996
_ExtentY = 9551
_Version = 393216
TabOrientation = 1
Style = 1
Tabs = 2
Tab = 1
TabHeight = 520
TabCaption(0) = "总体视图"
TabPicture(0) = "frmBooks.frx":0000
Tab(0).ControlEnabled= 0 'False
Tab(0).Control(0)= "Datagrid"
Tab(0).ControlCount= 1
TabCaption(1) = "具体视图"
TabPicture(1) = "frmBooks.frx":001C
Tab(1).ControlEnabled= -1 'True
Tab(1).Control(0)= "lbl_title"
Tab(1).Control(0).Enabled= 0 'False
Tab(1).Control(1)= "lbl_pub"
Tab(1).Control(1).Enabled= 0 'False
Tab(1).Control(2)= "lbl_isbn"
Tab(1).Control(2).Enabled= 0 'False
Tab(1).Control(3)= "lbl_price"
Tab(1).Control(3).Enabled= 0 'False
Tab(1).Control(4)= "lbl_subject"
Tab(1).Control(4).Enabled= 0 'False
Tab(1).Control(5)= "lbl_Pages"
Tab(1).Control(5).Enabled= 0 'False
Tab(1).Control(6)= "lbl_edition"
Tab(1).Control(6).Enabled= 0 'False
Tab(1).Control(7)= "lbl_bookid"
Tab(1).Control(7).Enabled= 0 'False
Tab(1).Control(8)= "Fra_self"
Tab(1).Control(8).Enabled= 0 'False
Tab(1).Control(9)= "txt_title"
Tab(1).Control(9).Enabled= 0 'False
Tab(1).Control(10)= "txt_publication"
Tab(1).Control(10).Enabled= 0 'False
Tab(1).Control(11)= "Fra_Author"
Tab(1).Control(11).Enabled= 0 'False
Tab(1).Control(12)= "txt_isbn"
Tab(1).Control(12).Enabled= 0 'False
Tab(1).Control(13)= "txt_price"
Tab(1).Control(13).Enabled= 0 'False
Tab(1).Control(14)= "txt_subject"
Tab(1).Control(14).Enabled= 0 'False
Tab(1).Control(15)= "txt_pages"
Tab(1).Control(15).Enabled= 0 'False
Tab(1).Control(16)= "txt_edition"
Tab(1).Control(16).Enabled= 0 'False
Tab(1).Control(17)= "txt_Bookid"
Tab(1).Control(17).Enabled= 0 'False
Tab(1).Control(18)= "frm_cmd"
Tab(1).Control(18).Enabled= 0 'False
Tab(1).ControlCount= 19
Begin VB.Frame frm_cmd
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400040&
Height = 1095
Left = 240
TabIndex = 23
Top = 3720
Width = 7455
Begin VB.CommandButton cmdLast
Appearance = 0 'Flat
Height = 345
Left = 6960
MouseIcon = "frmBooks.frx":0038
MousePointer = 99 'Custom
Picture = "frmBooks.frx":018A
Style = 1 'Graphical
TabIndex = 33
ToolTipText = "Move Last"
Top = 240
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmdNext
Appearance = 0 'Flat
Height = 345
Left = 6600
MouseIcon = "frmBooks.frx":03DC
MousePointer = 99 'Custom
Picture = "frmBooks.frx":052E
Style = 1 'Graphical
TabIndex = 32
ToolTipText = "Move Next"
Top = 240
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmdPrevious
Appearance = 0 'Flat
Height = 345
Left = 5520
MouseIcon = "frmBooks.frx":073A
MousePointer = 99 'Custom
Picture = "frmBooks.frx":088C
Style = 1 'Graphical
TabIndex = 31
ToolTipText = "Move Previous"
Top = 240
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmdFirst
Appearance = 0 'Flat
Height = 345
Left = 5160
MouseIcon = "frmBooks.frx":0A9B
MousePointer = 99 'Custom
Picture = "frmBooks.frx":0BED
Style = 1 'Graphical
TabIndex = 30
ToolTipText = "Move First"
Top = 240
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmd_new
Appearance = 0 'Flat
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 120
MaskColor = &H8000000F&
MouseIcon = "frmBooks.frx":0E3C
MousePointer = 99 'Custom
Picture = "frmBooks.frx":0F8E
Style = 1 'Graphical
TabIndex = 29
ToolTipText = "Add new record"
Top = 240
Width = 735
End
Begin VB.CommandButton cmd_edit
Appearance = 0 'Flat
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 960
MouseIcon = "frmBooks.frx":156C
MousePointer = 99 'Custom
Picture = "frmBooks.frx":16BE
Style = 1 'Graphical
TabIndex = 28
ToolTipText = "Edit record"
Top = 240
Width = 735
End
Begin VB.CommandButton cmd_delete
Appearance = 0 'Flat
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1800
MouseIcon = "frmBooks.frx":1C63
MousePointer = 99 'Custom
Picture = "frmBooks.frx":1DB5
Style = 1 'Graphical
TabIndex = 27
ToolTipText = "Delete record"
Top = 240
Width = 735
End
Begin VB.CommandButton cmd_save
Appearance = 0 'Flat
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 2640
MouseIcon = "frmBooks.frx":22FF
MousePointer = 99 'Custom
Picture = "frmBooks.frx":2451
Style = 1 'Graphical
TabIndex = 26
ToolTipText = "Save record"
Top = 240
Width = 735
End
Begin VB.CommandButton cmdcancel
Appearance = 0 'Flat
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3480
MouseIcon = "frmBooks.frx":29E9
MousePointer = 99 'Custom
Picture = "frmBooks.frx":2B3B
Style = 1 'Graphical
TabIndex = 25
ToolTipText = "Cancel"
Top = 240
Width = 735
End
Begin VB.CommandButton cmd_close
Appearance = 0 'Flat
Height = 615
Left = 4320
MouseIcon = "frmBooks.frx":30BB
MousePointer = 99 'Custom
Picture = "frmBooks.frx":320D
Style = 1 'Graphical
TabIndex = 24
Top = 240
Width = 735
End
Begin VB.Label Label6
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "取消"
Height = 255
Left = 3480
TabIndex = 42
Top = 840
Width = 735
End
Begin VB.Label Label5
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "保存"
Height = 255
Left = 2640
TabIndex = 41
Top = 840
Width = 735
End
Begin VB.Label Label4
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "删除"
Height = 255
Left = 1800
TabIndex = 40
Top = 840
Width = 735
End
Begin VB.Label Label2
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "编辑"
Height = 255
Left = 960
TabIndex = 39
Top = 840
Width = 735
End
Begin VB.Label Label1
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "新建"
Height = 255
Left = 120
TabIndex = 38
Top = 840
Width = 735
End
Begin VB.Label Label3
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "关闭"
Height = 255
Left = 4320
TabIndex = 37
Top = 840
Width = 735
End
Begin VB.Label lbl_total
BackStyle = 0 'Transparent
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 6360
TabIndex = 36
Top = 720
Width = 975
End
Begin VB.Label lbl_rec
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5160
TabIndex = 35
Top = 720
Width = 855
End
Begin VB.Label Label10
BackStyle = 0 'Transparent
Caption = "of"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 6120
TabIndex = 34
Top = 720
Width = 255
End
End
Begin VB.TextBox txt_Bookid
Alignment = 1 'Right Justify
DataField = "Bookid"
DataSource = "Adodc"
ForeColor = &H00400000&
Height = 285
Left = 1440
Locked = -1 'True
TabIndex = 22
Top = 2640
Width = 1815
End
Begin VB.TextBox txt_edition
DataField = "Edition"
ForeColor = &H00400000&
Height = 285
Left = 4680
Locked = -1 'True
MaxLength = 50
TabIndex = 21
Top = 2640
Width = 3015
End
Begin VB.TextBox txt_pages
Alignment = 1 'Right Justify
DataField = "Pages"
DataSource = "Adodc"
ForeColor = &H00400000&
Height = 285
Left = 1440
Locked = -1 'True
MaxLength = 5
TabIndex = 20
Top = 3000
Width = 1815
End
Begin VB.TextBox txt_subject
DataField = "Subject"
DataSource = "Adodc"
ForeColor = &H00400000&
Height = 285
Left = 4680
Locked = -1 'True
MaxLength = 50
TabIndex = 19
Top = 3000
Width = 3015
End
Begin VB.TextBox txt_price
Alignment = 1 'Right Justify
DataField = "Price"
DataSource = "Adodc"
ForeColor = &H00400000&
Height = 285
Left = 1440
Locked = -1 'True
MaxLength = 8
TabIndex = 18
Top = 3360
Width = 1815
End
Begin VB.TextBox txt_isbn
DataField = "ISBNNumber"
DataSource = "Adodc"
ForeColor = &H00400000&
Height = 285
Left = 4680
Locked = -1 'True
MaxLength = 13
TabIndex = 17
Top = 3360
Width = 3015
End
Begin VB.Frame Fra_Author
Caption = "作 者"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400040&
Height = 1575
Left = 240
TabIndex = 10
Top = 960
Width = 4215
Begin VB.TextBox txt_author3
DataField = "Author3"
DataSource = "Adodc"
ForeColor = &H00400000&
Height = 285
Left = 1200
Locked = -1 'True
MaxLength = 50
TabIndex = 13
Top = 1080
Width = 2895
End
Begin VB.TextBox txt_author2
DataField = "Author2"
DataSource = "Adodc"
ForeColor = &H00400000&
Height = 285
Left = 1200
Locked = -1 'True
MaxLength = 50
TabIndex = 12
Top = 720
Width = 2895
End
Begin VB.TextBox txt_author1
DataField = "Author1"
DataSource = "Adodc"
ForeColor = &H00400000&
Height = 285
Left = 1200
Locked = -1 'True
MaxLength = 50
TabIndex = 11
Top = 360
Width = 2895
End
Begin VB.Label lbl_a3
BackStyle = 0 'Transparent
Caption = "作者三"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 240
Left = 240
TabIndex = 16
Top = 1125
Width = 855
End
Begin VB.Label lbl_a2
BackStyle = 0 'Transparent
Caption = "作者二"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 240
Left = 240
TabIndex = 15
Top = 765
Width = 855
End
Begin VB.Label lbl_a1
BackStyle = 0 'Transparent
Caption = "作者一"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 240
Left = 240
TabIndex = 14
Top = 420
Width = 855
End
End
Begin VB.TextBox txt_publication
DataField = "Publication"
DataSource = "Adodc"
ForeColor = &H00400000&
Height = 285
Left = 1440
Locked = -1 'True
MaxLength = 80
TabIndex = 9
Top = 600
Width = 6255
End
Begin VB.TextBox txt_title
BackColor = &H00FFFFFF&
DataField = "Title"
ForeColor = &H00400000&
Height = 285
Left = 1440
Locked = -1 'True
MaxLength = 80
TabIndex = 8
Top = 240
Width = 6255
End
Begin VB.Frame Fra_self
Caption = "书本数目信息"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400040&
Height = 1575
Left = 4560
TabIndex = 1
Top = 960
Width = 3135
Begin VB.TextBox txt_avano
Alignment = 1 'Right Justify
DataField = "Avano"
DataSource = "Adodc"
ForeColor = &H00400000&
Height = 285
Left = 1800
Locked = -1 'True
MaxLength = 3
TabIndex = 4
Top = 360
Width = 1215
End
Begin VB.TextBox txt_issue
Alignment = 1 'Right Justify
DataField = "Issno"
DataSource = "Adodc"
ForeColor = &H00400000&
Height = 285
Left = 1800
Locked = -1 'True
MaxLength = 3
TabIndex = 3
Top = 720
Width = 1215
End
Begin VB.TextBox txt_totalno
Alignment = 1 'Right Justify
DataField = "Totalno"
DataSource = "Adodc"
ForeColor = &H00400000&
Height = 285
Left = 1800
Locked = -1 'True
MaxLength = 3
TabIndex = 2
Top = 1080
Width = 1215
End
Begin VB.Label lbl_c1
BackStyle = 0 'Transparent
Caption = "总计"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 240
TabIndex = 7
Top = 1125
Width = 975
End
Begin VB.Label lbl_c2
BackStyle = 0 'Transparent
Caption = "借出"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 240
TabIndex = 6
Top = 765
Width = 615
End
Begin VB.Label lbl_c3
BackStyle = 0 'Transparent
Caption = "可借"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 240
TabIndex = 5
Top = 405
Width = 1095
End
End
Begin MSDataGridLib.DataGrid Datagrid
Height = 4815
Left = -74880
TabIndex = 43
ToolTipText = "图书总体视图"
Top = 120
Width = 7695
_ExtentX = 13573
_ExtentY = 8493
_Version = 393216
AllowUpdate = 0 'False
AllowArrows = -1 'True
Appearance = 0
BackColor = -2147483633
DefColWidth = 7
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "图书总体视图"
ColumnCount = 14
BeginProperty Column00
DataField = "Bookid"
Caption = "书号"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = "Title"
Caption = "书名"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "Author1"
Caption = "作者一"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "Author2"
Caption = "作者二"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "Author3"
Caption = "作者三"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column05
DataField = "Avano"
Caption = "可借"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column06
DataField = "Issno"
Caption = "已借"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column07
DataField = "Totalno"
Caption = "总数"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column08
DataField = "Edition"
Caption = "出版社"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column09
DataField = "ISBNNumber"
Caption = "ISBN号"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column10
DataField = "Pages"
Caption = "页数"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column11
DataField = "Price"
Caption = "定价"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column12
DataField = "Subject"
Caption = "类型"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column13
DataField = "Publication"
Caption = "出版社"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
SizeMode = 1
AllowRowSizing = 0 'False
BeginProperty Column00
ColumnWidth = 645.165
EndProperty
BeginProperty Column01
ColumnWidth = 2835.213
EndProperty
BeginProperty Column02
ColumnWidth = 1709.858
EndProperty
BeginProperty Column03
ColumnWidth = 1590.236
EndProperty
BeginProperty Column04
EndProperty
BeginProperty Column05
ColumnWidth = 705.26
EndProperty
BeginProperty Column06
ColumnWidth = 659.906
EndProperty
BeginProperty Column07
ColumnWidth = 629.858
EndProperty
BeginProperty Column08
ColumnWidth = 1335.118
EndProperty
BeginProperty Column09
ColumnWidth = 1305.071
EndProperty
BeginProperty Column10
ColumnWidth = 794.835
EndProperty
BeginProperty Column11
ColumnWidth = 764.787
EndProperty
BeginProperty Column12
ColumnWidth = 1725.165
EndProperty
BeginProperty Column13
ColumnWidth = 2624.882
EndProperty
EndProperty
End
Begin VB.Label lbl_bookid
BackStyle = 0 'Transparent
Caption = "书号"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 480
TabIndex = 51
Top = 2640
Width = 735
End
Begin VB.Label lbl_edition
BackStyle = 0 'Transparent
Caption = "版次"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 3720
TabIndex = 50
Top = 2640
Width = 975
End
Begin VB.Label lbl_Pages
BackStyle = 0 'Transparent
Caption = "页数"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 480
TabIndex = 49
Top = 3000
Width = 615
End
Begin VB.Label lbl_subject
BackStyle = 0 'Transparent
Caption = "类型"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 3720
TabIndex = 48
Top = 3000
Width = 975
End
Begin VB.Label lbl_price
BackStyle = 0 'Transparent
Caption = "定价"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 480
TabIndex = 47
Top = 3360
Width = 855
End
Begin VB.Label lbl_isbn
BackStyle = 0 'Transparent
Caption = "ISBN 号"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 3720
TabIndex = 46
Top = 3360
Width = 1095
End
Begin VB.Label lbl_pub
BackStyle = 0 'Transparent
Caption = "出版社"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 360
TabIndex = 45
Top = 600
Width = 1095
End
Begin VB.Label lbl_title
BackStyle = 0 'Transparent
Caption = "书名"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 360
TabIndex = 44
Top = 240
Width = 855
End
End
Begin VB.Image Image1
Height = 480
Left = 0
Top = 0
Width = 600
End
Begin VB.Label Label7
BackColor = &H00C8D0D4&
BackStyle = 0 'Transparent
Caption = $"frmBooks.frx":3787
Height = 495
Left = 600
TabIndex = 52
Top = 30
Width = 7215
End
End
Attribute VB_Name = "frmBooks"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Bookrecord As ADODB.Recordset
Dim Bookconnection As ADODB.Connection
Dim str As String
Dim slct As String
Dim saveflag As Boolean
'文本框数据核实函数
Private Function cheak() As Boolean
'定义变量
Dim status As Boolean
status = False
If txt_title.Text = "" Then
MsgBox ("请输入书名."), vbInformation, "提示信息"
ElseIf txt_publication.Text = "" Then
MsgBox ("请输入出版社."), vbInformation, "提示信息"
ElseIf txt_author1.Text = "" Then
MsgBox ("请输入作者一名字."), vbInformation, "提示信息"
ElseIf txt_bookid.Text = "" Then
MsgBox ("请输入书号以便区分其他的书"), vbInformation, "提示信息"
ElseIf txt_pages.Text = "" Then
MsgBox ("请输入书的页数."), vbInformation, "提示信息"
ElseIf txt_price.Text = "" Then
MsgBox ("请输入书的定价."), vbInformation, "提示信息"
ElseIf txt_totalno.Text = "" Then
MsgBox ("请输入书的总数."), vbInformation, "提示信息"
ElseIf txt_issue.Text = "" Then
MsgBox ("请输入书借出的本数."), vbInformation, "提示信息"
ElseIf txt_avano.Text = "" Then
MsgBox ("请输入书现存本数."), vbInformation, "提示信息"
ElseIf txt_edition = "" Then
MsgBox ("请输入书的详细版次."), vbInformation, "提示信息"
ElseIf txt_subject.Text = "" Then
MsgBox ("请输入书相关的类型."), vbInformation, "提示信息"
ElseIf txt_isbn.Text = "" Then
MsgBox ("请输入书的ISBN号."), vbInformation, "提示信息"
ElseIf IsNumeric(txt_author1.Text) Then
MsgBox ("输入有效的作者名."), vbInformation, "错误信息"
ElseIf IsNumeric(txt_author2.Text) Then
MsgBox ("输入有效的作者名."), vbInformation, "错误信息"
ElseIf IsNumeric(txt_author3.Text) Then
MsgBox ("输入有效的作者名."), vbInformation, "错误信息"
ElseIf Not IsNumeric(txt_bookid.Text) Then
MsgBox ("输入书号必须是数字."), vbInformation, "错误信息"
ElseIf Not IsNumeric(txt_pages.Text) Then
MsgBox ("输入页数必须是数字."), vbInformation, "错误信息"
ElseIf Not IsNumeric(txt_price.Text) Then
MsgBox ("定价必须是货币型的,输入有效的价格."), vbInformation, "错误信息"
ElseIf IsNumeric(txt_edition.Text) Then
MsgBox ("输入有效的版次数据."), vbInformation, "错误信息"
ElseIf IsNumeric(txt_subject.Text) Then
MsgBox ("类型名不能数字."), vbInformation, "错误信息"
ElseIf Not IsNumeric(txt_totalno.Text) Then
MsgBox ("书的总数必须是数字."), vbInformation, "错误信息"
ElseIf Not IsNumeric(txt_avano.Text) Then
MsgBox ("书现存的本数必须是数字."), vbInformation, "错误信息"
ElseIf Not IsNumeric(txt_issue.Text) Then
MsgBox ("书借出的本数必须是数字."), vbInformation, "错误信息"
ElseIf Not (CDbl(txt_totalno.Text) = (CDbl(txt_avano.Text) + CDbl(txt_issue.Text))) Then
MsgBox ("书的数目不正确."), vbInformation, "错误信息"
Else
status = True
End If
cheak = status
End Function
'subroutin for setting text box mode
Private Sub setlock(val As Boolean)
txt_title.Locked = val
txt_publication.Locked = val
txt_author1.Locked = val
txt_author2.Locked = val
txt_author3.Locked = val
txt_price.Locked = val
txt_pages.Locked = val
txt_subject.Locked = val
txt_isbn.Locked = val
txt_totalno.Locked = val
txt_edition.Locked = val
txt_bookid.Locked = val
txt_issue.Locked = val
txt_avano.Locked = val
End Sub
'清空文本框
Private Sub clear()
txt_title.Text = ""
txt_publication.Text = ""
txt_author1.Text = ""
txt_author2.Text = ""
txt_author3.Text = ""
txt_price.Text = ""
txt_subject.Text = ""
txt_isbn.Text = ""
txt_pages.Text = ""
txt_totalno.Text = ""
txt_avano.Text = ""
txt_issue.Text = ""
txt_edition.Text = ""
txt_bookid.Text = ""
'set focus to fiRSt textbox
txt_title.SetFocus
End Sub
Private Sub showdata()
If Bookrecord.EOF = False And Bookrecord.BOF = False Then
txt_author1.Text = Bookrecord.Fields(0)
txt_author2.Text = Bookrecord.Fields(1)
txt_author3.Text = Bookrecord.Fields(2)
txt_avano.Text = Bookrecord.Fields(3)
txt_bookid.Text = Bookrecord.Fields(4)
txt_edition.Text = Bookrecord.Fields(5)
txt_isbn.Text = Bookrecord.Fields(6)
txt_issue.Text = Bookrecord.Fields(7)
txt_pages.Text = Bookrecord.Fields(8)
txt_price.Text = Bookrecord.Fields(9)
txt_publication.Text = Bookrecord.Fields(10)
txt_subject.Text = Bookrecord.Fields(11)
txt_title.Text = Bookrecord.Fields(12)
txt_totalno.Text = Bookrecord.Fields(13)
End If
Call locate
End Sub
Private Sub setbutton(val As Boolean)
cmdFirst.Enabled = val
cmdPrevious.Enabled = val
cmdNext.Enabled = val
cmdLast.Enabled = val
cmd_delete.Enabled = val
cmd_edit.Enabled = val
cmd_new.Enabled = val
cmd_save.Enabled = Not val
cmdcancel.Enabled = Not val
End Sub
Private Sub cmd_close_Click()
Unload Me
End Sub
Private Sub cmdCancel_Click()
On erro GoTo cancelerr
'disablink control
setlock (True)
If Bookrecord.BOF And Bookrecord.EOF Then
GoTo newproc
Else
Bookrecord.MoveFirst
Call showdata
End If
newproc:
txt_title.SetFocus
Call setbutton(True)
Exit Sub
cancelerr:
MsgBox Err.Description
End Sub
Private Sub cmdFirst_Click()
On Error GoTo GoFirstError
Bookrecord.MoveFirst
'显示当前数据信息
Call showdata
Exit Sub
GoFirstError:
MsgBox Err.Description
End Sub
Private Sub cmdLast_Click()
On Error GoTo GoLastError
'lblStatus.Caption = " Move >>"
Bookrecord.MoveLast
'显示当前数据记录
Call showdata
Exit Sub
GoLastError:
MsgBox Err.Description
End Sub
Private Sub cmdNext_Click()
On Error GoTo GoNextError
'lblStatus.Caption = " Move >"
If Not Bookrecord.EOF Then Bookrecord.MoveNext
If Bookrecord.EOF And Bookrecord.RecordCount > 0 Then
Beep
Bookrecord.MoveLast
End If
Call showdata
Exit Sub
GoNextError:
MsgBox Err.Description
End Sub
Private Sub cmdPrevious_Click()
On Error GoTo GoPrevError
' lblStatus.Caption = " < Move"
If Not Bookrecord.BOF Then Bookrecord.MovePrevious
If Bookrecord.BOF And Bookrecord.RecordCount > 0 Then
Beep
Bookrecord.MovePrevious
End If
Call showdata
Exit Sub
GoPrevError:
If Err.Number = 3021 Then
MsgBox ("这是第一条记录."), vbInformation, "第一条记录"
Bookrecord.MoveNext
ElseIf Err.Number <> 0 Then
MsgBox Err.Number & Err.Description
End If
End Sub
Private Sub Form_Load()
On Error GoTo errlable
If (view = 1) Then
Me.Top = 50
Me.Left = 50
ElseIf (view = 2) Then
Me.Top = 700
Me.Left = (Screen.Width - Me.Width) / 2
End If
Set Bookconnection = New ADODB.Connection
Bookconnection.CursorLocation = adUseClient
'Image1.Picture = mdi_start.ImageList1.ListImages(1).Picture
Set Bookrecord = New ADODB.Recordset
Bookconnection.ConnectionString = "DSN=library;UID=sa;PWD=;"
Bookconnection.Open
slct = "select Author1,Author2,Author3,Avano,Bookid,Edition,ISBNNumber,Issno,Pages,Price,Publication,Subject,Title,Totalno from Book Order by Bookid"
Set Bookrecord = New ADODB.Recordset
'Set bookrecord = exesql(slct)
Bookrecord.Open slct, Bookconnection, adOpenStatic, adLockOptimistic
'显示当前记录
Call showdata
Set Datagrid.DataSource = Bookrecord
Datagrid.ReBind
cmd_save.Enabled = False
cmdcancel.Enabled = False
Exit Sub
errlable:
MsgBox Err.Number & Err.Description
End Sub
Private Sub locate()
lbl_total.Caption = Bookrecord.RecordCount
lbl_rec.Caption = Bookrecord.AbsolutePosition
End Sub
Private Sub cmd_delete_Click()
On erro GoTo lable
Beep
If MsgBox("执行命令将删除当前数据记录,你确认你想删除数据?", vbYesNo + vbExclamation, "删除确认") = vbYes Then
str = "DELETE FROM Book WHERE "
str = str & "Bookid = "
str = str & CDbl(txt_bookid.Text)
' Set Bookrecord = exesql(str)
Bookconnection.Execute str
Bookrecord.Requery
MsgBox "删除记录成功.", vbinformayion, "删除"
If Bookrecord.BOF And Bookrecord.EOF Then
Call clear
MsgBox ("之前的记录已经是最后一条记录,现在已经没有记录了."), vbInformation, "最后记录"
cmd_delete.Enabled = False
Else
Bookrecord.MoveNext
If Bookrecord.EOF Then
Bookrecord.MoveLast
End If
Call showdata
End If
End If
Exit Sub
lable:
MsgBox Err.Number & Err.Description
End Sub
Private Sub cmd_edit_Click()
On Error GoTo lable
Call setlock(False)
saveflag = False
Call setbutton(False)
txt_title.SetFocus
Exit Sub
lable:
MsgBox Err.Description
End Sub
Private Sub cmd_new_Click()
On Error GoTo lable
Call setlock(False)
Call clear
saveflag = True
'lblStatus.Caption = " Add new record."
Call setbutton(False)
Exit Sub
lable:
MsgBox Err.Description
End Sub
Private Sub cmd_save_Click()
On Error GoTo lable
Call setlock(False)
If cheak = True Then
If txt_author2.Text = "" Then
txt_author2.Text = "None"
End If
If txt_author3.Text = "" Then
txt_author3.Text = "None"
End If
'保存记录
If saveflag = True Then
str = "INSERT INTO Book"
str = str & "(Author1, Author2, Author3, Avano, Bookid, Edition, ISBNNumber, Issno, Pages, Price, Publication, Subject, Title, Totalno) "
str = str & "VALUES('" & Trim(txt_author1.Text) & "', "
str = str & "'" & Trim(txt_author2.Text) & "', "
str = str & "'" & Trim(txt_author3.Text) & "', "
str = str & CDbl(txt_avano.Text) & ", "
str = str & CDbl(txt_bookid.Text) & ", "
str = str & "'" & Trim(txt_edition.Text) & "', "
str = str & "'" & Trim(txt_isbn.Text) & "', "
str = str & CDbl(txt_issue.Text) & ", "
str = str & CDbl(txt_pages.Text) & ", "
str = str & CDbl(txt_price.Text) & ", "
str = str & "'" & Trim(txt_publication.Text) & "', "
str = str & "'" & Trim(txt_subject.Text) & "', "
str = str & "'" & Trim(txt_title.Text) & "', "
str = str & CDbl(txt_totalno.Text) & ")"
Bookconnection.Execute str
'Set bookrecord = exesql(str)
Else '编辑记录
str = "UPDATE Book SET "
str = str & "Author1='" & Trim(txt_author1.Text) & "',"
str = str & "Author2='" & Trim(txt_author2.Text) & "',"
str = str & "Author3='" & Trim(txt_author3.Text) & "',"
str = str & "Avano=" & CDbl(txt_avano.Text) & ","
str = str & "Bookid=" & CDbl(txt_bookid.Text) & ","
str = str & "Edition='" & Trim(txt_edition.Text) & "',"
str = str & "ISBNNumber='" & Trim(txt_isbn.Text) & "',"
str = str & "Issno=" & CDbl(txt_issue.Text) & ","
str = str & "Pages=" & CDbl(txt_pages.Text) & ","
str = str & "Price=" & CDbl(txt_price.Text) & ","
str = str & "Publication='" & Trim(txt_publication.Text) & "',"
str = str & "Subject='" & Trim(txt_subject.Text) & "',"
str = str & "Title='" & Trim(txt_title.Text) & "',"
str = str & "Totalno=" & CDbl(txt_totalno.Text)
str = str & " WHERE Bookid=" & CDbl(txt_bookid.Text)
Bookconnection.Execute str
'Set bookrecord = exesql(str)
End If
Call setlock(True)
Bookrecord.Requery
Bookrecord.MoveLast
Call showdata
'lblStatus.Caption = " New record Saved."
MsgBox ("成功保存记录."), vbInformation, "保存记录"
Call setbutton(True)
End If
Exit Sub
lable:
If Err.Number = -2147467259 Then
MsgBox ("书号已经存在,请输入另外ID."), vbCritical, "ID重复"
txt_bookid.SetFocus
ElseIf Err.Number <> 0 Then
MsgBox Err.Number & Err.Description & Err.Source
End If
End Sub
Private Sub SSTab1_Click(PreviousTab As Integer)
Call locate
Call showdata
End Sub