📄 frmrlzyxt.frm
字号:
Width = 975
End
Begin VB.Label Label12
Caption = "工作时间"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 2760
TabIndex = 19
Top = 960
Width = 975
End
Begin VB.Label Label11
Caption = "职务"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 3000
TabIndex = 18
Top = 1560
Width = 495
End
Begin VB.Label Label10
Caption = "工作证号"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 375
Left = 480
TabIndex = 17
Top = 2160
Width = 975
End
Begin VB.Label Label9
Caption = "职称"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 480
TabIndex = 16
Top = 1560
Width = 495
End
Begin VB.Label Label8
Caption = "年龄"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 480
TabIndex = 15
Top = 960
Width = 495
End
Begin VB.Label Label7
Caption = "性别"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 3000
TabIndex = 14
Top = 360
Width = 495
End
Begin VB.Label Label6
Caption = "姓名"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 480
TabIndex = 13
Top = 360
Width = 615
End
End
Begin VB.CommandButton Command3
BackColor = &H00FF8080&
Cancel = -1 'True
Caption = "添 加"
Height = 375
Left = 13560
Picture = "frmRLZYXT.frx":1897
Style = 1 'Graphical
TabIndex = 2
Top = 2160
UseMaskColor = -1 'True
Width = 975
End
Begin VB.CommandButton Command5
Caption = "删 除"
Height = 375
Left = 13560
Picture = "frmRLZYXT.frx":23BC
Style = 1 'Graphical
TabIndex = 1
Top = 3480
Width = 975
End
Begin VB.Image Image1
Height = 240
Left = 13800
Picture = "frmRLZYXT.frx":2EE1
Top = 720
Width = 240
End
End
Begin VB.Image Image2
Height = 480
Left = 10440
Picture = "frmRLZYXT.frx":3F23
Top = 10560
Width = 480
End
End
Attribute VB_Name = "frmRLZYXT"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim db As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub Command2_Click()
On Error Resume Next
rs.Close
rs.Open "select * from 人力资源查询", db, adOpenStatic, adLockReadOnly
Set DataGrid1.DataSource = Adodc1
End Sub
Private Sub Command3_Click()
If Text3(0) = "" Then
MsgBox "姓名不能为空!", vbExclamation, "提示"
ElseIf Text3(1) = "" Then
MsgBox "职务不能为空!", vbExclamation, "提示"
ElseIf Text2(0) = "" Then
MsgBox "工作证号不能为空!", vbExclamation, "提示"
ElseIf Text2(2) = "" Then
MsgBox "学历或同等学历不能为空!", vbExclamation, "提示"
End If
'GoTo er
If Option1(0).Value = False And Option1(1).Value = False And Option1(2).Value = False And Option1(3).Value = False Then
MsgBox "选择工作记录"
GoTo er
End If
If Option1(0).Value = True Then
On Error Resume Next
rs.Close
rs.Open "insert into 人力资源查询(姓名,性别,年龄,工作时间,职称,职务,工作证号,学力或同等学历,工作经历,考勤记录,工作表现,工作记录)values('" & Trim(Text3(0).Text) & "','" & Trim(Text3(5).Text) & "','" & Trim(Text3(4).Text) & "','" & Trim(Text3(3).Text) & "','" & Trim(Text3(2).Text) & "','" & Trim(Text3(1).Text) & "','" & Trim(Text2(0).Text) & "','" & Trim(Text2(2).Text) & "','" & Trim(Text2(1).Text) & "','" & Combo1.Text & "','" & Combo2.Text & "','" & Option1(0).Caption & "')", db, adOpenStatic, adLockReadOnly
End If
If Option1(1).Value = True Then
On Error Resume Next
rs.Close
rs.Open "insert into 人力资源查询(姓名,性别,年龄,工作时间,职称,职务,工作证号,学力或同等学历,工作经历,考勤记录,工作表现,工作记录)values('" & Trim(Text3(0).Text) & "','" & Trim(Text3(5).Text) & "','" & Trim(Text3(4).Text) & "','" & Trim(Text3(3).Text) & "','" & Trim(Text3(2).Text) & "','" & Trim(Text3(1).Text) & "','" & Trim(Text2(0).Text) & "','" & Trim(Text2(2).Text) & "','" & Trim(Text2(1).Text) & "','" & Combo1.Text & "','" & Combo2.Text & "','" & Option1(1).Caption & "')", db, adOpenStatic, adLockReadOnly
End If
If Option1(2).Value = True Then
On Error Resume Next
rs.Close
rs.Open "insert into 人力资源查询(姓名,性别,年龄,工作时间,职称,职务,工作证号,学力或同等学历,工作经历,考勤记录,工作表现,工作记录)values('" & Trim(Text3(0).Text) & "','" & Trim(Text3(5).Text) & "','" & Trim(Text3(4).Text) & "','" & Trim(Text3(3).Text) & "','" & Trim(Text3(2).Text) & "','" & Trim(Text3(1).Text) & "','" & Trim(Text2(0).Text) & "','" & Trim(Text2(2).Text) & "','" & Trim(Text2(1).Text) & "','" & Combo1.Text & "','" & Combo2.Text & "','" & Option1(2).Caption & "')", db, adOpenStatic, adLockReadOnly
End If
If Option1(3).Value = True Then
On Error Resume Next
rs.Close
rs.Open "insert into 人力资源查询(姓名,性别,年龄,工作时间,职称,职务,工作证号,学力或同等学历,工作经历,考勤记录,工作表现,工作记录)values('" & Trim(Text3(0).Text) & "','" & Trim(Text3(5).Text) & "','" & Trim(Text3(4).Text) & "','" & Trim(Text3(3).Text) & "','" & Trim(Text3(2).Text) & "','" & Trim(Text3(1).Text) & "','" & Trim(Text2(0).Text) & "','" & Trim(Text2(2).Text) & "','" & Trim(Text2(1).Text) & "','" & Combo1.Text & "','" & Combo2.Text & "','" & Option1(3).Caption & "')", db, adOpenStatic, adLockReadOnly
End If
Text3(0) = ""
Text3(5) = ""
Text3(4) = ""
Text3(3) = ""
Text3(2) = ""
Text3(1) = ""
Text2(0) = ""
Text2(2) = ""
Text2(1) = ""
Text3(0).SetFocus
er:
End Sub
Private Sub Command4_Click()
On Error Resume Next
rs.Close
rs.Open "update 货品信息 set 发货单号 ='" & Trim(Text1.Text) & "',开单日期 ='" & DTPicker1.Value & "' where 货品编号='" & Combo1.Text & "'", db, adOpenStatic, adLockReadOnly
' lianjie
End Sub
Private Sub Command5_Click()
On Error Resume Next
rs.Close
rs.Open "delete 人力资源查询 where 姓名='" & Trim(Text3(0).Text) & "'", db, adOpenStatic, adLockReadOnly
End Sub
Private Sub Command6_Click()
Unload Me
End Sub
Private Sub Form_Load()
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
db.ConnectionString = "driver={SQL Server};server=MAINSRV;database=物流系统"
db.Open
rs.Open "select * from 人力资源查询", db, adOpenStatic, adLockReadOnly
Me.Hide
frmRLZYXT.Show
With Adodc1
.ConnectionString = "driver={SQL Server};server=MAINSRV;database=物流系统"
.RecordSource = "select * from 人力资源查询"
End With
Set DataGrid1.DataSource = Adodc1
End Sub
Private Sub Form_Unload(Cancel As Integer)
Me.Hide
MDIPSZX.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -