⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmpayroll.frm

📁 一个功能完善,界面比较精美的酒店管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   210
         Left            =   120
         TabIndex        =   11
         Top             =   600
         Width           =   1095
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         Caption         =   "Hours worked"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   210
         Left            =   120
         TabIndex        =   10
         Top             =   240
         Width           =   1320
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "Employee Details"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2295
      Left            =   120
      TabIndex        =   0
      Top             =   720
      Width           =   6855
      Begin VB.ComboBox Combo2 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   2160
         TabIndex        =   32
         Top             =   1800
         Width           =   2415
      End
      Begin VB.ComboBox Combo1 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   2160
         TabIndex        =   2
         Top             =   240
         Width           =   2415
      End
      Begin VB.Label Label17 
         Caption         =   "Period"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   120
         TabIndex        =   33
         Top             =   1800
         Width           =   1575
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "Label7"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   210
         Left            =   2160
         TabIndex        =   8
         Top             =   1440
         Width           =   630
      End
      Begin VB.Label Label6 
         Caption         =   "Designation"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   120
         TabIndex        =   7
         Top             =   1440
         Width           =   1335
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "Label5"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   210
         Left            =   2160
         TabIndex        =   6
         Top             =   1080
         Width           =   630
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "Label4"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   210
         Left            =   2160
         TabIndex        =   5
         Top             =   720
         Width           =   630
      End
      Begin VB.Label Label3 
         Caption         =   "Department"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   120
         TabIndex        =   4
         Top             =   1080
         Width           =   1215
      End
      Begin VB.Label Label2 
         Caption         =   "Staff Name"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   375
         Left            =   120
         TabIndex        =   3
         Top             =   720
         Width           =   1215
      End
      Begin VB.Label Label1 
         Caption         =   "Staff ID"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   120
         TabIndex        =   1
         Top             =   240
         Width           =   1455
      End
   End
   Begin VB.Label Label19 
      AutoSize        =   -1  'True
      Caption         =   "PROCESS STAFF PAYROLL"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   270
      Left            =   1320
      TabIndex        =   34
      Top             =   240
      Width           =   3480
   End
End
Attribute VB_Name = "frmPayroll"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim HW, HR, BS, TA, MA, GP As String
Dim TAX, PEN, SA, NP As String

Private Sub Combo1_Click()
With Rs_Details
.MoveFirst
While Not .EOF
If Combo1.List(Combo1.ListIndex) = .Fields(0) Then
Label4.Caption = .Fields(1)
Label5.Caption = .Fields(10)
Label7.Caption = .Fields(9)
End If
.MoveNext
Wend
End With
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text10.Text = ""
End Sub

Private Sub Combo2_Click()
With RS_Payroll
.MoveFirst
While Not .EOF
If Combo2.List(Combo2.ListIndex) = .Fields(4) Then
Text1.Text = .Fields(5)
Text2.Text = .Fields(6)
Text3.Text = .Fields(7)
Text4.Text = .Fields(8)
Text5.Text = .Fields(9)
Text6.Text = .Fields(10)
Text7.Text = .Fields(11)
Text8.Text = .Fields(12)
Text10.Text = .Fields(13)
MsgBox "Record Already Exist for the month"
End If


.MoveNext
Wend
End With
End Sub

Private Sub Command1_Click()
BS = Val(Text3.Text)
TA = Val(Text4.Text)
MA = Val(Text5.Text)
TAX = Val(Text7.Text)
PEN = Val(Text8.Text)
NP = Val(Text10.Text)
GP = BS + TA + MA
Text6.Text = GP
TAX = BS / 100 * 5
Text7.Text = TAX
NP = GP - TAX - Val(Text8.Text)
Text10.Text = NP
End Sub

Private Sub Command2_Click()
Blank
Me.Hide
End Sub

Private Sub Command3_Click()
If Text1.Text = "" Or Text2.Text = "" Or Text4.Text = "" Or Text5.Text = "" Then
MsgBox "Pls Input the Required Fields", vbCritical
Exit Sub
End If

With RS_Payroll
.MoveFirst
While Not .EOF
If Combo1.Text = .Fields(0) Then
    If Combo2.Text = .Fields(4) Then
    MsgBox "U have already Processed Payment for this Month", vbCritical, "Process Error"
    Exit Sub
    End If
End If
.MoveNext
Wend
.AddNew
.Fields(0) = Combo1.Text
.Fields(1) = Label4.Caption
.Fields(2) = Label5.Caption
.Fields(3) = Label7.Caption
.Fields(4) = Combo2.Text
.Fields(5) = Text1.Text
.Fields(6) = Text2.Text
.Fields(7) = Text3.Text
.Fields(8) = Text4.Text
.Fields(9) = Text5.Text
.Fields(10) = Text6.Text
.Fields(11) = Text7.Text
.Fields(12) = Text8.Text
.Fields(13) = Text10.Text
.Fields(14) = Date
.Fields(15) = UserName
.Update
MsgBox "Payroll Record Successfully Updated", vbInformation, "Update Record"
Blank
End With
End Sub

Private Sub Command5_Click()
ResetPay.Show 1
End Sub

Private Sub Form_Load()
Me.Top = 3000
Me.Left = 3000
Connect
With Rs_Details
.MoveFirst
While Not .EOF
Combo1.AddItem .Fields(0)
.MoveNext
Wend
End With
Label4.Caption = ""
Label5.Caption = ""
Label7.Caption = ""

Combo2.AddItem "January"
Combo2.AddItem "February"
Combo2.AddItem "March"
Combo2.AddItem "April"
Combo2.AddItem "May"
Combo2.AddItem "June"
Combo2.AddItem "July"
Combo2.AddItem "August"
Combo2.AddItem "September"
Combo2.AddItem "October"
Combo2.AddItem "November"
Combo2.AddItem "December"
End Sub

Private Sub Text3_GotFocus()
If Text1.Text = "" Or Text2.Text = "" Then
MsgBox "Pls Enter values for the required fields for Basic Salary to be calculate", vbOKOnly
Exit Sub
Else
HW = Val(Text1.Text)
HR = Val(Text2.Text)
BS = Val(HW) * Val(HR)
Text3.Text = BS
End If
End Sub
Sub Blank()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text10.Text = ""
Combo1.ListIndex = -1
Combo2.ListIndex = -1
Label4.Caption = ""
Label5.Caption = ""
Label7.Caption = ""

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -