📄 form6.vb
字号:
Public Class Form6
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 MSComm1 As AxMSCommLib.AxMSComm
Friend WithEvents Timer1 As System.Timers.Timer
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents SqlDataAdapter1 As System.Data.SqlClient.SqlDataAdapter
Friend WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection
Friend WithEvents SqlCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents DataSet11 As WindowsApplication2.DataSet1
Friend WithEvents DataSet21 As WindowsApplication2.DataSet2
Friend WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents SqlInsertCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form6))
Me.MSComm1 = New AxMSCommLib.AxMSComm
Me.Timer1 = New System.Timers.Timer
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.PictureBox1 = New System.Windows.Forms.PictureBox
Me.Button2 = New System.Windows.Forms.Button
Me.SqlDataAdapter1 = New System.Data.SqlClient.SqlDataAdapter
Me.SqlInsertCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection
Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlCommand1 = New System.Data.SqlClient.SqlCommand
Me.DataSet21 = New WindowsApplication2.DataSet2
Me.DataSet11 = New WindowsApplication2.DataSet1
Me.TextBox3 = New System.Windows.Forms.TextBox
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.TextBox4 = New System.Windows.Forms.TextBox
CType(Me.MSComm1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Timer1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.DataSet21, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.DataSet11, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'MSComm1
'
Me.MSComm1.Enabled = True
Me.MSComm1.Location = New System.Drawing.Point(520, 16)
Me.MSComm1.Name = "MSComm1"
Me.MSComm1.OcxState = CType(resources.GetObject("MSComm1.OcxState"), System.Windows.Forms.AxHost.State)
Me.MSComm1.Size = New System.Drawing.Size(38, 38)
Me.MSComm1.TabIndex = 0
'
'Timer1
'
Me.Timer1.Enabled = True
Me.Timer1.SynchronizingObject = Me
'
'TextBox1
'
Me.TextBox1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(255, Byte), CType(192, Byte))
Me.TextBox1.Location = New System.Drawing.Point(440, 152)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(120, 21)
Me.TextBox1.TabIndex = 1
Me.TextBox1.Text = ""
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label1.ForeColor = System.Drawing.Color.Thistle
Me.Label1.Location = New System.Drawing.Point(344, 152)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(72, 21)
Me.Label1.TabIndex = 4
Me.Label1.Text = "IC卡号"
'
'PictureBox1
'
Me.PictureBox1.BackgroundImage = CType(resources.GetObject("PictureBox1.BackgroundImage"), System.Drawing.Image)
Me.PictureBox1.Location = New System.Drawing.Point(8, 32)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(328, 248)
Me.PictureBox1.TabIndex = 7
Me.PictureBox1.TabStop = False
'
'Button2
'
Me.Button2.BackColor = System.Drawing.Color.White
Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button2.Location = New System.Drawing.Point(416, 240)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(96, 24)
Me.Button2.TabIndex = 15
Me.Button2.Text = "确定(&O)"
'
'SqlDataAdapter1
'
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("IC卡号", "IC卡号"), New System.Data.Common.DataColumnMapping("姓名", "姓名"), New System.Data.Common.DataColumnMapping("余额", "余额"), New System.Data.Common.DataColumnMapping("用户类型", "用户类型")})})
'
'SqlInsertCommand1
'
Me.SqlInsertCommand1.CommandText = "INSERT INTO 食堂(IC卡号, 姓名, 余额, 用户类型) VALUES (@IC卡号, @姓名, @余额, @用户类型); SELECT IC卡号, " & _
"姓名, 余额, 用户类型 FROM 食堂"
Me.SqlInsertCommand1.Connection = Me.SqlConnection1
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IC卡号", System.Data.SqlDbType.VarChar, 50, "IC卡号"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@姓名", System.Data.SqlDbType.VarChar, 50, "姓名"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@余额", System.Data.SqlDbType.VarChar, 50, "余额"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@用户类型", System.Data.SqlDbType.VarChar, 50, "用户类型"))
'
'SqlConnection1
'
Me.SqlConnection1.ConnectionString = "workstation id=697F107DEC5B46F;packet size=4096;integrated security=SSPI;data sou" & _
"rce=697F107DEC5B46F;persist security info=False;initial catalog=qishujia"
'
'SqlSelectCommand1
'
Me.SqlSelectCommand1.CommandText = "SELECT IC卡号, 姓名, 余额, 用户类型 FROM 食堂"
Me.SqlSelectCommand1.Connection = Me.SqlConnection1
'
'DataSet21
'
Me.DataSet21.DataSetName = "DataSet2"
Me.DataSet21.Locale = New System.Globalization.CultureInfo("zh-CN")
'
'DataSet11
'
Me.DataSet11.DataSetName = "DataSet1"
Me.DataSet11.Locale = New System.Globalization.CultureInfo("zh-CN")
'
'TextBox3
'
Me.TextBox3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(255, Byte))
Me.TextBox3.Location = New System.Drawing.Point(440, 200)
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.Size = New System.Drawing.Size(120, 21)
Me.TextBox3.TabIndex = 18
Me.TextBox3.Text = ""
'
'TextBox2
'
Me.TextBox2.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte), CType(255, Byte), CType(255, Byte))
Me.TextBox2.Location = New System.Drawing.Point(440, 56)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(120, 21)
Me.TextBox2.TabIndex = 19
Me.TextBox2.Text = ""
'
'Label2
'
Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label2.ForeColor = System.Drawing.Color.Thistle
Me.Label2.Location = New System.Drawing.Point(344, 56)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(80, 21)
Me.Label2.TabIndex = 20
Me.Label2.Text = "姓名"
'
'Label3
'
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -