📄 frm_add_salary_info.frm
字号:
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 360
TabIndex = 24
Top = 360
Width = 930
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "D.A."
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 360
TabIndex = 23
Top = 840
Width = 390
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "H.R.A."
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 360
TabIndex = 22
Top = 1320
Width = 570
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "C.C.A."
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 360
TabIndex = 21
Top = 1800
Width = 555
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Transport Allowance"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 360
TabIndex = 20
Top = 2280
Width = 2010
End
Begin VB.Label Label11
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "G.P.F"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 4320
TabIndex = 19
Top = 240
Width = 495
End
Begin VB.Label Label12
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Insurance"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 4320
TabIndex = 18
Top = 720
Width = 990
End
Begin VB.Label Label13
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Income Tax"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 4320
TabIndex = 17
Top = 1200
Width = 1155
End
Begin VB.Label Label14
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "P. Tax"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 4320
TabIndex = 16
Top = 1680
Width = 600
End
Begin VB.Label Label16
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Gross Pay"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 360
TabIndex = 15
Top = 3720
Width = 975
End
Begin VB.Label Label17
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Deductions"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 360
TabIndex = 14
Top = 2760
Width = 1080
End
Begin VB.Label Label18
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Nett Pay"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 360
TabIndex = 13
Top = 3240
Width = 825
End
End
Begin ActiveResizeCtl.ActiveResize ActiveResize1
Left = 0
Top = 0
_ExtentX = 847
_ExtentY = 847
Resolution = 4
ScreenHeight = 1024
ScreenWidth = 1280
ScreenHeightDT = 1024
ScreenWidthDT = 1280
FormHeightDT = 9435
FormWidthDT = 10215
FormScaleHeightDT= 8925
FormScaleWidthDT= 10095
ResizeFormBackground= -1 'True
ResizePictureBoxContents= -1 'True
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "EMPLOYEE SALARY DETAILS"
BeginProperty Font
Name = "Verdana"
Size = 18
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 435
Left = 2280
TabIndex = 44
Top = 360
Width = 5715
End
End
Attribute VB_Name = "frm_add_salary_info"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "RVB_UniqueId" ,"3CBB305A0156"
Option Explicit
'##ModelId=3CBB305A0162
Dim con As ADODB.Connection
'##ModelId=3CBB305A016C
Dim rs As ADODB.Recordset
'##ModelId=3CBB305A016D
Dim ch
'##ModelId=3CBB305A0174
Private Sub add_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
desig.SetFocus
End If
End Sub
'##ModelId=3CBB305A0177
Private Sub add_KeyPress(KeyAscii As Integer)
If KeyAscii >= 65 And KeyAscii <= 91 Or KeyAscii >= 97 And KeyAscii <= 123 Or KeyAscii = 8 Or KeyAscii = 32 Or KeyAscii = 13 Then
If Len(nm.Text) = 0 Or KeyAscii = 32 Then
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If KeyAscii = 32 Then
ch = "True"
End If
Else
If ch = "true" Then
KeyAscii = Asc(UCase(Chr(KeyAscii)))
ch = "false"
Else
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End If
End If
Else
MsgBox ("Invalid Input")
KeyAscii = 0
End If
End Sub
'##ModelId=3CBB305A017F
Private Sub bp_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
ca.SetFocus
End If
End Sub
'##ModelId=3CBB305A0188
Private Sub bp_KeyPress(KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii <= 57 Or KeyAscii = 8 Then
KeyAscii = KeyAscii
Else
KeyAscii = 0
End If
End Sub
'##ModelId=3CBB305A018A
Private Sub bp_LostFocus()
If bp.Text <> "" Then
da.Text = Val(bp.Text) * 0.458
hr.Text = Val(bp.Text) * 0.3
gpa.Text = Val(bp.Text) + Val(da.Text) + Val(hr.Text) + Val(ca.Text) + Val(ta.Text)
deduct.Text = Val(pf.Text) + Val(ins.Text) + Val(it.Text) + Val(pt.Text)
Net.Text = Val(gpa.Text) - Val(deduct.Text)
End If
If Code = "" Then
cmd_salary_add.Enabled = False
ElseIf nm = "" Then
cmd_salary_add.Enabled = False
ElseIf desig = "" Then
cmd_salary_add.Enabled = False
ElseIf add = "" Then
cmd_salary_add.Enabled = False
ElseIf bp = "" Then
cmd_salary_add.Enabled = False
Else
cmd_salary_add.Enabled = True
End If
End Sub
'##ModelId=3CBB305A0192
Private Sub ca_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
ta.SetFocus
End If
End Sub
'##ModelId=3CBB305A0195
Private Sub ca_KeyPress(KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii <= 57 Or KeyAscii = 8 Then
KeyAscii = KeyAscii
Else
KeyAscii = 0
End If
End Sub
'##ModelId=3CBB305A019C
Private Sub ca_LostFocus()
gpa.Text = Val(bp.Text) + Val(da.Text) + Val(hr.Text) + Val(ca.Text) + Val(ta.Text)
Net.Text = Val(bp.Text) + Val(da.Text) + Val(hr.Text) + Val(ca.Text) + Val(ta.Text) - Val(pf.Text) - Val(ins.Text) - Val(it.Text) - Val(pt.Text)
End Sub
Private Sub cmd_brows_Click()
frm_emp_list.Show
End Sub
Private Sub cmd_sal_delete_Click()
Dim res As String
If Code = "" Then
MsgBox "There Is No Current Record", vbInformation
Else
res = MsgBox("Do You Want To Delete The Current Record ? ", vbCritical + vbYesNo, "Data Deletion")
If res = vbYes Then
cnPatients.Execute ("delete from slip where ecode='" & Code & "'")
Call clear
ElseIf res = vbNo Then
MsgBox "Deletion Cancled", vbInformation
End If
End If
End Sub
Private Sub cmd_sal_modify_Click()
Dim res
rs.Open "Select * From Slip", cnPatients, adOpenDynamic, adLockOptimistic
Code.Enabled = False
If Code = "" Then
MsgBox "There Is No Current Record", vbInformation
Else
res = MsgBox("Do You Want To Modify The Current Record ? ", vbCritical + vbYesNo, "Data Modification")
If res = vbYes Then
cnPatients.Execute ("delete from slip where ecode='" & Code & "'")
rs.AddNew
Call upload
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -