📄 editing.vb
字号:
'
'cmdSelectEmployees
'
Me.cmdSelectEmployees.CommandText = "SELECT EmployeeID, FirstName, LastName FROM Employees ORDER BY LastName"
Me.cmdSelectEmployees.Connection = Me.cnNorthwind
'
'btnAccept
'
Me.btnAccept.Location = New System.Drawing.Point(360, 246)
Me.btnAccept.Name = "btnAccept"
Me.btnAccept.TabIndex = 10
Me.btnAccept.Text = "Accept"
'
'btnReject
'
Me.btnReject.Location = New System.Drawing.Point(360, 276)
Me.btnReject.Name = "btnReject"
Me.btnReject.TabIndex = 11
Me.btnReject.Text = "Reject"
'
'cmdUpdateEmployees
'
Me.cmdUpdateEmployees.CommandText = "UPDATE Employees SET FirstName = @first, LastName = @last WHERE (EmployeeID = @em" & _
"pID)"
Me.cmdUpdateEmployees.Connection = Me.cnNorthwind
Me.cmdUpdateEmployees.Parameters.Add(New System.Data.SqlClient.SqlParameter("@first", System.Data.SqlDbType.NVarChar, 10, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "FirstName", System.Data.DataRowVersion.Current, Nothing))
Me.cmdUpdateEmployees.Parameters.Add(New System.Data.SqlClient.SqlParameter("@last", System.Data.SqlDbType.NVarChar, 20, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "LastName", System.Data.DataRowVersion.Current, Nothing))
Me.cmdUpdateEmployees.Parameters.Add(New System.Data.SqlClient.SqlParameter("@empID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "EmployeeID", System.Data.DataRowVersion.Current, Nothing))
'
'txtCurrentLastName
'
Me.txtCurrentLastName.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.dsEmployeeList1, "EmployeeList.LastName"))
Me.txtCurrentLastName.Location = New System.Drawing.Point(208, 48)
Me.txtCurrentLastName.Name = "txtCurrentLastName"
Me.txtCurrentLastName.ReadOnly = True
Me.txtCurrentLastName.TabIndex = 5
Me.txtCurrentLastName.TabStop = False
Me.txtCurrentLastName.Text = "Current Last"
'
'txtOriginalFirstName
'
Me.txtOriginalFirstName.Location = New System.Drawing.Point(104, 24)
Me.txtOriginalFirstName.Name = "txtOriginalFirstName"
Me.txtOriginalFirstName.ReadOnly = True
Me.txtOriginalFirstName.TabIndex = 2
Me.txtOriginalFirstName.TabStop = False
Me.txtOriginalFirstName.Text = "Original First"
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(8, 28)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(49, 13)
Me.Label1.TabIndex = 0
Me.Label1.Text = "Original:"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label2.Location = New System.Drawing.Point(8, 52)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(47, 13)
Me.Label2.TabIndex = 0
Me.Label2.Text = "Current:"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.Location = New System.Drawing.Point(8, 20)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(72, 13)
Me.Label3.TabIndex = 9
Me.Label3.Text = "EmployeeID:"
'
'rbChanged
'
Me.rbChanged.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.rbChanged.Location = New System.Drawing.Point(112, 24)
Me.rbChanged.Name = "rbChanged"
Me.rbChanged.Size = New System.Drawing.Size(72, 16)
Me.rbChanged.TabIndex = 0
Me.rbChanged.Text = "Modified"
'
'btnFirst
'
Me.btnFirst.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnFirst.Location = New System.Drawing.Point(8, 272)
Me.btnFirst.Name = "btnFirst"
Me.btnFirst.Size = New System.Drawing.Size(32, 23)
Me.btnFirst.TabIndex = 3
Me.btnFirst.TabStop = False
Me.btnFirst.Text = "<<"
'
'btnNext
'
Me.btnNext.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnNext.Location = New System.Drawing.Point(264, 272)
Me.btnNext.Name = "btnNext"
Me.btnNext.Size = New System.Drawing.Size(32, 23)
Me.btnNext.TabIndex = 9
Me.btnNext.TabStop = False
Me.btnNext.Text = ">"
'
'Panel1
'
Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.gbRowStatus, Me.txtCurrentLastName, Me.txtOriginalLastName, Me.txtCurrentFirstName, Me.txtOriginalFirstName, Me.txtCurrentID, Me.txtOriginalID, Me.Label2, Me.Label1})
Me.Panel1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Panel1.Location = New System.Drawing.Point(8, 112)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(328, 144)
Me.Panel1.TabIndex = 0
Me.Panel1.TabStop = False
Me.Panel1.Text = "Row Versions"
'
'gbRowStatus
'
Me.gbRowStatus.Controls.AddRange(New System.Windows.Forms.Control() {Me.rbChanged, Me.rbUnchanged, Me.rbNew})
Me.gbRowStatus.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.gbRowStatus.Location = New System.Drawing.Point(16, 80)
Me.gbRowStatus.Name = "gbRowStatus"
Me.gbRowStatus.Size = New System.Drawing.Size(280, 48)
Me.gbRowStatus.TabIndex = 6
Me.gbRowStatus.TabStop = False
Me.gbRowStatus.Text = "RowStatus"
'
'txtCurrentFirstName
'
Me.txtCurrentFirstName.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.dsEmployeeList1, "EmployeeList.FirstName"))
Me.txtCurrentFirstName.Location = New System.Drawing.Point(104, 48)
Me.txtCurrentFirstName.Name = "txtCurrentFirstName"
Me.txtCurrentFirstName.ReadOnly = True
Me.txtCurrentFirstName.TabIndex = 3
Me.txtCurrentFirstName.TabStop = False
Me.txtCurrentFirstName.Text = "Current First"
'
'txtCurrentID
'
Me.txtCurrentID.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.dsEmployeeList1, "EmployeeList.EmployeeID"))
Me.txtCurrentID.Location = New System.Drawing.Point(64, 48)
Me.txtCurrentID.Name = "txtCurrentID"
Me.txtCurrentID.ReadOnly = True
Me.txtCurrentID.Size = New System.Drawing.Size(32, 20)
Me.txtCurrentID.TabIndex = 1
Me.txtCurrentID.TabStop = False
Me.txtCurrentID.Text = "C ID"
'
'txtOriginalID
'
Me.txtOriginalID.Location = New System.Drawing.Point(64, 24)
Me.txtOriginalID.Name = "txtOriginalID"
Me.txtOriginalID.ReadOnly = True
Me.txtOriginalID.Size = New System.Drawing.Size(32, 20)
Me.txtOriginalID.TabIndex = 1
Me.txtOriginalID.TabStop = False
Me.txtOriginalID.Text = "O ID"
'
'btnUpdate
'
Me.btnUpdate.Location = New System.Drawing.Point(360, 156)
Me.btnUpdate.Name = "btnUpdate"
Me.btnUpdate.TabIndex = 8
Me.btnUpdate.Text = "Update"
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label4.Location = New System.Drawing.Point(8, 52)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(65, 13)
Me.Label4.TabIndex = 9
Me.Label4.Text = "First Name:"
'
'btnPrevious
'
Me.btnPrevious.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnPrevious.Location = New System.Drawing.Point(48, 272)
Me.btnPrevious.Name = "btnPrevious"
Me.btnPrevious.Size = New System.Drawing.Size(32, 23)
Me.btnPrevious.TabIndex = 8
Me.btnPrevious.TabStop = False
Me.btnPrevious.Text = "<"
'
'txtWorkingID
'
Me.txtWorkingID.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.dsEmployeeList1, "EmployeeList.EmployeeID"))
Me.txtWorkingID.Location = New System.Drawing.Point(88, 16)
Me.txtWorkingID.Name = "txtWorkingID"
Me.txtWorkingID.ReadOnly = True
Me.txtWorkingID.Size = New System.Drawing.Size(32, 20)
Me.txtWorkingID.TabIndex = 1
Me.txtWorkingID.TabStop = False
Me.txtWorkingID.Text = "W ID"
'
'cmdInsertEmployees
'
Me.cmdInsertEmployees.CommandText = "INSERT INTO Employees (FirstName, LastName) VALUES (@FirstName, @LastName)"
Me.cmdInsertEmployees.Connection = Me.cnNorthwind
Me.cmdInsertEmployees.Parameters.Add(New System.Data.SqlClient.SqlParameter("@FirstName", System.Data.SqlDbType.NVarChar, 10, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "FirstName", System.Data.DataRowVersion.Current, Nothing))
Me.cmdInsertEmployees.Parameters.Add(New System.Data.SqlClient.SqlParameter("@LastName", System.Data.SqlDbType.NVarChar, 20, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "LastName", System.Data.DataRowVersion.Current, Nothing))
'
'btnEdit
'
Me.btnEdit.Location = New System.Drawing.Point(360, 96)
Me.btnEdit.Name = "btnEdit"
Me.btnEdit.TabIndex = 6
Me.btnEdit.Text = "Edit"
'
'btnDefer
'
Me.btnDefer.Location = New System.Drawing.Point(360, 126)
Me.btnDefer.Name = "btnDefer"
Me.btnDefer.TabIndex = 7
Me.btnDefer.Text = "Defer"
'
'btnCmd
'
Me.btnCmd.Location = New System.Drawing.Point(360, 186)
Me.btnCmd.Name = "btnCmd"
Me.btnCmd.TabIndex = 9
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -