📄 books.vb
字号:
Imports System.Data.SqlClient
Public Class books
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
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
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents lbl_bookid As System.Windows.Forms.Label
Friend WithEvents lbl_title As System.Windows.Forms.Label
Friend WithEvents lbl_author As System.Windows.Forms.Label
Friend WithEvents lbl_pub As System.Windows.Forms.Label
Friend WithEvents lbl_Price As System.Windows.Forms.Label
Friend WithEvents dg_books As System.Windows.Forms.DataGrid
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents btn_add As System.Windows.Forms.Button
Friend WithEvents btn_remove As System.Windows.Forms.Button
Friend WithEvents btn_close As System.Windows.Forms.Button
Friend WithEvents txt_bookid As System.Windows.Forms.TextBox
Friend WithEvents txt_booktitle As System.Windows.Forms.TextBox
Friend WithEvents txt_author As System.Windows.Forms.TextBox
Friend WithEvents txt_pub As System.Windows.Forms.TextBox
Friend WithEvents txt_price As System.Windows.Forms.TextBox
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents lbl_name As System.Windows.Forms.Label
Friend WithEvents lbl_branch As System.Windows.Forms.Label
Friend WithEvents lbl_year As System.Windows.Forms.Label
Friend WithEvents lbl_pbranch As System.Windows.Forms.Label
Friend WithEvents lbl_pyear As System.Windows.Forms.Label
Friend WithEvents lbl_pname As System.Windows.Forms.Label
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents lbl_help As System.Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.lbl_bookid = New System.Windows.Forms.Label
Me.lbl_title = New System.Windows.Forms.Label
Me.lbl_author = New System.Windows.Forms.Label
Me.lbl_pub = New System.Windows.Forms.Label
Me.lbl_Price = New System.Windows.Forms.Label
Me.txt_bookid = New System.Windows.Forms.TextBox
Me.txt_booktitle = New System.Windows.Forms.TextBox
Me.txt_author = New System.Windows.Forms.TextBox
Me.txt_pub = New System.Windows.Forms.TextBox
Me.txt_price = New System.Windows.Forms.TextBox
Me.dg_books = New System.Windows.Forms.DataGrid
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.btn_add = New System.Windows.Forms.Button
Me.btn_remove = New System.Windows.Forms.Button
Me.btn_close = New System.Windows.Forms.Button
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.lbl_pbranch = New System.Windows.Forms.Label
Me.lbl_pyear = New System.Windows.Forms.Label
Me.lbl_pname = New System.Windows.Forms.Label
Me.lbl_branch = New System.Windows.Forms.Label
Me.lbl_year = New System.Windows.Forms.Label
Me.lbl_name = New System.Windows.Forms.Label
Me.Label1 = New System.Windows.Forms.Label
Me.lbl_help = New System.Windows.Forms.Label
CType(Me.dg_books, System.ComponentModel.ISupportInitialize).BeginInit()
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.SuspendLayout()
'
'lbl_bookid
'
Me.lbl_bookid.AutoSize = True
Me.lbl_bookid.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lbl_bookid.Location = New System.Drawing.Point(16, 37)
Me.lbl_bookid.Name = "lbl_bookid"
Me.lbl_bookid.Size = New System.Drawing.Size(56, 17)
Me.lbl_bookid.TabIndex = 0
Me.lbl_bookid.Text = "BookId : "
'
'lbl_title
'
Me.lbl_title.AutoSize = True
Me.lbl_title.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lbl_title.Location = New System.Drawing.Point(16, 77)
Me.lbl_title.Name = "lbl_title"
Me.lbl_title.Size = New System.Drawing.Size(40, 17)
Me.lbl_title.TabIndex = 1
Me.lbl_title.Text = "Title : "
'
'lbl_author
'
Me.lbl_author.AutoSize = True
Me.lbl_author.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lbl_author.Location = New System.Drawing.Point(16, 117)
Me.lbl_author.Name = "lbl_author"
Me.lbl_author.Size = New System.Drawing.Size(54, 17)
Me.lbl_author.TabIndex = 2
Me.lbl_author.Text = "Author : "
'
'lbl_pub
'
Me.lbl_pub.AutoSize = True
Me.lbl_pub.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lbl_pub.Location = New System.Drawing.Point(16, 157)
Me.lbl_pub.Name = "lbl_pub"
Me.lbl_pub.Size = New System.Drawing.Size(79, 17)
Me.lbl_pub.TabIndex = 3
Me.lbl_pub.Text = "Publication : "
'
'lbl_Price
'
Me.lbl_Price.AutoSize = True
Me.lbl_Price.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lbl_Price.Location = New System.Drawing.Point(16, 197)
Me.lbl_Price.Name = "lbl_Price"
Me.lbl_Price.Size = New System.Drawing.Size(40, 17)
Me.lbl_Price.TabIndex = 4
Me.lbl_Price.Text = "Price :"
'
'txt_bookid
'
Me.txt_bookid.Location = New System.Drawing.Point(104, 37)
Me.txt_bookid.MaxLength = 6
Me.txt_bookid.Name = "txt_bookid"
Me.txt_bookid.Size = New System.Drawing.Size(160, 21)
Me.txt_bookid.TabIndex = 0
Me.txt_bookid.Text = ""
'
'txt_booktitle
'
Me.txt_booktitle.Location = New System.Drawing.Point(104, 77)
Me.txt_booktitle.MaxLength = 50
Me.txt_booktitle.Name = "txt_booktitle"
Me.txt_booktitle.Size = New System.Drawing.Size(160, 21)
Me.txt_booktitle.TabIndex = 1
Me.txt_booktitle.Text = ""
'
'txt_author
'
Me.txt_author.Location = New System.Drawing.Point(104, 117)
Me.txt_author.MaxLength = 30
Me.txt_author.Name = "txt_author"
Me.txt_author.Size = New System.Drawing.Size(160, 21)
Me.txt_author.TabIndex = 2
Me.txt_author.Text = ""
'
'txt_pub
'
Me.txt_pub.Location = New System.Drawing.Point(104, 157)
Me.txt_pub.MaxLength = 50
Me.txt_pub.Name = "txt_pub"
Me.txt_pub.Size = New System.Drawing.Size(160, 21)
Me.txt_pub.TabIndex = 3
Me.txt_pub.Text = ""
'
'txt_price
'
Me.txt_price.Location = New System.Drawing.Point(104, 197)
Me.txt_price.MaxLength = 4
Me.txt_price.Name = "txt_price"
Me.txt_price.Size = New System.Drawing.Size(160, 21)
Me.txt_price.TabIndex = 4
Me.txt_price.Text = ""
'
'dg_books
'
Me.dg_books.AlternatingBackColor = System.Drawing.Color.LightGray
Me.dg_books.BackColor = System.Drawing.Color.Gainsboro
Me.dg_books.BackgroundColor = System.Drawing.Color.Silver
Me.dg_books.CaptionBackColor = System.Drawing.Color.LightSteelBlue
Me.dg_books.CaptionForeColor = System.Drawing.Color.MidnightBlue
Me.dg_books.CaptionText = "Showing All Books"
Me.dg_books.DataMember = ""
Me.dg_books.FlatMode = True
Me.dg_books.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.dg_books.ForeColor = System.Drawing.Color.Black
Me.dg_books.GridLineColor = System.Drawing.Color.White
Me.dg_books.HeaderBackColor = System.Drawing.Color.MidnightBlue
Me.dg_books.HeaderFont = New System.Drawing.Font("Tahoma", 8.0!, System.Drawing.FontStyle.Bold)
Me.dg_books.HeaderForeColor = System.Drawing.Color.White
Me.dg_books.LinkColor = System.Drawing.Color.MidnightBlue
Me.dg_books.Location = New System.Drawing.Point(312, 40)
Me.dg_books.Name = "dg_books"
Me.dg_books.ParentRowsBackColor = System.Drawing.Color.DarkGray
Me.dg_books.ParentRowsForeColor = System.Drawing.Color.Black
Me.dg_books.ReadOnly = True
Me.dg_books.SelectionBackColor = System.Drawing.Color.CadetBlue
Me.dg_books.SelectionForeColor = System.Drawing.Color.White
Me.dg_books.Size = New System.Drawing.Size(472, 424)
Me.dg_books.TabIndex = 8
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.lbl_help)
Me.GroupBox1.Controls.Add(Me.btn_add)
Me.GroupBox1.Controls.Add(Me.btn_remove)
Me.GroupBox1.Controls.Add(Me.lbl_Price)
Me.GroupBox1.Controls.Add(Me.txt_price)
Me.GroupBox1.Controls.Add(Me.lbl_pub)
Me.GroupBox1.Controls.Add(Me.txt_pub)
Me.GroupBox1.Controls.Add(Me.lbl_author)
Me.GroupBox1.Controls.Add(Me.txt_author)
Me.GroupBox1.Controls.Add(Me.lbl_title)
Me.GroupBox1.Controls.Add(Me.txt_booktitle)
Me.GroupBox1.Controls.Add(Me.lbl_bookid)
Me.GroupBox1.Controls.Add(Me.txt_bookid)
Me.GroupBox1.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.GroupBox1.Location = New System.Drawing.Point(16, 32)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(280, 288)
Me.GroupBox1.TabIndex = 0
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Books Details"
'
'btn_add
'
Me.btn_add.Font = New System.Drawing.Font("Tahoma", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_add.ForeColor = System.Drawing.SystemColors.ControlText
Me.btn_add.Location = New System.Drawing.Point(56, 234)
Me.btn_add.Name = "btn_add"
Me.btn_add.Size = New System.Drawing.Size(72, 23)
Me.btn_add.TabIndex = 5
Me.btn_add.Text = "&Add"
'
'btn_remove
'
Me.btn_remove.Font = New System.Drawing.Font("Tahoma", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_remove.ForeColor = System.Drawing.SystemColors.ControlText
Me.btn_remove.Location = New System.Drawing.Point(144, 234)
Me.btn_remove.Name = "btn_remove"
Me.btn_remove.TabIndex = 6
Me.btn_remove.Text = "&Remove"
'
'btn_close
'
Me.btn_close.Font = New System.Drawing.Font("Tahoma", 8.25!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Underline), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_close.ForeColor = System.Drawing.SystemColors.ControlText
Me.btn_close.Location = New System.Drawing.Point(712, 480)
Me.btn_close.Name = "btn_close"
Me.btn_close.Size = New System.Drawing.Size(72, 24)
Me.btn_close.TabIndex = 7
Me.btn_close.Text = "Close"
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.lbl_pbranch)
Me.GroupBox2.Controls.Add(Me.lbl_pyear)
Me.GroupBox2.Controls.Add(Me.lbl_pname)
Me.GroupBox2.Controls.Add(Me.lbl_branch)
Me.GroupBox2.Controls.Add(Me.lbl_year)
Me.GroupBox2.Controls.Add(Me.lbl_name)
Me.GroupBox2.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.GroupBox2.Location = New System.Drawing.Point(16, 328)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(280, 136)
Me.GroupBox2.TabIndex = 9
Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "Issued to"
'
'lbl_pbranch
'
Me.lbl_pbranch.BackColor = System.Drawing.Color.White
Me.lbl_pbranch.Location = New System.Drawing.Point(104, 101)
Me.lbl_pbranch.Name = "lbl_pbranch"
Me.lbl_pbranch.Size = New System.Drawing.Size(160, 17)
Me.lbl_pbranch.TabIndex = 33
'
'lbl_pyear
'
Me.lbl_pyear.BackColor = System.Drawing.Color.White
Me.lbl_pyear.Location = New System.Drawing.Point(104, 66)
Me.lbl_pyear.Name = "lbl_pyear"
Me.lbl_pyear.Size = New System.Drawing.Size(56, 17)
Me.lbl_pyear.TabIndex = 32
'
'lbl_pname
'
Me.lbl_pname.BackColor = System.Drawing.Color.White
Me.lbl_pname.Location = New System.Drawing.Point(104, 29)
Me.lbl_pname.Name = "lbl_pname"
Me.lbl_pname.Size = New System.Drawing.Size(160, 17)
Me.lbl_pname.TabIndex = 31
'
'lbl_branch
'
Me.lbl_branch.AutoSize = True
Me.lbl_branch.Location = New System.Drawing.Point(17, 100)
Me.lbl_branch.Name = "lbl_branch"
Me.lbl_branch.Size = New System.Drawing.Size(52, 17)
Me.lbl_branch.TabIndex = 30
Me.lbl_branch.Text = "Branch :"
'
'lbl_year
'
Me.lbl_year.AutoSize = True
Me.lbl_year.Location = New System.Drawing.Point(16, 66)
Me.lbl_year.Name = "lbl_year"
Me.lbl_year.Size = New System.Drawing.Size(38, 17)
Me.lbl_year.TabIndex = 27
Me.lbl_year.Text = "Year :"
'
'lbl_name
'
Me.lbl_name.AutoSize = True
Me.lbl_name.Location = New System.Drawing.Point(15, 29)
Me.lbl_name.Name = "lbl_name"
Me.lbl_name.Size = New System.Drawing.Size(48, 17)
Me.lbl_name.TabIndex = 23
Me.lbl_name.Text = "Name : "
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.ForeColor = System.Drawing.Color.Blue
Me.Label1.Location = New System.Drawing.Point(312, 24)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(152, 17)
Me.Label1.TabIndex = 11
Me.Label1.Text = "Select the book record :"
'
'lbl_help
'
Me.lbl_help.AutoSize = True
Me.lbl_help.Cursor = System.Windows.Forms.Cursors.Hand
Me.lbl_help.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lbl_help.ForeColor = System.Drawing.Color.Blue
Me.lbl_help.Location = New System.Drawing.Point(186, 269)
Me.lbl_help.Name = "lbl_help"
Me.lbl_help.Size = New System.Drawing.Size(91, 17)
Me.lbl_help.TabIndex = 16
Me.lbl_help.Text = "How to update?"
'
'books
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.Silver
Me.ClientSize = New System.Drawing.Size(804, 525)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -