📄 admin_bookmanage.vb
字号:
Imports System.Data
'引入数据库操作类命名空间
Imports System.Data.OleDb
'引入ADO.NET操作命名空间
Public Class win_bookmanage
Inherits System.Windows.Forms.Form
Dim sqlstr As String, sqlstr2 As String = "SELECT * FROM bookinfo" 'SQL语句标记
Dim objDS, objDS2 As DataSet '数据在内存中的缓存
Dim j As Integer, bookid As Integer, can As Boolean
Dim bookname, author, classify, bookconcern, amount As String
Dim isDESC As String = "DESC", forall As String = "id"
#Region " Windows 窗体设计器生成的代码 "
Public Sub New()
MyBase.New()
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化
End Sub
'窗体重写 dispose 以清理组件列表。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Windows 窗体设计器所必需的
Private components As System.ComponentModel.IContainer
'注意: 以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器修改此过程。
'不要使用代码编辑器修改它。
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents GroupBox4 As System.Windows.Forms.GroupBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents Label12 As System.Windows.Forms.Label
Friend WithEvents Label13 As System.Windows.Forms.Label
Friend WithEvents tball As System.Windows.Forms.ComboBox
Friend WithEvents tbkeyword As System.Windows.Forms.TextBox
Friend WithEvents cbby As System.Windows.Forms.ComboBox
Friend WithEvents tbbookname As System.Windows.Forms.TextBox
Friend WithEvents tbauthor As System.Windows.Forms.TextBox
Friend WithEvents cbclassify As System.Windows.Forms.ComboBox
Friend WithEvents tbbookconcern As System.Windows.Forms.TextBox
Friend WithEvents tbamount As System.Windows.Forms.TextBox
Friend WithEvents dtpmoditime As System.Windows.Forms.DateTimePicker
Friend WithEvents Laberemain As System.Windows.Forms.Label
Friend WithEvents Labelloandegree As System.Windows.Forms.Label
Friend WithEvents btOK As System.Windows.Forms.Button
Friend WithEvents LabelID As System.Windows.Forms.Label
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents Button4 As System.Windows.Forms.Button
Friend WithEvents rbyes As System.Windows.Forms.RadioButton
Friend WithEvents rbno As System.Windows.Forms.RadioButton
Friend WithEvents islock As System.Windows.Forms.CheckBox
Friend WithEvents lblistbooks As System.Windows.Forms.ListBox
Friend WithEvents GroupBox5 As System.Windows.Forms.GroupBox
Friend WithEvents Label14 As System.Windows.Forms.Label
Friend WithEvents cbDESC As System.Windows.Forms.ComboBox
Friend WithEvents btadd As System.Windows.Forms.Button
Friend WithEvents btreset As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(win_bookmanage))
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.GroupBox5 = New System.Windows.Forms.GroupBox
Me.Label14 = New System.Windows.Forms.Label
Me.cbDESC = New System.Windows.Forms.ComboBox
Me.tball = New System.Windows.Forms.ComboBox
Me.Label1 = New System.Windows.Forms.Label
Me.GroupBox4 = New System.Windows.Forms.GroupBox
Me.btreset = New System.Windows.Forms.Button
Me.btadd = New System.Windows.Forms.Button
Me.islock = New System.Windows.Forms.CheckBox
Me.Button4 = New System.Windows.Forms.Button
Me.Button3 = New System.Windows.Forms.Button
Me.dtpmoditime = New System.Windows.Forms.DateTimePicker
Me.btOK = New System.Windows.Forms.Button
Me.rbno = New System.Windows.Forms.RadioButton
Me.rbyes = New System.Windows.Forms.RadioButton
Me.Labelloandegree = New System.Windows.Forms.Label
Me.Laberemain = New System.Windows.Forms.Label
Me.tbamount = New System.Windows.Forms.TextBox
Me.tbbookconcern = New System.Windows.Forms.TextBox
Me.cbclassify = New System.Windows.Forms.ComboBox
Me.tbauthor = New System.Windows.Forms.TextBox
Me.tbbookname = New System.Windows.Forms.TextBox
Me.LabelID = New System.Windows.Forms.Label
Me.Label13 = New System.Windows.Forms.Label
Me.Label12 = New System.Windows.Forms.Label
Me.Label11 = New System.Windows.Forms.Label
Me.Label10 = New System.Windows.Forms.Label
Me.Label9 = New System.Windows.Forms.Label
Me.Label8 = New System.Windows.Forms.Label
Me.Label7 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.lblistbooks = New System.Windows.Forms.ListBox
Me.GroupBox3 = New System.Windows.Forms.GroupBox
Me.cbby = New System.Windows.Forms.ComboBox
Me.Label3 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.tbkeyword = New System.Windows.Forms.TextBox
Me.Button1 = New System.Windows.Forms.Button
Me.GroupBox1.SuspendLayout()
Me.GroupBox5.SuspendLayout()
Me.GroupBox4.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.GroupBox3.SuspendLayout()
Me.SuspendLayout()
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.GroupBox5)
Me.GroupBox1.Controls.Add(Me.GroupBox4)
Me.GroupBox1.Controls.Add(Me.GroupBox2)
Me.GroupBox1.Controls.Add(Me.GroupBox3)
Me.GroupBox1.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.GroupBox1.Location = New System.Drawing.Point(4, 0)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(520, 408)
Me.GroupBox1.TabIndex = 0
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "图书信息管理"
'
'GroupBox5
'
Me.GroupBox5.Controls.Add(Me.Label14)
Me.GroupBox5.Controls.Add(Me.cbDESC)
Me.GroupBox5.Controls.Add(Me.tball)
Me.GroupBox5.Controls.Add(Me.Label1)
Me.GroupBox5.Location = New System.Drawing.Point(208, 68)
Me.GroupBox5.Name = "GroupBox5"
Me.GroupBox5.Size = New System.Drawing.Size(304, 56)
Me.GroupBox5.TabIndex = 5
Me.GroupBox5.TabStop = False
Me.GroupBox5.Text = "自定义方式"
'
'Label14
'
Me.Label14.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.Label14.Location = New System.Drawing.Point(184, 24)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(48, 24)
Me.Label14.TabIndex = 8
Me.Label14.Text = "序式:"
Me.Label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'cbDESC
'
Me.cbDESC.Items.AddRange(New Object() {"正序", "倒序"})
Me.cbDESC.Location = New System.Drawing.Point(232, 24)
Me.cbDESC.Name = "cbDESC"
Me.cbDESC.Size = New System.Drawing.Size(64, 20)
Me.cbDESC.TabIndex = 19
Me.cbDESC.Text = "正序"
'
'tball
'
Me.tball.Items.AddRange(New Object() {"编号", "书名", "分类", "作者", "出版社", "进馆时间", "总数量", "剩余数量", "借阅次数", "所有隐藏的"})
Me.tball.Location = New System.Drawing.Point(80, 24)
Me.tball.Name = "tball"
Me.tball.Size = New System.Drawing.Size(96, 20)
Me.tball.TabIndex = 18
Me.tball.Text = "编号"
'
'Label1
'
Me.Label1.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.Label1.Location = New System.Drawing.Point(8, 24)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(72, 24)
Me.Label1.TabIndex = 0
Me.Label1.Text = "排序方式:"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'GroupBox4
'
Me.GroupBox4.Controls.Add(Me.btreset)
Me.GroupBox4.Controls.Add(Me.btadd)
Me.GroupBox4.Controls.Add(Me.islock)
Me.GroupBox4.Controls.Add(Me.Button4)
Me.GroupBox4.Controls.Add(Me.Button3)
Me.GroupBox4.Controls.Add(Me.dtpmoditime)
Me.GroupBox4.Controls.Add(Me.btOK)
Me.GroupBox4.Controls.Add(Me.rbno)
Me.GroupBox4.Controls.Add(Me.rbyes)
Me.GroupBox4.Controls.Add(Me.Labelloandegree)
Me.GroupBox4.Controls.Add(Me.Laberemain)
Me.GroupBox4.Controls.Add(Me.tbamount)
Me.GroupBox4.Controls.Add(Me.tbbookconcern)
Me.GroupBox4.Controls.Add(Me.cbclassify)
Me.GroupBox4.Controls.Add(Me.tbauthor)
Me.GroupBox4.Controls.Add(Me.tbbookname)
Me.GroupBox4.Controls.Add(Me.LabelID)
Me.GroupBox4.Controls.Add(Me.Label13)
Me.GroupBox4.Controls.Add(Me.Label12)
Me.GroupBox4.Controls.Add(Me.Label11)
Me.GroupBox4.Controls.Add(Me.Label10)
Me.GroupBox4.Controls.Add(Me.Label9)
Me.GroupBox4.Controls.Add(Me.Label8)
Me.GroupBox4.Controls.Add(Me.Label7)
Me.GroupBox4.Controls.Add(Me.Label6)
Me.GroupBox4.Controls.Add(Me.Label5)
Me.GroupBox4.Controls.Add(Me.Label4)
Me.GroupBox4.Location = New System.Drawing.Point(208, 128)
Me.GroupBox4.Name = "GroupBox4"
Me.GroupBox4.Size = New System.Drawing.Size(304, 272)
Me.GroupBox4.TabIndex = 4
Me.GroupBox4.TabStop = False
Me.GroupBox4.Text = "图书信息"
'
'btreset
'
Me.btreset.ForeColor = System.Drawing.SystemColors.ControlText
Me.btreset.Location = New System.Drawing.Point(184, 240)
Me.btreset.Name = "btreset"
Me.btreset.Size = New System.Drawing.Size(48, 24)
Me.btreset.TabIndex = 13
Me.btreset.Text = "重置"
'
'btadd
'
Me.btadd.ForeColor = System.Drawing.SystemColors.ControlText
Me.btadd.Location = New System.Drawing.Point(16, 240)
Me.btadd.Name = "btadd"
Me.btadd.Size = New System.Drawing.Size(48, 24)
Me.btadd.TabIndex = 10
Me.btadd.Text = "添加"
'
'islock
'
Me.islock.Checked = True
Me.islock.CheckState = System.Windows.Forms.CheckState.Checked
Me.islock.ForeColor = System.Drawing.SystemColors.ControlText
Me.islock.Location = New System.Drawing.Point(240, 208)
Me.islock.Name = "islock"
Me.islock.Size = New System.Drawing.Size(48, 24)
Me.islock.TabIndex = 9
Me.islock.Text = "锁定"
'
'Button4
'
Me.Button4.ForeColor = System.Drawing.SystemColors.ControlText
Me.Button4.Location = New System.Drawing.Point(72, 240)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(48, 24)
Me.Button4.TabIndex = 11
Me.Button4.Text = "删除"
'
'Button3
'
Me.Button3.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.Button3.ForeColor = System.Drawing.SystemColors.ControlText
Me.Button3.Location = New System.Drawing.Point(248, 240)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(48, 24)
Me.Button3.TabIndex = 14
Me.Button3.Text = "关闭"
'
'dtpmoditime
'
Me.dtpmoditime.CalendarMonthBackground = System.Drawing.SystemColors.ControlDark
Me.dtpmoditime.CalendarTitleBackColor = System.Drawing.SystemColors.ControlDarkDark
Me.dtpmoditime.CalendarTitleForeColor = System.Drawing.SystemColors.ControlDark
Me.dtpmoditime.CustomFormat = ""
Me.dtpmoditime.Format = System.Windows.Forms.DateTimePickerFormat.Custom
Me.dtpmoditime.Location = New System.Drawing.Point(88, 136)
Me.dtpmoditime.Name = "dtpmoditime"
Me.dtpmoditime.Size = New System.Drawing.Size(92, 21)
Me.dtpmoditime.TabIndex = 5
Me.dtpmoditime.Value = New Date(2004, 10, 28, 22, 9, 2, 0)
'
'btOK
'
Me.btOK.ForeColor = System.Drawing.SystemColors.ControlText
Me.btOK.Location = New System.Drawing.Point(128, 240)
Me.btOK.Name = "btOK"
Me.btOK.Size = New System.Drawing.Size(48, 24)
Me.btOK.TabIndex = 12
Me.btOK.Text = "修改"
'
'rbno
'
Me.rbno.ForeColor = System.Drawing.SystemColors.ControlText
Me.rbno.Location = New System.Drawing.Point(136, 208)
Me.rbno.Name = "rbno"
Me.rbno.Size = New System.Drawing.Size(40, 24)
Me.rbno.TabIndex = 8
Me.rbno.Text = "否"
'
'rbyes
'
Me.rbyes.Checked = True
Me.rbyes.ForeColor = System.Drawing.SystemColors.ControlText
Me.rbyes.Location = New System.Drawing.Point(96, 208)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -