📄 main_gzgl_gzgl_lr.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form main_gzgl_gzgl_lr
BorderStyle = 3 'Fixed Dialog
Caption = "工资信息修改"
ClientHeight = 3375
ClientLeft = 45
ClientTop = 330
ClientWidth = 9435
Icon = "main_gzgl_gzgl_lr.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 3375
ScaleWidth = 9435
ShowInTaskbar = 0 'False
Begin VB.CommandButton Command3
Caption = "计算"
Height = 390
Left = 1650
TabIndex = 37
Top = 2820
Width = 1950
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 390
Left = 5895
TabIndex = 36
Top = 2820
Width = 1950
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 390
Left = 3780
TabIndex = 35
Top = 2820
Width = 1950
End
Begin VB.Frame Frame1
Height = 2730
Left = 15
TabIndex = 0
Top = -45
Width = 9420
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 330
Index = 16
Left = 4380
Locked = -1 'True
TabIndex = 32
Top = 2175
Width = 1845
End
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 330
Index = 15
Left = 1425
TabIndex = 30
Top = 2175
Width = 1845
End
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 330
Index = 14
Left = 7365
TabIndex = 29
Top = 1785
Width = 1845
End
Begin VB.TextBox Text1
Height = 330
Index = 13
Left = 4380
TabIndex = 27
Top = 1785
Width = 1845
End
Begin VB.TextBox Text1
Height = 330
Index = 12
Left = 1425
TabIndex = 25
Top = 1785
Width = 1845
End
Begin VB.TextBox Text1
Height = 330
Index = 11
Left = 7365
TabIndex = 23
Top = 1410
Width = 1845
End
Begin VB.TextBox Text1
Height = 330
Index = 10
Left = 4380
TabIndex = 21
Top = 1410
Width = 1845
End
Begin VB.TextBox Text1
Height = 330
Index = 9
Left = 1425
TabIndex = 19
Top = 1410
Width = 1845
End
Begin VB.TextBox Text1
Height = 330
Index = 8
Left = 7365
TabIndex = 18
Top = 1035
Width = 1845
End
Begin VB.TextBox Text1
Height = 330
Index = 7
Left = 4380
TabIndex = 16
Top = 1035
Width = 1845
End
Begin VB.TextBox Text1
Height = 330
Index = 6
Left = 1425
TabIndex = 14
Top = 1035
Width = 1845
End
Begin VB.TextBox Text1
Height = 330
Index = 5
Left = 7365
TabIndex = 12
Top = 660
Width = 1845
End
Begin VB.TextBox Text1
Height = 330
Index = 4
Left = 4380
TabIndex = 10
Top = 660
Width = 1845
End
Begin VB.TextBox Text1
Height = 330
Index = 3
Left = 1425
TabIndex = 8
Top = 660
Width = 1845
End
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 330
Index = 2
Left = 7365
TabIndex = 6
Top = 285
Width = 1845
End
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 330
Index = 1
Left = 4380
TabIndex = 4
Top = 285
Width = 1845
End
Begin VB.TextBox Text1
Height = 330
Index = 0
Left = 1425
Locked = -1 'True
TabIndex = 2
Top = 285
Width = 1845
End
Begin VB.Label Label1
Caption = "实发工资:"
Height = 210
Index = 16
Left = 3420
TabIndex = 34
Top = 2265
Width = 900
End
Begin VB.Label Label1
Caption = "应扣工资:"
Height = 210
Index = 15
Left = 465
TabIndex = 33
Top = 2250
Width = 1005
End
Begin VB.Label Label1
Caption = "应发工资:"
Height = 210
Index = 14
Left = 6405
TabIndex = 31
Top = 1875
Width = 945
End
Begin VB.Label Label1
Caption = "医疗保险:"
Height = 210
Index = 13
Left = 3420
TabIndex = 28
Top = 1875
Width = 1005
End
Begin VB.Label Label1
Caption = "失业保险:"
Height = 210
Index = 12
Left = 450
TabIndex = 26
Top = 1860
Width = 945
End
Begin VB.Label Label1
Caption = "养老保险:"
Height = 210
Index = 11
Left = 6405
TabIndex = 24
Top = 1485
Width = 915
End
Begin VB.Label Label1
Caption = "惩罚总额:"
Height = 210
Index = 10
Left = 3420
TabIndex = 22
Top = 1485
Width = 1005
End
Begin VB.Label Label1
Caption = "请假扣除:"
Height = 210
Index = 9
Left = 435
TabIndex = 20
Top = 1485
Width = 960
End
Begin VB.Label Label1
Caption = "职务津贴:"
Height = 210
Index = 8
Left = 6405
TabIndex = 17
Top = 1110
Width = 1005
End
Begin VB.Label Label1
Caption = "奖励总额:"
Height = 210
Index = 7
Left = 3420
TabIndex = 15
Top = 1110
Width = 945
End
Begin VB.Label Label1
Caption = "全勤奖:"
Height = 210
Index = 6
Left = 630
TabIndex = 13
Top = 1140
Width = 720
End
Begin VB.Label Label1
Caption = "工龄工资:"
Height = 210
Index = 5
Left = 6405
TabIndex = 11
Top = 735
Width = 1005
End
Begin VB.Label Label1
Caption = "加班费:"
Height = 210
Index = 4
Left = 3585
TabIndex = 9
Top = 720
Width = 735
End
Begin VB.Label Label1
Caption = "基本工资:"
Height = 210
Index = 3
Left = 465
TabIndex = 7
Top = 735
Width = 900
End
Begin VB.Label Label1
Caption = "员工姓名:"
Height = 210
Index = 2
Left = 6405
TabIndex = 5
Top = 360
Width = 1005
End
Begin VB.Label Label1
Caption = "员工编号:"
Height = 210
Index = 1
Left = 3420
TabIndex = 3
Top = 360
Width = 945
End
Begin VB.Label Label1
Caption = "所属工资月份:"
Height = 210
Index = 0
Left = 120
TabIndex = 1
Top = 345
Width = 1305
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = -1575
Top = 870
Visible = 0 'False
Width = 2040
_ExtentX = 3598
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
OLEDBString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "工资表"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
End
Attribute VB_Name = "main_gzgl_gzgl_lr"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Activate()
Text1(3).SetFocus
End Sub
Private Sub Form_Load()
With main_gzgl_gzgl.DataGrid1
For i = 0 To 16
Text1(i).Text = .Columns(i + 1).CellValue(.Bookmark)
Next i
End With
End Sub
Private Sub Text1_GotFocus(Index As Integer)
Text1(Index).BackColor = &HFFFF00
Text1(Index).SelStart = 0
Text1(Index).SelLength = Len(Text1(Index))
End Sub
Private Sub Text1_LostFocus(Index As Integer)
Text1(Index).BackColor = &H80000005
End Sub
Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn And Index > 2 And Index < 13 Then Text1(Index + 1).SetFocus
End Sub
Private Sub Command1_Click()
For i = 3 To 16
cnn.Execute "update 工资表 set " & Mid(Label1(i), 1, Len(Label1(i)) - 1) & "=" + Text1(i) + " where 所属工资月份='" + Text1(0) + "'and 员工编号='" + Text1(1) + "'"
Next i
cnn.Execute "update 工资表 set 应发工资=基本工资+工龄工资+加班费+全勤奖+奖励总额+职务津贴 where 所属工资月份='" + Text1(0) + "'and 员工编号='" + Text1(1) + "'"
cnn.Execute "update 工资表 set 应扣工资=请假扣除+惩罚总额+养老保险+失业保险+医疗保险 where 所属工资月份='" + Text1(0) + "'and 员工编号='" + Text1(1) + "'"
cnn.Execute "update 工资表 set 实发工资=应发工资-应扣工资 where 所属工资月份='" + Text1(0) + "'and 员工编号='" + Text1(1) + "'"
main_gzgl_gzgl.Adodc1.Refresh
Unload Me
End Sub
Private Sub Command3_Click()
Text1(14) = Val(Text1(3)) + Val(Text1(4)) + Val(Text1(5)) + Val(Text1(6)) + Val(Text1(7)) + Val(Text1(8)) + Val(Text1(9))
Text1(15) = Val(Text1(10)) + Val(Text1(11)) + Val(Text1(12)) + Val(Text1(13))
Text1(16) = Val(Text1(14)) - Val(Text1(15))
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -