GongZi.frm
资源名称:20080403.rar [点击查看]
上传用户:linhua1013
上传日期:2014-12-05
资源大小:375k
文件大小:28k
源码类别:
SQL Server
开发平台:
Visual Basic
- VERSION 5.00
- Begin VB.Form GongZi
- Caption = "Form1"
- ClientHeight = 7155
- ClientLeft = 60
- ClientTop = 450
- ClientWidth = 5670
- LinkTopic = "Form1"
- MDIChild = -1 'True
- ScaleHeight = 7155
- ScaleWidth = 5670
- Begin VB.CommandButton Command2
- Caption = "上 一 条"
- Height = 375
- Left = 120
- TabIndex = 47
- Top = 6720
- Width = 1095
- End
- Begin VB.CommandButton Command1
- Caption = "下 一 条"
- Height = 375
- Left = 4440
- TabIndex = 46
- Top = 6720
- Width = 1095
- End
- Begin VB.CommandButton QuXiao_GongZi
- Caption = "取 消"
- Height = 375
- Left = 3240
- TabIndex = 35
- Top = 6720
- Width = 1095
- End
- Begin VB.CommandButton QueDing_GongZi
- Caption = "修 改"
- Height = 375
- Left = 1320
- TabIndex = 34
- Top = 6720
- Width = 1095
- End
- Begin VB.Frame Frame1
- Height = 6495
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 5415
- Begin VB.Frame Frame6
- Caption = "实际工资项"
- Height = 1095
- Left = 120
- TabIndex = 24
- Top = 4920
- Width = 5175
- Begin VB.CommandButton JiSuan_GongZi
- Caption = "计算工资"
- Enabled = 0 'False
- Height = 375
- Left = 3360
- TabIndex = 45
- Top = 165
- Width = 975
- End
- Begin VB.ComboBox TexNian_GongZi
- Height = 300
- ItemData = "GongZi.frx":0000
- Left = 1200
- List = "GongZi.frx":0002
- TabIndex = 30
- Text = "1990"
- Top = 650
- Width = 975
- End
- Begin VB.ComboBox TexYue_GongZi
- Height = 300
- Left = 2520
- TabIndex = 29
- Text = "1"
- Top = 650
- Width = 735
- End
- Begin VB.ComboBox TexRi_GongZi
- Height = 300
- Left = 3600
- TabIndex = 28
- Text = "1"
- Top = 650
- Width = 735
- End
- Begin VB.TextBox Text_GongZi
- Enabled = 0 'False
- Height = 270
- Index = 10
- Left = 1200
- TabIndex = 26
- Top = 300
- Width = 1095
- End
- Begin VB.Label Label19
- AutoSize = -1 'True
- Caption = "*"
- ForeColor = &H008080FF&
- Height = 180
- Left = 4680
- TabIndex = 44
- Top = 705
- Width = 90
- End
- Begin VB.Label Label16
- AutoSize = -1 'True
- Caption = "年"
- Height = 180
- Left = 2200
- TabIndex = 33
- Top = 705
- Width = 180
- End
- Begin VB.Label Label17
- AutoSize = -1 'True
- Caption = "月"
- Height = 180
- Left = 3280
- TabIndex = 32
- Top = 705
- Width = 180
- End
- Begin VB.Label Label20
- AutoSize = -1 'True
- Caption = "日"
- Height = 180
- Left = 4380
- TabIndex = 31
- Top = 705
- Width = 180
- End
- Begin VB.Label Label13
- AutoSize = -1 'True
- Caption = "计算时间:"
- Height = 180
- Left = 240
- TabIndex = 27
- Top = 720
- Width = 900
- End
- Begin VB.Label Label11
- AutoSize = -1 'True
- Caption = "总工资:"
- Height = 180
- Left = 360
- TabIndex = 25
- Top = 360
- Width = 720
- End
- End
- Begin VB.Frame Frame5
- Caption = "扣除项"
- Height = 1575
- Left = 120
- TabIndex = 15
- Top = 3240
- Width = 5175
- Begin VB.TextBox Text_GongZi
- Height = 270
- Index = 9
- Left = 1440
- TabIndex = 42
- Top = 1140
- Width = 1455
- End
- Begin VB.TextBox Text_GongZi
- Enabled = 0 'False
- Height = 270
- Index = 8
- Left = 3840
- TabIndex = 23
- Top = 720
- Width = 975
- End
- Begin VB.TextBox Text_GongZi
- Enabled = 0 'False
- Height = 270
- Index = 7
- Left = 1440
- TabIndex = 21
- Top = 720
- Width = 975
- End
- Begin VB.TextBox Text_GongZi
- Enabled = 0 'False
- Height = 270
- Index = 6
- Left = 3840
- TabIndex = 19
- Top = 300
- Width = 975
- End
- Begin VB.TextBox Text_GongZi
- Enabled = 0 'False
- Height = 270
- Index = 5
- Left = 1440
- TabIndex = 17
- Top = 300
- Width = 975
- End
- Begin VB.Label Label15
- AutoSize = -1 'True
- Caption = "个人所得税:"
- Height = 180
- Left = 240
- TabIndex = 41
- Top = 1200
- Width = 1080
- End
- Begin VB.Label Label10
- AutoSize = -1 'True
- Caption = "医疗保险:"
- Height = 180
- Left = 2760
- TabIndex = 22
- Top = 780
- Width = 900
- End
- Begin VB.Label Label9
- AutoSize = -1 'True
- Caption = "社会保险:"
- Height = 180
- Left = 360
- TabIndex = 20
- Top = 780
- Width = 900
- End
- Begin VB.Label Label8
- AutoSize = -1 'True
- Caption = "养老保险:"
- Height = 180
- Left = 2760
- TabIndex = 18
- Top = 360
- Width = 900
- End
- Begin VB.Label Label7
- AutoSize = -1 'True
- Caption = "考勤扣核项:"
- Height = 180
- Left = 240
- TabIndex = 16
- Top = 360
- Width = 1080
- End
- End
- Begin VB.Frame Frame4
- Caption = "奖金项"
- Height = 735
- Left = 120
- TabIndex = 10
- Top = 2400
- Width = 5175
- Begin VB.TextBox Text_GongZi
- Enabled = 0 'False
- Height = 270
- Index = 4
- Left = 1200
- TabIndex = 14
- Top = 300
- Width = 1095
- End
- Begin VB.TextBox Text_GongZi
- Enabled = 0 'False
- Height = 270
- Index = 3
- Left = 3480
- TabIndex = 12
- Top = 300
- Width = 855
- End
- Begin VB.Label Label6
- AutoSize = -1 'True
- Caption = "加班费:"
- Height = 180
- Left = 360
- TabIndex = 13
- Top = 360
- Width = 720
- End
- Begin VB.Label Label5
- AutoSize = -1 'True
- Caption = "补贴:"
- Height = 180
- Left = 2760
- TabIndex = 11
- Top = 360
- Width = 540
- End
- End
- Begin VB.Frame Frame3
- Caption = "基本工资项"
- Height = 735
- Left = 120
- TabIndex = 5
- Top = 1560
- Width = 5175
- Begin VB.TextBox Text_GongZi
- Enabled = 0 'False
- Height = 270
- Index = 2
- Left = 3480
- TabIndex = 9
- Top = 315
- Width = 1095
- End
- Begin VB.TextBox Text_GongZi
- Enabled = 0 'False
- Height = 270
- Index = 1
- Left = 1320
- TabIndex = 7
- Top = 315
- Width = 1095
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "奖金:"
- Height = 180
- Left = 2760
- TabIndex = 8
- Top = 360
- Width = 540
- End
- Begin VB.Label Label3
- AutoSize = -1 'True
- Caption = "基本工资:"
- Height = 180
- Left = 240
- TabIndex = 6
- Top = 360
- Width = 900
- End
- End
- Begin VB.Frame Frame2
- Caption = "基本信息"
- Height = 1215
- Left = 120
- TabIndex = 1
- Top = 240
- Width = 5175
- Begin VB.TextBox ZhiWei_GoZi
- Enabled = 0 'False
- Height = 270
- Left = 3720
- TabIndex = 40
- Top = 800
- Width = 1335
- End
- Begin VB.TextBox BuMen_GoZi
- Enabled = 0 'False
- Height = 270
- Left = 1080
- TabIndex = 38
- Top = 800
- Width = 1455
- End
- Begin VB.ComboBox YGbianhao_GongZi
- Height = 300
- Left = 1080
- TabIndex = 36
- Top = 300
- Width = 1455
- End
- Begin VB.TextBox XingMing_GongZi
- Height = 270
- Left = 3840
- TabIndex = 4
- Top = 300
- Width = 1215
- End
- Begin VB.Label Label18
- AutoSize = -1 'True
- Caption = "*"
- ForeColor = &H008080FF&
- Height = 180
- Left = 2640
- TabIndex = 43
- Top = 360
- Width = 90
- End
- Begin VB.Label Label14
- AutoSize = -1 'True
- Caption = "工作职位:"
- Height = 180
- Left = 2760
- TabIndex = 39
- Top = 840
- Width = 900
- End
- Begin VB.Label Label12
- AutoSize = -1 'True
- Caption = "工作部门:"
- Height = 180
- Left = 120
- TabIndex = 37
- Top = 840
- Width = 900
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "员工姓名:"
- Height = 180
- Left = 2880
- TabIndex = 3
- Top = 360
- Width = 900
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "员工编号:"
- Height = 180
- Left = 120
- TabIndex = 2
- Top = 360
- Width = 900
- End
- End
- Begin VB.Label Label23
- AutoSize = -1 'True
- Caption = "条记录"
- Height = 180
- Left = 4320
- TabIndex = 50
- Top = 6120
- Width = 540
- End
- Begin VB.Label TiaoShu_GZ
- AutoSize = -1 'True
- Height = 180
- Left = 4080
- TabIndex = 49
- Top = 6120
- Width = 90
- End
- Begin VB.Label Label21
- AutoSize = -1 'True
- Caption = "一共"
- Height = 180
- Left = 3600
- TabIndex = 48
- Top = 6120
- Width = 360
- End
- End
- End
- Attribute VB_Name = "GongZi"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim LieShu_GongZi As Integer
- Dim NianShu_GongZi As Integer
- Dim YueShu_GongZi As Integer
- Dim RiShu_GongZi As Integer
- Dim QueDingShu As Integer
- Dim RiQi1 As String
- Dim RiQi2 As String
- 'Dim SQLstr As String
- Dim KouChu As Integer
- Dim DengJi As Integer
- Dim LShbiao_GZ As New ADODB.Recordset
- Private Sub Command1_Click()
- GongZibiaoCZ.MoveNext
- If GongZibiaoCZ.EOF Then GongZibiaoCZ.MovePrevious
- textFuZhi_GongZi
- End Sub
- Private Sub Command2_Click()
- GongZibiaoCZ.MovePrevious
- If GongZibiaoCZ.BOF Then GongZibiaoCZ.MoveNext
- textFuZhi_GongZi
- End Sub
- Private Sub Form_Load()
- Me.Height = 7620
- Me.Width = 5790
- NianShu_GongZi = 1980
- Do While NianShu_GongZi < 2006
- TexNian_GongZi.AddItem NianShu_GongZi
- NianShu_GongZi = NianShu_GongZi + 1
- Loop
- For YueShu_GongZi = 1 To 12
- TexYue_GongZi.AddItem YueShu_GongZi
- Next YueShu_GongZi
- For RiShu_GongZ = 1 To 31
- TexRi_GongZi.AddItem RiShu_GongZ
- Next RiShu_GongZ
- If GongZibiaoCZ.State = adStateOpen Then GongZibiaoCZ.Close
- GongZibiaoCZ.Open "select * from pay", MySQL, adOpenKeyset, adLockPessimistic
- If LShbiao_GZ.State = adStateOpen Then LShbiao_GZ.Close
- LShbiao_GZ.Open "select gzid from pay group by gzid", MySQL, adOpenKeyset, adLockPessimistic
- ' Set YGbianhao_GongZi.RowSource = GongZibiaoCZ
- ' YGbianhao_GongZi.BoundColumn = "员工编号"
- ' YGbianhao_GongZi.ListField = "员工编号"
- If GongZiChK_PD Then
- YGbianhaoFuZhi_GongZi
- GongZi.Caption = "查看员工工资信息"
- QueDing_GongZi.Visible = False
- QuXiao_GongZi.Left = 2400
- JiSuan_GongZi.Visible = False
- textFuZhi_GongZi
- ' ElseIf GongZiXG_PD Then
- ' YGbianhaoFuZhi_GongZi
- ' GongZi.Caption = "修改员工工资信息"
- ' QueDing_GongZi.Caption = "修 改"
- ' textFuZhi_GongZi
- ElseIf GongZiShCh_PD Then
- YGbianhaoFuZhi_GongZi
- GongZi.Caption = "删除员工工资信息"
- QueDing_GongZi.Caption = "删 除"
- JiSuan_GongZi.Visible = False
- textFuZhi_GongZi
- ElseIf GongZiTJ_PD Then
- YGbianhaoFuZhi_GongZi
- GongZi.Caption = "添加员工工资信息"
- QueDing_GongZi.Caption = "添 加"
- Label21.Visible = False: TiaoShu_GZ.Visible = False: Label23.Visible = False
- Command2.Visible = False
- Command1.Visible = False
- ' Text_GongZi(1).Enabled = False
- ' Text_GongZi(5).Enabled = False
- ' Text_GongZi(6).Enabled = False
- End If
- End Sub
- Sub YGbianhaoFuZhi_GongZi()
- If GongZiTJ_PD Then
- If ChaKanJB.State = adStateOpen Then ChaKanJB.Close
- ChaKanJB.Open "select ygid from manrecord", MySQL, adOpenKeyset, adLockPessimistic
- Do While Not ChaKanJB.EOF
- YGbianhao_GongZi.AddItem ChaKanJB.Fields(0)
- ChaKanJB.MoveNext
- Loop
- Else
- Do While Not LShbiao_GZ.EOF
- YGbianhao_GongZi.AddItem LShbiao_GZ.Fields(0)
- LShbiao_GZ.MoveNext
- Loop
- ' LShbiao_GZ.MoveFirst
- End If
- End Sub
- Sub textFuZhi_GongZi()
- For LieShu_GongZi = 1 To 10
- If GongZibiaoCZ.Fields(LieShu_GongZi) <> "" Then
- Text_GongZi(LieShu_GongZi) = GongZibiaoCZ.Fields(LieShu_GongZi)
- Else
- Text_GongZi(LieShu_GongZi) = ""
- End If
- Next LieShu_GongZi
- YGbianhao_GongZi.Text = GongZibiaoCZ.Fields(0)
- JiBen_GongZi
- RiQiFuZhi (Trim(Str(GongZibiaoCZ.Fields(11))))
- TexNian_GongZi.Text = Nian
- TexYue_GongZi.Text = Yue
- RishuBH
- ' TexRi_GongZi.Text = Ri
- TiaoShu_GZ.Caption = GongZibiaoCZ.RecordCount
- End Sub
- Sub RishuBH()
- TexRi_GongZi.Clear
- For RiShu_GongZi = 1 To RiShu
- TexRi_GongZi.AddItem RiShu_GongZi
- Next RiShu_GongZi
- TexRi_GongZi.Text = Ri
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- If GongZibiaoCZ.State = adStateOpen Then GongZibiaoCZ.Close
- If ChaKanJB.State = adStateOpen Then ChaKanJB.Close
- If KQbiaoCZ.State = adStateOpen Then KQbiaoCZ.Close
- Set GongZibiaoCZ = Nothing
- Set ChaKanJB = Nothing
- Set KQbiaoCZ = Nothing
- End Sub
- Private Sub JiSuan_GongZi_Click()
- QueDingShu = MsgBox("请确定你所选择的员工编号和计算时间!", 67, "公司员工管理系统")
- If QueDingShu = 6 Then
- ' DengJibiaoCZ.CursorLocation = adUseClient
- If DengJibiaoCZ.State = adStateOpen Then DengJibiaoCZ.Close
- DengJibiaoCZ.Open "select Djgrading from ranking where DJbusi='" & ZhiWei_GoZi & "'", MySQL, adOpenKeyset, adLockPessimistic
- If DengJibiaoCZ.RecordCount = 0 Then
- MsgBox "此职位不存在于职位等级表中!请添加相关项!", 48, "公司员工管理系统"
- Exit Sub
- Else
- DengJi = DengJibiaoCZ.Fields(0)
- Text_GongZi(1) = 800 * DengJibiaoCZ.Fields(0)
- Text_GongZi(3) = 10 * DengJibiaoCZ.Fields(0)
- Text_GongZi(6) = Val(Text_GongZi(1)) * 0.05
- Text_GongZi(7) = Val(Text_GongZi(1)) * 0.02
- Text_GongZi(8) = Val(Text_GongZi(1)) * 0.03
- End If
- RiQi1 = Trim(TexNian_GongZi.Text) & "-" & Trim(TexYue_GongZi.Text) & "-" & 1
- RiQi1 = Format(RiQi1, "yyyy-m-d")
- RiQi2 = Trim(TexNian_GongZi.Text) & "-" & Trim(TexYue_GongZi.Text) & "-" & Trim(TexRi_GongZi)
- RiQi2 = Format(RiQi2, "yyyy-m-d")
- SQLstr = "select * from checkin where kqid='" & YGbianhao_GongZi & "'and (kqdata>='" & RiQi1 & "'and kqdata<='" & RiQi2 & "') "
- If KQbiaoCZ.State = adStateOpen Then KQbiaoCZ.Close
- KQbiaoCZ.Open SQLstr, MySQL, adOpenKeyset, adLockPessimistic
- If KQbiaoCZ.RecordCount = 0 Then
- ' Text_GongZi(2) = 100
- Text_GongZi(4) = 0
- Text_GongZi(5) = 0
- Else
- Do While Not KQbiaoCZ.EOF
- If GuiZebiaoCZ.State = adStateOpen Then GuiZebiaoCZ.Close: Set GuiZebiaoCZ = Nothing
- GuiZebiaoCZ.Open "select gdmoney,gdrank,gdjiajian from regulate where gdterm='" & KQbiaoCZ.Fields(1) & "'", MySQL, adOpenKeyset, adLockPessimistic
- If GuiZebiaoCZ.RecordCount = 0 Then
- MsgBox "规则表里没有相关奖罚规定!请添加相关规定!", 48, "公司员工管理系统"
- Exit Sub
- Else
- If GuiZebiaoCZ.Fields(2) = 1 Then
- Text_GongZi(4) = Val(Text_GongZi(4)) + GuiZebiaoCZ.Fields(0)
- Else
- If GuiZebiaoCZ.Fields(1) = 1 Then
- Text_GongZi(5) = Val(Text_GongZi(5)) + Val(GuiZebiaoCZ.Fields(0)) * DengJi
- Else
- Text_GongZi(5) = Val(Text_GongZi(5)) + Val(GuiZebiaoCZ.Fields(0))
- End If
- End If
- End If
- KQbiaoCZ.MoveNext
- Loop
- End If
- If Text_GongZi(5) = Str(0) Or Text_GongZi(5) = "" Then
- Text_GongZi(2) = 100
- Else
- Text_GongZi(2) = 0
- End If
- If Val(Text_GongZi(1)) > 1000 Then
- Text_GongZi(9) = Val(Text_GongZi(1)) * 0.08
- Else
- Text_GongZi(9) = 0
- End If
- Text_GongZi(10) = Val(Text_GongZi(1)) + Val(Text_GongZi(2)) + Val(Text_GongZi(3)) + Val(Text_GongZi(4)) - Val(Text_GongZi(5)) - Val(Text_GongZi(6)) _
- - Val(Text_GongZi(7)) - Val(Text_GongZi(8)) - Val(Text_GongZi(9))
- ' KQjisuan
- ' If KQbiaoCZ.RecordCount <> 0 Then KouChu = KouChu + 10 * KQbiaoCZ.RecordCount
- ' SQLstr = "select * from checkin where kqid='" & YGbianhao_GongZi & "'and kqoutline='迟到' and (kqdata>='" & RiQi1 & "'and kqdata<='" & RiQi2 & "') "
- ' KQjisuan
- ' If KQbiaoCZ.RecordCount <> 0 Then KouChu = KouChu + 20 * KQbiaoCZ.RecordCount
- ' SQLstr = "select * from checkin where kqid='" & YGbianhao_GongZi & "'and kqoutline='早退' and (kqdata>='" & RiQi1 & "'and kqdata<='" & RiQi2 & "') "
- ' KQjisuan
- ' If KQbiaoCZ.RecordCount <> 0 Then KouChu = KouChu + 30 * KQbiaoCZ.RecordCount
- ' SQLstr = "select * from checkin where kqid='" & YGbianhao_GongZi & "'and kqoutline='旷工' and (kqdata>='" & RiQi1 & "'and kqdata<='" & RiQi2 & "') "
- ' KQjisuan
- ' If KQbiaoCZ.RecordCount <> 0 Then KouChu = KouChu + 50 * KQbiaoCZ.RecordCount
- End If
- End Sub
- Private Sub QueDing_GongZi_Click()
- ' If QueDing_GongZi.Caption = "修 改" Then
- ' QueDingShu = MsgBox("确定修改相关项吗?", 51, "公司员工管理系统")
- ' If QueDingShu = 6 Then
- ' If YGbianhao_GongZi.Text <> GongZibiaoCZ.Fields(0) Then
- ' MsgBox "不能修改员工编号!", 48, "公司员工管理系统"
- ' Exit Sub
- ' End If
- ' ShuJuFuZhi_GongZi
- ' GongZibiaoCZ.Update
- ' End If
- If QueDing_GongZi.Caption = "删 除" Then
- QueDingShu = MsgBox("确定删除此条记录么?", 51, "公司员工管理系统")
- If QueDingShu = 6 Then
- GongZibiaoCZ.Delete
- GongZibiaoCZ.MoveFirst
- textFuZhi_GongZi
- End If
- ElseIf QueDing_GongZi.Caption = "添 加" Then
- QueDingShu = MsgBox("确定添加此条记录吗?", 51, "公司员工管理系统")
- If QueDingShu = 6 Then
- ' If ChaKanJB.State = adStateOpen Then ChaKanJB.Close
- ' ChaKanJB.Open "select ygid from manrecord where ygid='" & YGbianhao_GongZi & "'", MySQL, adOpenKeyset, adLockPessimistic
- ' If ChaKanJB.RecordCount = -1 Then
- ' MsgBox "不存在此编号员工的基本信息!" & vbCrLf & "请先添加此编号的员工基本信息!", 48, "公司员工管理系统"
- ' Exit Sub
- ' End If
- If GongZibiaoCZ.State = adStateOpen Then GongZibiaoCZ.Close
- GongZibiaoCZ.Open "select gzdata from pay where gzid='" & YGbianhao_GongZi & "'", MySQL, adOpenKeyset, adLockPessimistic
- If GongZibiaoCZ.RecordCount <> 0 Then
- Do While Not GongZibiaoCZ.EOF
- RiQiFuZhi (GongZibiaoCZ.Fields("gzdata"))
- If TexNian_GongZi = Nian And TexYue_GongZi = Yue Then
- MsgBox "此编号员工的这个月工资信息已经存在!", 48, "公司员工管理系统"
- Exit Sub
- Else
- GongZibiaoCZ.MoveNext
- End If
- Loop
- End If
- If GongZibiaoCZ.State = adStateOpen Then GongZibiaoCZ.Close
- GongZibiaoCZ.Open "pay", MySQL, adOpenKeyset, adLockPessimistic
- GongZibiaoCZ.AddNew
- ShuJuFuZhi_GongZi
- GongZibiaoCZ.Update
- End If
- End If
- End Sub
- Private Sub QuXiao_GongZi_Click()
- Unload Me
- End Sub
- Private Sub TexNian_GongZi_Click()
- RiShu = RiJS(Trim(TexNian_GongZi), Trim(TexYue_GongZi))
- RishuBH
- End Sub
- 'Private Sub Text_GongZi_Change(Index As Integer)
- ' If Index <> 1 Then
- ' Text_GongZi(10) = Val(Trim(Text_GongZi(2))) + Val(Trim(Text_GongZi(3))) + Val(Trim(Text_GongZi(4))) _
- ' + Val(Trim(Text_GongZi(5))) - Val(Trim(Text_GongZi(6))) - Val(Trim(Text_GongZi(7))) - Val(Trim(Text_GongZi(8))) - Val(Trim(Text_GongZi(9)))
- ' Text_GongZi(11) = Text_GongZi(10)
- ' End If
- 'End Sub
- Private Sub TexYue_GongZi_Click()
- RiShu = RiJS(Trim(TexNian_GongZi), Trim(TexYue_GongZi))
- RishuBH
- End Sub
- Private Sub YGbianhao_GongZi_Click()
- If GongZiTJ_PD Then
- ' If ChaKanJB.State = adStateOpen Then ChaKanJB.Close
- ' ChaKanJB.Open "select ygname from manrecord where ygid='" & YGbianhao_GongZi & "'", MySQL, adOpenKeyset, adLockPessimistic
- ' Text_GongZi(1).Text = ChaKanJB.Fields(0)
- JiBen_GongZi
- JiSuan_GongZi.Enabled = True
- Else
- If GongZibiaoCZ.State = adStateOpen Then GongZibiaoCZ.Close
- GongZibiaoCZ.Open "select * from pay where gzid='" & YGbianhao_GongZi & "'", MySQL, adOpenKeyset, adLockPessimistic
- textFuZhi_GongZi
- End If
- End Sub
- Sub ShuJuFuZhi_GongZi()
- For LieShu_GongZi = 1 To 10
- GongZibiaoCZ.Fields(LieShu_GongZi) = Trim(Text_GongZi(LieShu_GongZi))
- Next LieShu_GongZi
- GongZibiaoCZ.Fields(0) = YGbianhao_GongZi.Text
- GongZibiaoCZ.Fields(11) = Trim(TexNian_GongZi) & "-" & Trim(TexYue_GongZi) & "-" & Trim(TexRi_GongZi)
- End Sub
- Sub JiBen_GongZi()
- If ChaKanJB.State = adStateOpen Then ChaKanJB.Close
- ChaKanJB.Open "select ygname from manrecord where ygid='" & YGbianhao_GongZi & "'", MySQL, adOpenKeyset, adLockPessimistic
- If ChaKanJB.RecordCount = 0 Then
- MsgBox "没有此编号的员工基本信息!请先添加相关的员工基本信息!", 48, "公司员工管理系统"
- JiSuan_GongZi.Enabled = False
- Exit Sub
- Else
- XingMing_GongZi = ChaKanJB.Fields(0)
- End If
- If GZbiaoCZ.State = adStateOpen Then GZbiaoCZ.Close
- GZbiaoCZ.Open "select wdept,wbusi from manappraise where wid='" & YGbianhao_GongZi & "'", MySQL, adOpenKeyset, adLockPessimistic
- If GZbiaoCZ.RecordCount = 0 Then
- MsgBox "没有此编号的员工工作信息!请先添加相关的员工工作信息!", 48, "公司员工管理系统"
- BuMen_GoZi = ""
- ZhiWei_GoZi = ""
- JiSuan_GongZi.Enabled = False
- Exit Sub
- Else
- BuMen_GoZi = GZbiaoCZ.Fields(0)
- ZhiWei_GoZi = GZbiaoCZ.Fields(1)
- End If
- End Sub
- Private Sub YGbianhao_GongZi_LostFocus()
- JiSuan_GongZi.Enabled = True
- JiBen_GongZi
- End Sub
- 'Sub KQjisuan()
- ' If KQbiaoCZ.State = adStateOpen Then KQbiaoCZ.Close: Set KQbiaoCZ = Nothing
- ' KQbiaoCZ.Open SQLstr, MySQL, adOpenKeyset, adLockPessimistic
- 'End Sub