📄 frmhrdpayroll.frm
字号:
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "Modify"
Key = "Modify"
Object.ToolTipText = "Update the record"
ImageIndex = 8
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "First"
Key = "First"
Object.ToolTipText = "Go to first record"
ImageIndex = 7
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "Previous"
Key = "Previous"
Object.ToolTipText = "Go to previous record "
ImageIndex = 5
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "Next"
Key = "Next"
Object.ToolTipText = "Go to next record"
ImageIndex = 6
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "Last"
Key = "Last"
Object.ToolTipText = "Go to last record"
ImageIndex = 1
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "About"
Key = "About"
Object.ToolTipText = "About the author"
ImageIndex = 4
EndProperty
EndProperty
End
Begin Project1.XPButton cmdCompute
Height = 495
Left = 9480
TabIndex = 45
Top = 9720
Visible = 0 'False
Width = 1635
_extentx = 2884
_extenty = 873
font = "frmHRDPayRoll.frx":38FC
caption = "Compute"
forecolor = 255
forehover = 16711680
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Tick here if you wish to Modify the Database"
ForeColor = &H00000000&
Height = 240
Left = 360
TabIndex = 47
Top = 9360
Width = 4575
End
Begin VB.Line Line2
BorderColor = &H00FF0000&
BorderWidth = 2
X1 = -360
X2 = 15240
Y1 = 9240
Y2 = 9240
End
Begin VB.Label Label23
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Net Pay"
ForeColor = &H00000000&
Height = 240
Left = 7560
TabIndex = 41
Top = 8760
Width = 840
End
Begin VB.Label Label21
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Gross Deduction"
ForeColor = &H00000000&
Height = 240
Left = 7560
TabIndex = 40
Top = 7800
Width = 1740
End
Begin VB.Label Label20
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Life Insurance Policy"
ForeColor = &H00000000&
Height = 240
Left = 7560
TabIndex = 39
Top = 7080
Width = 2160
End
Begin VB.Label Label19
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Tax"
ForeColor = &H00000000&
Height = 240
Left = 7560
TabIndex = 38
Top = 6360
Width = 405
End
Begin VB.Label Label18
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Gross Pay"
ForeColor = &H00000000&
Height = 240
Left = 7560
TabIndex = 37
Top = 5640
Width = 1095
End
Begin VB.Label Label17
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "City Compencate Allowance"
ForeColor = &H00000000&
Height = 240
Left = 7560
TabIndex = 36
Top = 4920
Width = 2895
End
Begin VB.Label Label16
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Dearness Allowance"
ForeColor = &H00000000&
Height = 240
Left = 7560
TabIndex = 35
Top = 4200
Width = 2145
End
Begin VB.Label Label15
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "House Rent Allowance"
ForeColor = &H00000000&
Height = 240
Left = 7560
TabIndex = 34
Top = 3480
Width = 2355
End
Begin VB.Label Label14
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Basic Salary"
ForeColor = &H00000000&
Height = 240
Left = 7560
TabIndex = 33
Top = 2760
Width = 1335
End
Begin VB.Label Label13
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Department Name"
ForeColor = &H00000000&
Height = 240
Left = 7560
TabIndex = 32
Top = 2160
Width = 1890
End
Begin VB.Label Label12
BackStyle = 0 'Transparent
Caption = "Designation"
ForeColor = &H00000000&
Height = 240
Left = 600
TabIndex = 31
Top = 7920
Width = 1485
End
Begin VB.Label Label11
BackStyle = 0 'Transparent
Caption = "Qualifications"
ForeColor = &H00000000&
Height = 240
Left = 600
TabIndex = 30
Top = 7200
Width = 1485
End
Begin VB.Label Label10
BackStyle = 0 'Transparent
Caption = "Hiredate"
ForeColor = &H00000000&
Height = 240
Left = 600
TabIndex = 29
Top = 6480
Width = 1485
End
Begin VB.Label Label9
BackStyle = 0 'Transparent
Caption = "Date of birth"
ForeColor = &H00000000&
Height = 240
Left = 600
TabIndex = 28
Top = 5760
Width = 1485
End
Begin VB.Label Label8
BackStyle = 0 'Transparent
Caption = "City"
ForeColor = &H00000000&
Height = 240
Left = 600
TabIndex = 27
Top = 5040
Width = 1485
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "Phone"
ForeColor = &H00000000&
Height = 240
Left = 600
TabIndex = 26
Top = 4320
Width = 1485
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "Address"
ForeColor = &H00000000&
Height = 240
Left = 600
TabIndex = 25
Top = 3600
Width = 1485
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "Sex"
ForeColor = &H00000000&
Height = 240
Left = 600
TabIndex = 24
Top = 2880
Width = 1485
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "Name:"
ForeColor = &H00000000&
Height = 240
Left = 600
TabIndex = 23
Top = 2160
Width = 1485
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "Employee No:"
ForeColor = &H00000000&
Height = 240
Left = 600
TabIndex = 22
Top = 1440
Width = 1485
End
Begin VB.Line Line3
BorderColor = &H00FF0000&
BorderWidth = 2
X1 = -360
X2 = 15240
Y1 = 8400
Y2 = 8400
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Department Number"
ForeColor = &H00000000&
Height = 240
Left = 7560
TabIndex = 21
Top = 1440
Width = 2085
End
End
Attribute VB_Name = "frmHRDSal"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim adoConn As ADODB.Connection
Dim adoRSPR As ADODB.Recordset
Private Sub chkConfirm_Click()
If MsgBox("Are you sure you want to modify this record", vbYesNoCancel, "Modify Record") = vbYes Then
cmdCompute.Visible = True
MsgBox "Now you can update the record", vbInformation, "Message"
End If
End Sub
Private Sub cmdClose_Click()
frmHRDSal.Visible = False
frmMain.Show
End Sub
Private Sub cmdExit_Click()
If MsgBox("Are you sure you want to exit Hotel Mangement Sytem ?", vbQuestion + vbYesNo, "Confirm Exit !") = vbYes Then
End
End If
End Sub
Private Sub Form_Load()
MsgBox "Connecting Oracle.Please wait...", vbInformation, "Wait"
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "New"
frmHRDPayAdd.Show
frmHRDSal.Visible = False
Case "Delete"
If MsgBox("Are you sure you want to delete this record", vbYesNoCancel, "Delete Record") = vbYes Then
adoPayroll.Recordset.Delete
MsgBox " Record Deleted", vbInformation, "Message"
End If
If adoPayroll.Recordset.EOF = True Then
MsgBox " It has already reached the Last record", vbInformation, "Message"
adoPayroll.Recordset.MoveFirst
Else
adoPayroll.Recordset.MoveNext
End If
Case "Modify"
adoPayroll.Recordset.Update
MsgBox " Record Updated", vbInformation, "Message"
cmdCompute.Visible = True
Case "First"
adoPayroll.Recordset.MoveFirst
Case "Previous"
If adoPayroll.Recordset.BOF = True Then
MsgBox " It has already reached the First record", , "Message"
adoPayroll.Recordset.MoveLast
Else
adoPayroll.Recordset.MovePrevious
End If
Case "Next"
If adoPayroll.Recordset.EOF = True Then
MsgBox " It has already reached the Last record", vbInformation, "Message"
adoPayroll.Recordset.MoveFirst
Else
adoPayroll.Recordset.MoveNext
End If
Case "Last"
adoPayroll.Recordset.MoveLast
Case "About"
frmabout.Show
End Select
End Sub
Public Function Calculate(BP As Single) As Single
Dim HRA!, DA!, CCA!, GP!, Tax!, LIC!, GD!
HRA = BP * 0.25
DA = BP * 0.35
CCA = BP * 0.2
GP = BP + HRA + DA + CCA
Tax = BP * 0.08
LIC = BP * 0.12
GD = Tax + LIC
Calculate = GP - GD
txtHRA.Text = Str$(HRA)
txtDA.Text = Str$(DA)
txtCCA.Text = Str$(CCA)
txtGP.Text = Str$(GP)
txtTAX.Text = Str$(Tax)
txtLIC.Text = Str$(LIC)
txtGD.Text = Str$(GD)
End Function
Private Sub Salary()
Dim s As Single
s = Calculate(Val(txtBSal))
txtNP = Str$(s)
End Sub
Private Sub cmdCompute_Click()
Dim i%
Call Salary
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -