📄 humanrework.frm
字号:
Top = 1080
Width = 375
End
Begin VB.Label Label17
Caption = "本单位工龄:"
Height = 255
Left = 120
TabIndex = 20
Top = 1440
Width = 1215
End
Begin VB.Label Label18
Caption = "登记日期:"
Height = 255
Left = 3240
TabIndex = 19
Top = 1440
Width = 1095
End
Begin VB.Label Label19
Caption = "调入时间:"
Height = 255
Left = 6360
TabIndex = 18
Top = 1440
Width = 975
End
Begin VB.Label Label20
Caption = "年"
Height = 255
Left = 2640
TabIndex = 17
Top = 1440
Width = 255
End
End
Begin VB.Frame Frame2
Caption = "离职信息:"
Height = 855
Left = 120
TabIndex = 0
Top = 600
Width = 9255
Begin VB.TextBox txtLeaveRegistDate
Height = 270
Left = 4320
TabIndex = 41
Top = 360
Width = 1695
End
Begin VB.TextBox txtLeaveDate
Height = 270
Left = 1200
TabIndex = 40
Top = 360
Width = 1575
End
Begin VB.TextBox txtLeaveRegister
Height = 270
Left = 7440
Locked = -1 'True
TabIndex = 1
Top = 360
Width = 1575
End
Begin VB.Label Label7
Caption = "离职时间:"
Height = 255
Left = 240
TabIndex = 4
Top = 360
Width = 975
End
Begin VB.Label Label9
Caption = "离职登记日期:"
Height = 255
Left = 2880
TabIndex = 3
Top = 360
Width = 1575
End
Begin VB.Label Label11
Caption = "离职登记人:"
Height = 255
Left = 6240
TabIndex = 2
Top = 360
Width = 1215
End
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 570
Left = 0
TabIndex = 31
Top = 0
Width = 9465
_ExtentX = 16695
_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 = "Rework"
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 = 3315
Left = 120
TabIndex = 32
Top = 4320
Width = 9315
_ExtentX = 16431
_ExtentY = 5847
_Version = 393216
Cols = 40
FixedCols = 0
ScrollTrack = -1 'True
SelectionMode = 1
End
End
Attribute VB_Name = "frmHumanRework"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
MyRefresh_frmHumanRework
Dim colWidth As Integer
colWidth = MSFlexGrid1.Width / 37
For i = 0 To 36
MSFlexGrid1.colWidth(i) = colWidth * 5
Next
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 = 3
mystr = MSFlexGrid1.Text
strSQL = "Select * From 离职档案 Where 编号='" + mystr + "'and 是否复职=false "
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("调入时间"))
txtLeaveDate = Trim(adors("离职时间"))
txtLeaveRegistDate = Trim(adors("离职登记日期"))
txtLeaveRegister = adors("离职登记人")
End If
End Sub
Private Sub Rework() '修改离职记录
Dim adors As New Recordset
Dim strSQL As String
If MsgBox("确定是当前选择员工要复职吗?", vbInformation + vbYesNo, "询问") = vbYes Then
Set adors.ActiveConnection = ADOcn '从离职档案中调取资料
strSQL = "Select * From 离职档案 Where 编号='" + txtNum + "'and 是否复职=false "
adors.Open strSQL
If Not adors.EOF Then
If txtReworkRegister = "" Then
a = MsgBox("请输入复职登记人", vbOKOnly, "提示")
txtReworkRegister.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("登记人") + "')"
ADOcn.Execute strSQL
strSQL = "Update 离职档案 Set 复职时间= '" + CStr(DTPReworkDate.Value) + "',复职登记日期='" + CStr(DTPReworkRegistDate.Value) + "',复职登记人='" + txtReworkRegister + "',是否复职=true"
strSQL = strSQL + " 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 = 6
ComboAddItem
frmSelect.Show
Case "All"
MyRefresh_frmHumanRework
Case "Rework"
Rework
MyRefresh_frmHumanRework
Case "Back"
Unload Me
End Select
End Sub
Private Sub ComboAddItem()
frmSelect.comboyiju.AddItem ("离职时间")
frmSelect.comboyiju.AddItem ("离职登记日期")
frmSelect.comboyiju.AddItem ("离职登记人员")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -