📄 humanleave.frm
字号:
Caption = "元"
Height = 255
Left = 2640
TabIndex = 24
Top = 1080
Width = 255
End
Begin VB.Label Label14
Caption = "其它工资:"
Height = 255
Left = 3240
TabIndex = 21
Top = 1080
Width = 975
End
Begin VB.Label Label13
Caption = "基本工资:"
Height = 255
Left = 240
TabIndex = 20
Top = 1080
Width = 975
End
Begin VB.Label Label1
Caption = "编 号:"
Height = 255
Left = 240
TabIndex = 12
Top = 360
Width = 975
End
Begin VB.Label Label2
Caption = "工 种:"
Height = 255
Left = 6360
TabIndex = 11
Top = 360
Width = 975
End
Begin VB.Label Label3
Caption = "姓 名:"
Height = 255
Left = 3240
TabIndex = 10
Top = 360
Width = 975
End
Begin VB.Label Label4
Caption = "职 务:"
Height = 255
Left = 6360
TabIndex = 9
Top = 720
Width = 975
End
Begin VB.Label Label5
Caption = "部 门:"
Height = 255
Left = 240
TabIndex = 8
Top = 720
Width = 975
End
Begin VB.Label Label6
Caption = "职 称:"
Height = 255
Left = 6360
TabIndex = 7
Top = 1080
Width = 975
End
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 570
Left = 0
TabIndex = 13
Top = 0
Width = 9525
_ExtentX = 16801
_ExtentY = 1005
ButtonWidth = 820
ButtonHeight = 953
Appearance = 1
Style = 1
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 7
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "查找"
Key = "Select"
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "全部"
Key = "All"
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "离职"
Key = "Leave"
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出"
Key = "Back"
EndProperty
EndProperty
BorderStyle = 1
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 4275
Left = 120
TabIndex = 14
Top = 3600
Width = 9315
_ExtentX = 16431
_ExtentY = 7541
_Version = 393216
Cols = 40
FixedCols = 0
ScrollTrack = -1 'True
SelectionMode = 1
End
End
Attribute VB_Name = "frmHumanLeave"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
MyRefresh_frmHumanLeave
End Sub
Private Sub MSFlexGrid1_Click()
Dim adors As New Recordset
Dim strSQL As String
Set adors.ActiveConnection = ADOcn
Dim mystr As String
MSFlexGrid1.Col = 0
mystr = MSFlexGrid1.Text
strSQL = "Select * From 人事档案 Where 编号='" + mystr + "'"
adors.Open strSQL
If Not adors.EOF Then
txtNum = adors("编号")
txtName = adors("姓名")
txtPart = adors("部门")
txtWorkType = adors("工种")
txtPosition = adors("职务")
txtPost = adors("职称")
txtBWage = Trim(adors("基本工资"))
txtOWage = Trim(adors("其它工资"))
txtWorkAge = Trim(adors("本单位工龄"))
txtRegistDate = Trim(adors("登记日期"))
txtDate = Trim(adors("调入时间"))
End If
End Sub
Private Sub Leave() '新增离职记录
Dim adors As New Recordset
Dim strSQL As String
If MsgBox("确定是当前选择员工要离职吗?", vbInformation + vbYesNo, "询问") = vbYes Then
Set adors.ActiveConnection = ADOcn '从人事档案中调取资料
strSQL = "Select * From 人事档案 Where 编号='" + txtNum + "'"
adors.Open strSQL
If Not adors.EOF Then
If txtLeaveRegister = "" Then
a = MsgBox("请输入离职登记人", vbOKOnly, "提示")
txtLeaveRegister.SetFocus
Else
strSQL = "Insert Into 离职档案(编号,姓名,性别,身份证号,出生年月,民族,婚姻状况,政治面貌,入党团时间,籍贯,家庭地址,联系电话,手机号码,电子邮箱,其它联系方式,参加工作时间,总工龄,自定义项目1,自定义项目2,部门,工种,职务,职称,调入时间,本单位工龄,基本工资,其它工资,毕业院校,专业,文化程度,特长,简历,登记日期,登记人,离职时间,离职登记日期,离职登记人) "
strSQL = strSQL + " Values('" + adors("编号") + "','" + adors("姓名") + "','" + adors("性别") + "','" + adors("身份证号") + "','" + LTrim(adors("出生年月")) + "','" + adors("民族") + "','" + adors("婚姻状况") + "','"
strSQL = strSQL + adors("政治面貌") + "','" + LTrim(adors("入党团时间")) + "','" + adors("籍贯") + "','" + adors("家庭地址") + "','" + adors("联系电话") + "','" + adors("手机号码") + "','" + adors("电子邮箱") + "','"
strSQL = strSQL + adors("其它联系方式") + "','" + LTrim(adors("参加工作时间")) + "'," + LTrim(adors("总工龄")) + ",'" + adors("自定义项目1") + "','" + adors("自定义项目2") + "','" + adors("部门") + "','" + adors("工种") + "','"
strSQL = strSQL + adors("职务") + "','" + adors("职称") + "','" + LTrim(adors("调入时间")) + "'," + LTrim(adors("本单位工龄")) + ",'" + adors("基本工资") + "','" + adors("其它工资") + "','" + adors("毕业院校") + "','" + adors("专业") + "','"
strSQL = strSQL + adors("文化程度") + "','" + adors("特长") + "','" + adors("简历") + "','" + LTrim(adors("登记日期")) + "','" + adors("登记人") + "','" + CStr(DTPLeaveDate.Value) + "','" + CStr(DTPLeaveRegistDate.Value) + "','" + txtLeaveRegister + "')"
ADOcn.Execute strSQL
strSQL = "Delete From 人事档案 Where 编号='" + txtNum + "'" '从人事档案中删除
ADOcn.Execute strSQL
a = MsgBox("操作处理完成!", vbOKOnly, "提示")
End If
End If
End If
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
On Error Resume Next
Select Case Button.Key
Case "Select"
Search = 4
frmSelect.Show
Case "All"
MyRefresh_frmHumanLeave
Case "Leave"
Leave
MyRefresh_frmHumanLeave
Case "Back"
Unload Me
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -