?? frmclasscourse.vb
字號:
Imports System.Data
Imports System
Imports System.Data.SqlClient
Public Class FrmClassCourse
Inherits System.Windows.Forms.Form
Private sqlConn As SqlConnection
Private sqlComm As SqlCommand
Private daDate As SqlDataAdapter
Private dsData As DataSet
Private flag As Int32 '標明添加還是修改還是能夠查詢
Private strSelect As String '查詢框是否有值
Private tableNum As Int32 '查詢框沒值則為0,有值則為1
#Region " Windows 窗體設計器生成的代碼 "
Public Sub New()
MyBase.New()
'該調(diào)用是 Windows 窗體設計器所必需的。
InitializeComponent()
'在 InitializeComponent() 調(diào)用之后添加任何初始化
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 Label1 As System.Windows.Forms.Label
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 Label5 As System.Windows.Forms.Label
Friend WithEvents txtID As System.Windows.Forms.TextBox
Friend WithEvents cmbName As System.Windows.Forms.ComboBox
Friend WithEvents cmbBook As System.Windows.Forms.ComboBox
Friend WithEvents txtName As System.Windows.Forms.TextBox
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents btnAdd As System.Windows.Forms.Button
Friend WithEvents btnSave As System.Windows.Forms.Button
Friend WithEvents btnExit As System.Windows.Forms.Button
Friend WithEvents dgDate As System.Windows.Forms.DataGrid
Friend WithEvents btnCancel As System.Windows.Forms.Button
Friend WithEvents btndelete As System.Windows.Forms.Button
Friend WithEvents btnUpdate As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.txtID = New System.Windows.Forms.TextBox
Me.cmbName = New System.Windows.Forms.ComboBox
Me.cmbBook = New System.Windows.Forms.ComboBox
Me.txtName = New System.Windows.Forms.TextBox
Me.dgDate = New System.Windows.Forms.DataGrid
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.btnCancel = New System.Windows.Forms.Button
Me.btndelete = New System.Windows.Forms.Button
Me.btnAdd = New System.Windows.Forms.Button
Me.btnUpdate = New System.Windows.Forms.Button
Me.btnSave = New System.Windows.Forms.Button
Me.btnExit = New System.Windows.Forms.Button
CType(Me.dgDate, System.ComponentModel.ISupportInitialize).BeginInit()
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("黑體", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label1.Location = New System.Drawing.Point(112, 8)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(176, 24)
Me.Label1.TabIndex = 0
Me.Label1.Text = "課程信息"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(24, 48)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(56, 16)
Me.Label2.TabIndex = 1
Me.Label2.Text = "課程號:"
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(200, 46)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(56, 16)
Me.Label3.TabIndex = 2
Me.Label3.Text = "課程名:"
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(24, 88)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(56, 16)
Me.Label4.TabIndex = 3
Me.Label4.Text = "教師:"
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(208, 88)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(56, 16)
Me.Label5.TabIndex = 4
Me.Label5.Text = "教材:"
'
'txtID
'
Me.txtID.Location = New System.Drawing.Point(96, 43)
Me.txtID.Name = "txtID"
Me.txtID.Size = New System.Drawing.Size(96, 21)
Me.txtID.TabIndex = 5
Me.txtID.Text = ""
'
'cmbName
'
Me.cmbName.Location = New System.Drawing.Point(96, 84)
Me.cmbName.Name = "cmbName"
Me.cmbName.Size = New System.Drawing.Size(96, 20)
Me.cmbName.TabIndex = 6
'
'cmbBook
'
Me.cmbBook.Location = New System.Drawing.Point(272, 84)
Me.cmbBook.Name = "cmbBook"
Me.cmbBook.Size = New System.Drawing.Size(96, 20)
Me.cmbBook.TabIndex = 7
'
'txtName
'
Me.txtName.Location = New System.Drawing.Point(272, 43)
Me.txtName.Name = "txtName"
Me.txtName.Size = New System.Drawing.Size(96, 21)
Me.txtName.TabIndex = 8
Me.txtName.Text = ""
'
'dgDate
'
Me.dgDate.DataMember = ""
Me.dgDate.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.dgDate.Location = New System.Drawing.Point(24, 128)
Me.dgDate.Name = "dgDate"
Me.dgDate.ReadOnly = True
Me.dgDate.Size = New System.Drawing.Size(304, 222)
Me.dgDate.TabIndex = 9
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.btnCancel)
Me.GroupBox1.Controls.Add(Me.btndelete)
Me.GroupBox1.Controls.Add(Me.btnAdd)
Me.GroupBox1.Controls.Add(Me.btnUpdate)
Me.GroupBox1.Location = New System.Drawing.Point(336, 128)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(72, 152)
Me.GroupBox1.TabIndex = 10
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "操作"
'
'btnCancel
'
Me.btnCancel.Location = New System.Drawing.Point(6, 123)
Me.btnCancel.Name = "btnCancel"
Me.btnCancel.Size = New System.Drawing.Size(60, 22)
Me.btnCancel.TabIndex = 2
Me.btnCancel.Text = "取消"
'
'btndelete
'
Me.btndelete.Location = New System.Drawing.Point(6, 90)
Me.btndelete.Name = "btndelete"
Me.btndelete.Size = New System.Drawing.Size(60, 22)
Me.btndelete.TabIndex = 1
Me.btndelete.Text = "刪除"
'
'btnAdd
'
Me.btnAdd.Location = New System.Drawing.Point(6, 24)
Me.btnAdd.Name = "btnAdd"
Me.btnAdd.Size = New System.Drawing.Size(60, 22)
Me.btnAdd.TabIndex = 0
Me.btnAdd.Text = "添加"
'
'btnUpdate
'
Me.btnUpdate.Location = New System.Drawing.Point(6, 57)
Me.btnUpdate.Name = "btnUpdate"
Me.btnUpdate.Size = New System.Drawing.Size(60, 22)
Me.btnUpdate.TabIndex = 1
Me.btnUpdate.Text = "更新"
'
'btnSave
'
Me.btnSave.Location = New System.Drawing.Point(340, 284)
Me.btnSave.Name = "btnSave"
Me.btnSave.Size = New System.Drawing.Size(60, 22)
Me.btnSave.TabIndex = 11
Me.btnSave.Text = "保存"
'
'btnExit
'
Me.btnExit.Location = New System.Drawing.Point(340, 314)
Me.btnExit.Name = "btnExit"
Me.btnExit.Size = New System.Drawing.Size(60, 22)
Me.btnExit.TabIndex = 12
Me.btnExit.Text = "退出"
'
'FrmClassCourse
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.ClientSize = New System.Drawing.Size(424, 365)
Me.Controls.Add(Me.btnExit)
Me.Controls.Add(Me.btnSave)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.dgDate)
Me.Controls.Add(Me.txtName)
Me.Controls.Add(Me.cmbBook)
Me.Controls.Add(Me.cmbName)
Me.Controls.Add(Me.txtID)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1)
Me.Name = "FrmClassCourse"
Me.Text = "FrmClassCourse"
CType(Me.dgDate, System.ComponentModel.ISupportInitialize).EndInit()
Me.GroupBox1.ResumeLayout(False)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -