📄 ac.vb
字号:
Imports System.Data
Imports System.Data.OleDb
Public Class ac
Inherits System.Windows.Forms.Form
Dim MyConnectionstr As String = "Provider=Microsoft.JET.OLEDB.4.0;Data Source=" & Application.StartupPath & "\Sellsystem.mdb"
Dim MySQL As String = "Select Products_Type as 产品型号,Products_typic as 产品类型,Products_produce as 产品厂家,Products_Quality as 产品质保,Products_OutPrice as 外部价格,Products_Price as 内部价格,Products_Quantity as 产品数量,Products_Prove as 产品说明,Products_img as 产品图片,Products_Ctypic as 所属类型 From Products_Table"
Dim MyConnection As New OleDbConnection(MyConnectionstr)
Dim MyCommand As New OleDbCommand(MySQL, MyConnection)
Dim Mydapater As New OleDbDataAdapter(MyCommand)
Dim MyDataset As New DataSet
Dim MyRow As DataRow
Dim MyTable As DataTable
#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 Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents TextBox5 As System.Windows.Forms.TextBox
Friend WithEvents TextBox8 As System.Windows.Forms.TextBox
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents TextBox7 As System.Windows.Forms.TextBox
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents TextBox6 As System.Windows.Forms.TextBox
Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents TextBox9 As System.Windows.Forms.TextBox
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents TextBox10 As System.Windows.Forms.TextBox
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button
Me.Button2 = New System.Windows.Forms.Button
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.DataGrid1 = New System.Windows.Forms.DataGrid
Me.ComboBox1 = New System.Windows.Forms.ComboBox
Me.Label11 = New System.Windows.Forms.Label
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.TextBox5 = New System.Windows.Forms.TextBox
Me.TextBox8 = New System.Windows.Forms.TextBox
Me.Label8 = New System.Windows.Forms.Label
Me.Label7 = New System.Windows.Forms.Label
Me.TextBox7 = New System.Windows.Forms.TextBox
Me.Label6 = New System.Windows.Forms.Label
Me.TextBox6 = New System.Windows.Forms.TextBox
Me.TextBox4 = New System.Windows.Forms.TextBox
Me.Label5 = New System.Windows.Forms.Label
Me.TextBox3 = New System.Windows.Forms.TextBox
Me.Label4 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.Label9 = New System.Windows.Forms.Label
Me.TextBox9 = New System.Windows.Forms.TextBox
Me.Label10 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.TextBox10 = New System.Windows.Forms.TextBox
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.GroupBox3 = New System.Windows.Forms.GroupBox
Me.GroupBox2.SuspendLayout()
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(400, 144)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(72, 24)
Me.Button1.TabIndex = 18
Me.Button1.Text = "增 加"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(500, 144)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(64, 24)
Me.Button2.TabIndex = 19
Me.Button2.Text = "退 出"
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.DataGrid1)
Me.GroupBox2.Location = New System.Drawing.Point(5, 200)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(811, 208)
Me.GroupBox2.TabIndex = 22
Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "商品信息浏览"
'
'DataGrid1
'
Me.DataGrid1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.DataGrid1.BackgroundColor = System.Drawing.SystemColors.ActiveCaptionText
Me.DataGrid1.CaptionBackColor = System.Drawing.SystemColors.ActiveBorder
Me.DataGrid1.CaptionForeColor = System.Drawing.SystemColors.Control
Me.DataGrid1.CaptionText = "商品信息表"
Me.DataGrid1.CaptionVisible = False
Me.DataGrid1.DataMember = ""
Me.DataGrid1.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None
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.SelectionForeColor = System.Drawing.SystemColors.Control
Me.DataGrid1.Size = New System.Drawing.Size(795, 184)
Me.DataGrid1.TabIndex = 0
'
'ComboBox1
'
Me.ComboBox1.ItemHeight = 12
Me.ComboBox1.Items.AddRange(New Object() {"笔记本电脑", "品牌电脑", "组装电脑", "网络设备", "电脑配件"})
Me.ComboBox1.Location = New System.Drawing.Point(456, 29)
Me.ComboBox1.Name = "ComboBox1"
Me.ComboBox1.Size = New System.Drawing.Size(104, 20)
Me.ComboBox1.TabIndex = 27
'
'Label11
'
Me.Label11.Location = New System.Drawing.Point(392, 32)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(56, 16)
Me.Label11.TabIndex = 26
Me.Label11.Text = "所属类型"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(88, 26)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(104, 21)
Me.TextBox1.TabIndex = 25
Me.TextBox1.Text = ""
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(32, 58)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(56, 16)
Me.Label1.TabIndex = 24
Me.Label1.Text = "产品名称"
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(88, 53)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(104, 21)
Me.TextBox2.TabIndex = 21
Me.TextBox2.Text = ""
'
'TextBox5
'
Me.TextBox5.Location = New System.Drawing.Point(88, 144)
Me.TextBox5.Name = "TextBox5"
Me.TextBox5.Size = New System.Drawing.Size(104, 21)
Me.TextBox5.TabIndex = 20
Me.TextBox5.Text = ""
'
'TextBox8
'
Me.TextBox8.Location = New System.Drawing.Point(272, 88)
Me.TextBox8.Name = "TextBox8"
Me.TextBox8.Size = New System.Drawing.Size(104, 21)
Me.TextBox8.TabIndex = 16
Me.TextBox8.Text = ""
'
'Label8
'
Me.Label8.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.Label8.Location = New System.Drawing.Point(208, 120)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(56, 16)
Me.Label8.TabIndex = 7
Me.Label8.Text = "产品说明"
Me.Label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(208, 88)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(56, 16)
Me.Label7.TabIndex = 6
Me.Label7.Text = "产品数量"
Me.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -