📄 form5.vb
字号:
'引用名称空间
Imports System.Data
Imports System.Data.OleDb
Public Class Form5
Inherits System.Windows.Forms.Form
'n是添加或者修改的状态参数
Dim n As Integer = 0
'ncommand是SQL命令
Dim ncommand As New OleDbCommand()
'nsql是SQL语句,bak1-4是用来备份的字符串
Dim nsql, bak1, bak2, bak3, bak4 As String
#Region " Windows 窗体设计器生成的代码 "
Public Sub New()
MyBase.New()
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化
End Sub
'窗体重写处置以清理组件列表。
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 TabControl1 As System.Windows.Forms.TabControl
Friend WithEvents TabPage1 As System.Windows.Forms.TabPage
Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
Friend WithEvents TabPage3 As System.Windows.Forms.TabPage
Friend WithEvents TabPage4 As System.Windows.Forms.TabPage
Friend WithEvents TabPage5 As System.Windows.Forms.TabPage
Friend WithEvents TabPage6 As System.Windows.Forms.TabPage
Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
Friend WithEvents TabPage7 As System.Windows.Forms.TabPage
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 Label1 As System.Windows.Forms.Label
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents DataGrid2 As System.Windows.Forms.DataGrid
Friend WithEvents OleDbConnection1 As System.Data.OleDb.OleDbConnection
Friend WithEvents outgoing As System.Data.OleDb.OleDbDataAdapter
Friend WithEvents OleDbSelectCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbInsertCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents Outgoing1 As WindowsApplication13.outgoing
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.TabControl1 = New System.Windows.Forms.TabControl()
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.DataGrid1 = New System.Windows.Forms.DataGrid()
Me.TabPage2 = New System.Windows.Forms.TabPage()
Me.TabPage3 = New System.Windows.Forms.TabPage()
Me.TabPage5 = New System.Windows.Forms.TabPage()
Me.TabPage6 = New System.Windows.Forms.TabPage()
Me.TabPage7 = New System.Windows.Forms.TabPage()
Me.TabPage4 = New System.Windows.Forms.TabPage()
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.Label1 = New System.Windows.Forms.Label()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.ComboBox1 = New System.Windows.Forms.ComboBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.TextBox2 = New System.Windows.Forms.TextBox()
Me.TextBox3 = New System.Windows.Forms.TextBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.DataGrid2 = New System.Windows.Forms.DataGrid()
Me.Outgoing1 = New WindowsApplication13.outgoing()
Me.OleDbConnection1 = New System.Data.OleDb.OleDbConnection()
Me.outgoing = New System.Data.OleDb.OleDbDataAdapter()
Me.OleDbInsertCommand1 = New System.Data.OleDb.OleDbCommand()
Me.OleDbSelectCommand1 = New System.Data.OleDb.OleDbCommand()
Me.TabControl1.SuspendLayout()
Me.TabPage1.SuspendLayout()
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.DataGrid2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Outgoing1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'TabControl1
'
Me.TabControl1.Appearance = System.Windows.Forms.TabAppearance.FlatButtons
Me.TabControl1.Controls.AddRange(New System.Windows.Forms.Control() {Me.TabPage1, Me.TabPage2, Me.TabPage3, Me.TabPage5, Me.TabPage6, Me.TabPage7, Me.TabPage4})
Me.TabControl1.Location = New System.Drawing.Point(208, 8)
Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 0
Me.TabControl1.Size = New System.Drawing.Size(368, 24)
Me.TabControl1.TabIndex = 0
'
'TabPage1
'
Me.TabPage1.Controls.AddRange(New System.Windows.Forms.Control() {Me.DataGrid1})
Me.TabPage1.Location = New System.Drawing.Point(4, 25)
Me.TabPage1.Name = "TabPage1"
Me.TabPage1.Size = New System.Drawing.Size(360, 0)
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = "全部"
'
'DataGrid1
'
Me.DataGrid1.DataMember = ""
Me.DataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.DataGrid1.Name = "DataGrid1"
Me.DataGrid1.ReadOnly = True
Me.DataGrid1.Size = New System.Drawing.Size(376, 376)
Me.DataGrid1.TabIndex = 0
'
'TabPage2
'
Me.TabPage2.Location = New System.Drawing.Point(4, 25)
Me.TabPage2.Name = "TabPage2"
Me.TabPage2.Size = New System.Drawing.Size(360, 0)
Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = "食物"
'
'TabPage3
'
Me.TabPage3.Location = New System.Drawing.Point(4, 25)
Me.TabPage3.Name = "TabPage3"
Me.TabPage3.Size = New System.Drawing.Size(360, 0)
Me.TabPage3.TabIndex = 2
Me.TabPage3.Text = "零食"
'
'TabPage5
'
Me.TabPage5.Location = New System.Drawing.Point(4, 25)
Me.TabPage5.Name = "TabPage5"
Me.TabPage5.Size = New System.Drawing.Size(360, 0)
Me.TabPage5.TabIndex = 4
Me.TabPage5.Text = "耐用"
'
'TabPage6
'
Me.TabPage6.Location = New System.Drawing.Point(4, 25)
Me.TabPage6.Name = "TabPage6"
Me.TabPage6.Size = New System.Drawing.Size(360, 0)
Me.TabPage6.TabIndex = 5
Me.TabPage6.Text = "书刊"
'
'TabPage7
'
Me.TabPage7.Location = New System.Drawing.Point(4, 25)
Me.TabPage7.Name = "TabPage7"
Me.TabPage7.Size = New System.Drawing.Size(360, 0)
Me.TabPage7.TabIndex = 6
Me.TabPage7.Text = "杂费"
'
'TabPage4
'
Me.TabPage4.Location = New System.Drawing.Point(4, 25)
Me.TabPage4.Name = "TabPage4"
Me.TabPage4.Size = New System.Drawing.Size(360, 0)
Me.TabPage4.TabIndex = 3
Me.TabPage4.Text = "常耗"
'
'Button5
'
Me.Button5.Location = New System.Drawing.Point(64, 312)
Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(72, 24)
Me.Button5.TabIndex = 19
Me.Button5.Text = "关闭"
'
'Button4
'
Me.Button4.Location = New System.Drawing.Point(120, 264)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(56, 32)
Me.Button4.TabIndex = 18
Me.Button4.Text = "取消"
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(24, 264)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(56, 32)
Me.Button3.TabIndex = 17
Me.Button3.Text = "修改"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(120, 208)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(56, 32)
Me.Button2.TabIndex = 16
Me.Button2.Text = "删除"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(24, 208)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(56, 32)
Me.Button1.TabIndex = 15
Me.Button1.Text = "增加"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(24, 32)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(64, 16)
Me.Label1.TabIndex = 21
Me.Label1.Text = "项目类型"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(96, 72)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(104, 20)
Me.TextBox1.TabIndex = 20
Me.TextBox1.Text = ""
'
'ComboBox1
'
Me.ComboBox1.Items.AddRange(New Object() {"零食", "常耗", "耐用", "书刊", "杂费", "食物"})
Me.ComboBox1.Location = New System.Drawing.Point(96, 32)
Me.ComboBox1.Name = "ComboBox1"
Me.ComboBox1.Size = New System.Drawing.Size(72, 21)
Me.ComboBox1.TabIndex = 22
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(48, 152)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(32, 16)
Me.Label2.TabIndex = 23
Me.Label2.Text = "单位"
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(96, 112)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(72, 20)
Me.TextBox2.TabIndex = 24
Me.TextBox2.Text = ""
'
'TextBox3
'
Me.TextBox3.Location = New System.Drawing.Point(96, 152)
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.Size = New System.Drawing.Size(72, 20)
Me.TextBox3.TabIndex = 25
Me.TextBox3.Text = ""
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(24, 72)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(64, 16)
Me.Label3.TabIndex = 26
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -