📄 admin_bookmanage.vb
字号:
Me.rbyes.Name = "rbyes"
Me.rbyes.Size = New System.Drawing.Size(40, 24)
Me.rbyes.TabIndex = 7
Me.rbyes.TabStop = True
Me.rbyes.Text = "是"
'
'Labelloandegree
'
Me.Labelloandegree.ForeColor = System.Drawing.SystemColors.ControlText
Me.Labelloandegree.Location = New System.Drawing.Point(224, 184)
Me.Labelloandegree.Name = "Labelloandegree"
Me.Labelloandegree.Size = New System.Drawing.Size(56, 24)
Me.Labelloandegree.TabIndex = 18
Me.Labelloandegree.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'Laberemain
'
Me.Laberemain.ForeColor = System.Drawing.SystemColors.ControlText
Me.Laberemain.Location = New System.Drawing.Point(88, 184)
Me.Laberemain.Name = "Laberemain"
Me.Laberemain.Size = New System.Drawing.Size(56, 24)
Me.Laberemain.TabIndex = 17
Me.Laberemain.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'tbamount
'
Me.tbamount.Location = New System.Drawing.Point(88, 160)
Me.tbamount.MaxLength = 5
Me.tbamount.Name = "tbamount"
Me.tbamount.Size = New System.Drawing.Size(48, 21)
Me.tbamount.TabIndex = 6
Me.tbamount.Text = ""
'
'tbbookconcern
'
Me.tbbookconcern.Location = New System.Drawing.Point(88, 112)
Me.tbbookconcern.MaxLength = 25
Me.tbbookconcern.Name = "tbbookconcern"
Me.tbbookconcern.Size = New System.Drawing.Size(152, 21)
Me.tbbookconcern.TabIndex = 4
Me.tbbookconcern.Text = ""
'
'cbclassify
'
Me.cbclassify.Location = New System.Drawing.Point(88, 88)
Me.cbclassify.Name = "cbclassify"
Me.cbclassify.Size = New System.Drawing.Size(88, 20)
Me.cbclassify.TabIndex = 3
'
'tbauthor
'
Me.tbauthor.Location = New System.Drawing.Point(88, 64)
Me.tbauthor.MaxLength = 20
Me.tbauthor.Name = "tbauthor"
Me.tbauthor.Size = New System.Drawing.Size(88, 21)
Me.tbauthor.TabIndex = 2
Me.tbauthor.Text = ""
'
'tbbookname
'
Me.tbbookname.Location = New System.Drawing.Point(88, 40)
Me.tbbookname.MaxLength = 20
Me.tbbookname.Name = "tbbookname"
Me.tbbookname.Size = New System.Drawing.Size(112, 21)
Me.tbbookname.TabIndex = 1
Me.tbbookname.Text = ""
'
'LabelID
'
Me.LabelID.ForeColor = System.Drawing.SystemColors.ControlText
Me.LabelID.Location = New System.Drawing.Point(88, 16)
Me.LabelID.Name = "LabelID"
Me.LabelID.Size = New System.Drawing.Size(56, 24)
Me.LabelID.TabIndex = 10
Me.LabelID.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'Label13
'
Me.Label13.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.Label13.Location = New System.Drawing.Point(152, 184)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(72, 24)
Me.Label13.TabIndex = 9
Me.Label13.Text = "借阅次数:"
Me.Label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label12
'
Me.Label12.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.Label12.Location = New System.Drawing.Point(16, 208)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(72, 24)
Me.Label12.TabIndex = 8
Me.Label12.Text = "是否显示:"
Me.Label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label11
'
Me.Label11.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.Label11.Location = New System.Drawing.Point(16, 184)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(72, 24)
Me.Label11.TabIndex = 7
Me.Label11.Text = "剩余数量:"
Me.Label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label10
'
Me.Label10.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.Label10.Location = New System.Drawing.Point(16, 160)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(72, 24)
Me.Label10.TabIndex = 6
Me.Label10.Text = "总数量:"
Me.Label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label9
'
Me.Label9.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.Label9.Location = New System.Drawing.Point(16, 112)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(72, 24)
Me.Label9.TabIndex = 5
Me.Label9.Text = "出版社:"
Me.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label8
'
Me.Label8.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.Label8.Location = New System.Drawing.Point(16, 136)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(72, 24)
Me.Label8.TabIndex = 4
Me.Label8.Text = "添加时间:"
Me.Label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label7
'
Me.Label7.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.Label7.Location = New System.Drawing.Point(16, 88)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(72, 24)
Me.Label7.TabIndex = 3
Me.Label7.Text = "分类:"
Me.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label6
'
Me.Label6.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.Label6.Location = New System.Drawing.Point(16, 64)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(72, 24)
Me.Label6.TabIndex = 2
Me.Label6.Text = "作者:"
Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label5
'
Me.Label5.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.Label5.Location = New System.Drawing.Point(16, 40)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(72, 24)
Me.Label5.TabIndex = 1
Me.Label5.Text = "书名:"
Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label4
'
Me.Label4.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.Label4.Location = New System.Drawing.Point(16, 16)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(72, 24)
Me.Label4.TabIndex = 0
Me.Label4.Text = "自动编号:"
Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.lblistbooks)
Me.GroupBox2.Location = New System.Drawing.Point(8, 16)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(192, 384)
Me.GroupBox2.TabIndex = 0
Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "图书浏览"
'
'lblistbooks
'
Me.lblistbooks.ItemHeight = 12
Me.lblistbooks.Location = New System.Drawing.Point(8, 14)
Me.lblistbooks.Name = "lblistbooks"
Me.lblistbooks.Size = New System.Drawing.Size(176, 364)
Me.lblistbooks.TabIndex = 20
'
'GroupBox3
'
Me.GroupBox3.Controls.Add(Me.cbby)
Me.GroupBox3.Controls.Add(Me.Label3)
Me.GroupBox3.Controls.Add(Me.Label2)
Me.GroupBox3.Controls.Add(Me.tbkeyword)
Me.GroupBox3.Controls.Add(Me.Button1)
Me.GroupBox3.Location = New System.Drawing.Point(208, 16)
Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.Size = New System.Drawing.Size(304, 48)
Me.GroupBox3.TabIndex = 3
Me.GroupBox3.TabStop = False
Me.GroupBox3.Text = "系统方式"
'
'cbby
'
Me.cbby.Items.AddRange(New Object() {"编号", "书名", "分类", "作者", "出版社", "总数量", "剩余数量", "借阅次数"})
Me.cbby.Location = New System.Drawing.Point(184, 16)
Me.cbby.Name = "cbby"
Me.cbby.Size = New System.Drawing.Size(56, 20)
Me.cbby.TabIndex = 16
Me.cbby.Text = "编号"
'
'Label3
'
Me.Label3.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.Label3.Location = New System.Drawing.Point(136, 16)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(48, 23)
Me.Label3.TabIndex = 5
Me.Label3.Text = "根据:"
Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label2
'
Me.Label2.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.Label2.Location = New System.Drawing.Point(8, 16)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(56, 24)
Me.Label2.TabIndex = 4
Me.Label2.Text = "关键词:"
Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'tbkeyword
'
Me.tbkeyword.Location = New System.Drawing.Point(64, 16)
Me.tbkeyword.Name = "tbkeyword"
Me.tbkeyword.Size = New System.Drawing.Size(72, 21)
Me.tbkeyword.TabIndex = 15
Me.tbkeyword.Text = ""
'
'Button1
'
Me.Button1.ForeColor = System.Drawing.SystemColors.ControlText
Me.Button1.Location = New System.Drawing.Point(248, 16)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(48, 24)
Me.Button1.TabIndex = 17
Me.Button1.Text = "查询"
'
'win_bookmanage
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.CancelButton = Me.Button3
Me.ClientSize = New System.Drawing.Size(528, 413)
Me.Controls.Add(Me.GroupBox1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.MaximizeBox = False
Me.MaximumSize = New System.Drawing.Size(536, 440)
Me.MinimumSize = New System.Drawing.Size(536, 440)
Me.Name = "win_bookmanage"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "图书馆管理系统--图书管理"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox5.ResumeLayout(False)
Me.GroupBox4.ResumeLayout(False)
Me.GroupBox2.ResumeLayout(False)
Me.GroupBox3.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Public Function LoadData()
lblistbooks.Items.Clear()
Try
For j = 0 To objDS.Tables(0).Rows.Count - 1
lblistbooks.Items.Add(objDS.Tables(0).Rows(j)("name").ToString & " ," & objDS.Tables(0).Rows(j)("id").ToString)
Next
Catch
MsgBox("读取数据错误。", MsgBoxStyle.Information + MsgBoxStyle.OKOnly, "错误")
End Try
End Function
Private Sub win_bookmanage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
sqlstr = "SELECT * FROM bookinfo"
objDS = GetData(sqlstr)
LoadData()
sqlstr = "SELECT * FROM classify"
objDS = GetData(sqlstr)
cbclassify.Items.Add("不详")
For j = 0 To objDS.Tables(0).Rows.Count - 1
cbclassify.Items.Add(objDS.Tables(0).Rows(j)("name").ToString)
Next
End Sub
Private Sub lblistbooks_SelectedValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblistbooks.SelectedValueChanged
Dim splitbook() As String
islock.Checked = True
splitbook = Split(lblistbooks.SelectedItem.ToString, ",")
bookid = splitbook(1)
sqlstr = "select * from bookinfo where id=" & bookid & ""
objDS = GetData(sqlstr)
LabelID.Text = objDS.Tables(0).Rows(0)("id").ToString
tbbookname.Text = objDS.Tables(0).Rows(0)("name").ToString
tbauthor.Text = objDS.Tables(0).Rows(0)("author").ToString
cbclassify.SelectedIndex = objDS.Tables(0).Rows(0)("classify")
tbauthor.Text = objDS.Tables(0).Rows(0)("author").ToString 'showclassifyname(objDS.Tables(0).Rows(0)("classify").ToString)
tbbookconcern.Text = objDS.Tables(0).Rows(0)("bookconcern").ToString
dtpmoditime.Value = objDS.Tables(0).Rows(0)("addtime")
tbamount.Text = objDS.Tables(0).Rows(0)("amount").ToString
Laberemain.Text = objDS.Tables(0).Rows(0)("remain").ToString
Labelloandegree.Text = objDS.Tables(0).Rows(0)("loandegree").ToString
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -