📄 gjq_frmdelete.frm
字号:
VERSION 5.00
Begin VB.Form gjq_frmDelete
Caption = "按编号删除员工"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 3195
ScaleWidth = 4680
Begin VB.CommandButton cmdDelete
Caption = "按编号删除"
Height = 495
Left = 1200
TabIndex = 1
Top = 1560
Width = 1215
End
Begin VB.TextBox Text1
Height = 495
Left = 1200
TabIndex = 0
Top = 480
Width = 1575
End
End
Attribute VB_Name = "gjq_frmDelete"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdDelete_Click()
If Text1.Text = "" Then
gjq_Response = MsgBox("请输入要删除员工的编号", vbOKOnly)
Exit Sub
End If
GJQ_strsql = "select * from t_employee where employeeid='" & Trim(Text1.Text) & "'"
Set Dblink.rs = Dblink.executeSQL(GJQ_strsql)
If Dblink.rs.RecordCount > 0 Then
GJQ_strsql = "delete from t_employee where employeeid='" & Trim(Text1.Text) & "'"
Call Dblink.executeSQL(GJQ_strsql)
GJQ_strsql = "select employeeid as 编号,empname as 姓名,sex as 性别,birthday as 生日,knowledge as 学历,cardid as 身份证,department as 部门 from t_employee"
Set gjq_frmmaninfo.MSHFlexGrid1.DataSource = Dblink.executeSQL(GJQ_strsql)
Else
gjq_Response = MsgBox("无此编号员工", vbOKOnly)
End If
End Sub
Private Sub Form_Load()
Text1.Text = gjq_frmmaninfo.MSHFlexGrid1.TextMatrix(gjq_frmmaninfo.MSHFlexGrid1.Row, 1)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -