📄 form2.vb
字号:
Public Class Form2
Inherits System.Windows.Forms.Form
#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 DataGrid1 As System.Windows.Forms.DataGrid
Friend WithEvents Panel6 As System.Windows.Forms.Panel
Friend WithEvents OleDbDataAdapter1 As System.Data.OleDb.OleDbDataAdapter
Friend WithEvents Ds1 As 学生公寓管理系统.Ds
Friend WithEvents OleDbSelectCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbInsertCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbUpdateCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbDeleteCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbConnection1 As System.Data.OleDb.OleDbConnection
Friend WithEvents Panel9 As System.Windows.Forms.Panel
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents TxtLocation As System.Windows.Forms.Label
Friend WithEvents Button9 As System.Windows.Forms.Button
Friend WithEvents Button8 As System.Windows.Forms.Button
Friend WithEvents Button7 As System.Windows.Forms.Button
Friend WithEvents Button6 As System.Windows.Forms.Button
Friend WithEvents Button5 As System.Windows.Forms.Button
Friend WithEvents Button4 As System.Windows.Forms.Button
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents ComboBox4 As System.Windows.Forms.ComboBox
Friend WithEvents ComboBox3 As System.Windows.Forms.ComboBox
Friend WithEvents ComboBox2 As System.Windows.Forms.ComboBox
Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
Friend WithEvents TextBox9 As System.Windows.Forms.TextBox
Friend WithEvents TextBox8 As System.Windows.Forms.TextBox
Friend WithEvents TextBox7 As System.Windows.Forms.TextBox
Friend WithEvents TextBox6 As System.Windows.Forms.TextBox
Friend WithEvents TextBox5 As System.Windows.Forms.TextBox
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents ComboBox8 As System.Windows.Forms.ComboBox
Friend WithEvents Button14 As System.Windows.Forms.Button
Friend WithEvents Label21 As System.Windows.Forms.Label
Friend WithEvents Label20 As System.Windows.Forms.Label
Friend WithEvents Label19 As System.Windows.Forms.Label
Friend WithEvents Label18 As System.Windows.Forms.Label
Friend WithEvents Label17 As System.Windows.Forms.Label
Friend WithEvents Label16 As System.Windows.Forms.Label
Friend WithEvents Label15 As System.Windows.Forms.Label
Friend WithEvents Label14 As System.Windows.Forms.Label
Friend WithEvents Label13 As System.Windows.Forms.Label
Friend WithEvents TextBox13 As System.Windows.Forms.TextBox
Friend WithEvents TextBox12 As System.Windows.Forms.TextBox
Friend WithEvents TextBox10 As System.Windows.Forms.TextBox
Friend WithEvents ComboBox7 As System.Windows.Forms.ComboBox
Friend WithEvents ComboBox6 As System.Windows.Forms.ComboBox
Friend WithEvents ComboBox5 As System.Windows.Forms.ComboBox
Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Friend WithEvents Button12 As System.Windows.Forms.Button
Friend WithEvents Button10 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.DataGrid1 = New System.Windows.Forms.DataGrid
Me.Ds1 = New 学生公寓管理系统.Ds
Me.Panel6 = New System.Windows.Forms.Panel
Me.OleDbDataAdapter1 = New System.Data.OleDb.OleDbDataAdapter
Me.OleDbDeleteCommand1 = New System.Data.OleDb.OleDbCommand
Me.OleDbConnection1 = New System.Data.OleDb.OleDbConnection
Me.OleDbInsertCommand1 = New System.Data.OleDb.OleDbCommand
Me.OleDbSelectCommand1 = New System.Data.OleDb.OleDbCommand
Me.OleDbUpdateCommand1 = New System.Data.OleDb.OleDbCommand
Me.Panel9 = New System.Windows.Forms.Panel
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.ComboBox8 = New System.Windows.Forms.ComboBox
Me.Button14 = New System.Windows.Forms.Button
Me.Label21 = New System.Windows.Forms.Label
Me.Label20 = New System.Windows.Forms.Label
Me.Label19 = New System.Windows.Forms.Label
Me.Label18 = New System.Windows.Forms.Label
Me.Label17 = New System.Windows.Forms.Label
Me.Label16 = New System.Windows.Forms.Label
Me.Label15 = New System.Windows.Forms.Label
Me.Label14 = New System.Windows.Forms.Label
Me.Label13 = New System.Windows.Forms.Label
Me.TextBox13 = New System.Windows.Forms.TextBox
Me.TextBox12 = New System.Windows.Forms.TextBox
Me.TextBox10 = New System.Windows.Forms.TextBox
Me.ComboBox7 = New System.Windows.Forms.ComboBox
Me.ComboBox6 = New System.Windows.Forms.ComboBox
Me.ComboBox5 = New System.Windows.Forms.ComboBox
Me.TextBox4 = New System.Windows.Forms.TextBox
Me.TextBox3 = New System.Windows.Forms.TextBox
Me.Button12 = New System.Windows.Forms.Button
Me.Button10 = New System.Windows.Forms.Button
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.TxtLocation = New System.Windows.Forms.Label
Me.Button9 = New System.Windows.Forms.Button
Me.Button8 = New System.Windows.Forms.Button
Me.Button7 = New System.Windows.Forms.Button
Me.Button6 = New System.Windows.Forms.Button
Me.Button5 = New System.Windows.Forms.Button
Me.Button4 = New System.Windows.Forms.Button
Me.Button3 = New System.Windows.Forms.Button
Me.Button2 = New System.Windows.Forms.Button
Me.Button1 = New System.Windows.Forms.Button
Me.ComboBox4 = New System.Windows.Forms.ComboBox
Me.ComboBox3 = New System.Windows.Forms.ComboBox
Me.ComboBox2 = New System.Windows.Forms.ComboBox
Me.ComboBox1 = New System.Windows.Forms.ComboBox
Me.TextBox9 = New System.Windows.Forms.TextBox
Me.TextBox8 = New System.Windows.Forms.TextBox
Me.TextBox7 = New System.Windows.Forms.TextBox
Me.TextBox6 = New System.Windows.Forms.TextBox
Me.TextBox5 = New System.Windows.Forms.TextBox
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.TextBox1 = New System.Windows.Forms.TextBox
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.Label3 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.Label1 = New System.Windows.Forms.Label
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Ds1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel9.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
'DataGrid1
'
Me.DataGrid1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.DataGrid1.DataMember = "学生库"
Me.DataGrid1.DataSource = Me.Ds1
Me.DataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.DataGrid1.Location = New System.Drawing.Point(8, -16)
Me.DataGrid1.Name = "DataGrid1"
Me.DataGrid1.ReadOnly = True
Me.DataGrid1.Size = New System.Drawing.Size(768, 200)
Me.DataGrid1.TabIndex = 0
'
'Ds1
'
Me.Ds1.DataSetName = "Ds"
Me.Ds1.Locale = New System.Globalization.CultureInfo("zh-CN")
'
'Panel6
'
Me.Panel6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.Panel6.Location = New System.Drawing.Point(848, 232)
Me.Panel6.Name = "Panel6"
Me.Panel6.Size = New System.Drawing.Size(8, 272)
Me.Panel6.TabIndex = 63
'
'OleDbDataAdapter1
'
Me.OleDbDataAdapter1.DeleteCommand = Me.OleDbDeleteCommand1
Me.OleDbDataAdapter1.InsertCommand = Me.OleDbInsertCommand1
Me.OleDbDataAdapter1.SelectCommand = Me.OleDbSelectCommand1
Me.OleDbDataAdapter1.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("性别", "性别"), New System.Data.Common.DataColumnMapping("民族", "民族"), New System.Data.Common.DataColumnMapping("院系", "院系"), New System.Data.Common.DataColumnMapping("专业", "专业"), New System.Data.Common.DataColumnMapping("班级", "班级"), New System.Data.Common.DataColumnMapping("宿舍电话", "宿舍电话"), New System.Data.Common.DataColumnMapping("身份证号", "身份证号"), New System.Data.Common.DataColumnMapping("籍贯", "籍贯"), New System.Data.Common.DataColumnMapping("备注", "备注")})})
Me.OleDbDataAdapter1.UpdateCommand = Me.OleDbUpdateCommand1
'
'OleDbDeleteCommand1
'
Me.OleDbDeleteCommand1.CommandText = "DELETE FROM 学生库 WHERE (学号 = ?) AND (专业 = ? OR ? IS NULL AND 专业 IS NULL) AND (备注 =" & _
" ? OR ? IS NULL AND 备注 IS NULL) AND (姓名 = ? OR ? IS NULL AND 姓名 IS NULL) AND (宿舍" & _
"电话 = ? OR ? IS NULL AND 宿舍电话 IS NULL) AND (性别 = ? OR ? IS NULL AND 性别 IS NULL) A" & _
"ND (民族 = ? OR ? IS NULL AND 民族 IS NULL) AND (班级 = ? OR ? IS NULL AND 班级 IS NULL)" & _
" AND (籍贯 = ? OR ? IS NULL AND 籍贯 IS NULL) AND (身份证号 = ? OR ? IS NULL AND 身份证号 IS" & _
" NULL) AND (院系 = ? OR ? IS NULL AND 院系 IS NULL)"
Me.OleDbDeleteCommand1.Connection = Me.OleDbConnection1
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_学号", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "学号", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_专业", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "专业", System.Data.DataRowVersion.Original, Nothing))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -