📄 frmbooktype.vb
字号:
Public Class frmBookType Inherits 图书管理系统.frmBase#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 Label4 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents txbName As System.Windows.Forms.TextBox
Friend WithEvents txbCode As System.Windows.Forms.TextBox
Friend WithEvents SqlDataAdapter1 As System.Data.SqlClient.SqlDataAdapter
Friend WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents SqlInsertCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents SqlUpdateCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents SqlDeleteCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection
Friend WithEvents DataSet11 As 图书管理系统.DataSet1
Friend WithEvents txbDays As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.txbDays = New System.Windows.Forms.TextBox
Me.DataSet11 = New 图书管理系统.DataSet1
Me.Label6 = New System.Windows.Forms.Label
Me.txbName = New System.Windows.Forms.TextBox
Me.Label5 = New System.Windows.Forms.Label
Me.txbCode = New System.Windows.Forms.TextBox
Me.Label4 = New System.Windows.Forms.Label
Me.SqlDataAdapter1 = New System.Data.SqlClient.SqlDataAdapter
Me.SqlDeleteCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection
Me.SqlInsertCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlUpdateCommand1 = New System.Data.SqlClient.SqlCommand
Me.GroupBox1.SuspendLayout()
CType(Me.DataSet11, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'GroupBox1
'
Me.GroupBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.GroupBox1.Controls.Add(Me.txbDays)
Me.GroupBox1.Controls.Add(Me.Label6)
Me.GroupBox1.Controls.Add(Me.txbName)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.txbCode)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Location = New System.Drawing.Point(8, 160)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(560, 80)
Me.GroupBox1.TabIndex = 7
Me.GroupBox1.TabStop = False
'
'txbDays
'
Me.txbDays.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet11, "图书类型.可借天数"))
Me.txbDays.Location = New System.Drawing.Point(384, 48)
Me.txbDays.Name = "txbDays"
Me.txbDays.TabIndex = 5
Me.txbDays.Text = ""
'
'DataSet11
'
Me.DataSet11.DataSetName = "DataSet1"
Me.DataSet11.Locale = New System.Globalization.CultureInfo("zh-CN")
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(384, 24)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(56, 15)
Me.Label6.TabIndex = 4
Me.Label6.Text = "可借天数"
'
'txbName
'
Me.txbName.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet11, "图书类型.类型名称"))
Me.txbName.Location = New System.Drawing.Point(144, 48)
Me.txbName.Name = "txbName"
Me.txbName.Size = New System.Drawing.Size(216, 21)
Me.txbName.TabIndex = 3
Me.txbName.Text = ""
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(144, 24)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(56, 15)
Me.Label5.TabIndex = 2
Me.Label5.Text = "类型名称"
'
'txbCode
'
Me.txbCode.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet11, "图书类型.类型编号"))
Me.txbCode.Location = New System.Drawing.Point(24, 48)
Me.txbCode.Name = "txbCode"
Me.txbCode.Size = New System.Drawing.Size(91, 21)
Me.txbCode.TabIndex = 1
Me.txbCode.Text = ""
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(24, 24)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(56, 15)
Me.Label4.TabIndex = 0
Me.Label4.Text = "类型编号"
'
'SqlDataAdapter1
'
Me.SqlDataAdapter1.DeleteCommand = Me.SqlDeleteCommand1
Me.SqlDataAdapter1.InsertCommand = Me.SqlInsertCommand1
Me.SqlDataAdapter1.SelectCommand = Me.SqlSelectCommand1
Me.SqlDataAdapter1.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "图书类型", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("类型编号", "类型编号"), New System.Data.Common.DataColumnMapping("类型名称", "类型名称"), New System.Data.Common.DataColumnMapping("可借天数", "可借天数")})})
Me.SqlDataAdapter1.UpdateCommand = Me.SqlUpdateCommand1
'
'SqlDeleteCommand1
'
Me.SqlDeleteCommand1.CommandText = "DELETE FROM 图书类型 WHERE (类型编号 = @Original_类型编号) AND (可借天数 = @Original_可借天数 OR @Ori" & _
"ginal_可借天数 IS NULL AND 可借天数 IS NULL) AND (类型名称 = @Original_类型名称 OR @Original_类型名" & _
"称 IS NULL AND 类型名称 IS NULL)"
Me.SqlDeleteCommand1.Connection = Me.SqlConnection1
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_类型编号", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "类型编号", System.Data.DataRowVersion.Original, Nothing))
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_可借天数", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "可借天数", System.Data.DataRowVersion.Original, Nothing))
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_类型名称", System.Data.SqlDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "类型名称", System.Data.DataRowVersion.Original, Nothing))
'
'SqlConnection1
'
Me.SqlConnection1.ConnectionString = "workstation id=CS;packet size=4096;integrated security=SSPI;data source=CS;persis" & _
"t security info=False;initial catalog=libbook"
'
'SqlInsertCommand1
'
Me.SqlInsertCommand1.CommandText = "INSERT INTO 图书类型(类型编号, 类型名称, 可借天数) VALUES (@类型编号, @类型名称, @可借天数); SELECT 类型编号, 类型名" & _
"称, 可借天数 FROM 图书类型 WHERE (类型编号 = @类型编号)"
Me.SqlInsertCommand1.Connection = Me.SqlConnection1
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@类型编号", System.Data.SqlDbType.VarChar, 50, "类型编号"))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -