Home

Example Application: A Time Sheet

     

Introduction

 

A time sheet is a dialog box or a form on which employees record the time they have worked. Most companies use a two-week schedule. In most cases, an employee records the time one week at a time.

If you create an application for a time sheet, of course there are various ways you can implement it, depending on what the company or its accounting department wants. For our simple example, we will first let a user enter his employee number and the starting date of the time sheet. Based on these two pieces of information, we will check whether the employee had previously entered or started a time sheet for that time frame. If that’s the case, we will open that time sheet and display its record. If there is no time recorded for the employee in that time frame, we will let the user create a new time sheet.

The Employees

Obviously the primary users of a time sheet are the employees. A company may need a lot of information from employees but in most cases, an employee number and the name of the employee are enough.

Practical LearningPractical Learning: Introducing a Time Sheet

  1. Start Notepad or any text editor of your choice
  2. Type the following code:
    Imports System
    imports System.Drawing
    imports System.Windows.Forms
    
    Public Class Employee
        Inherits Form
    
        Private lblFirstName As Label
        Public txtFirstName As TextBox
        Private lblLastName As Label
        Public txtLastName As TextBox
        Private lblEmployeeNumber As Label
        Public txtEmployeeNumber As TextBox
        Private lblHourlySalary As Label
        Public txtHourlySalary As TextBox
        Private btnOK As Button
        Private btnCancel As Button
    
        Public Sub New()
            InitializeComponent()
        End Sub
    
        Private Sub InitializeComponent()
            REM Label: First Name
            lblFirstName = New Label()
            lblFirstName.AutoSize = True
            lblFirstName.Location = New System.Drawing.Point(18, 26)
            lblFirstName.TabIndex = 4
            lblFirstName.Text = "First Name:"
            Controls.Add(lblFirstName)
    
            REM Text Box: First Name
            txtFirstName = New TextBox()
            txtFirstName.Location = New System.Drawing.Point(96, 23)
            txtFirstName.Size = New System.Drawing.Size(88, 20)
            txtFirstName.TabIndex = 5
            Controls.Add(txtFirstName)
    
            REM Label: LastName
            lblLastName = New Label()
            lblLastName.AutoSize = True
            lblLastName.Location = New System.Drawing.Point(200, 26)
            lblLastName.TabIndex = 6
            lblLastName.Text = "Last Name:"
            Controls.Add(lblLastName)
    
            REM Text Box: LastName
            txtLastName = New TextBox()
            txtLastName.Location = New System.Drawing.Point(281, 23)
            txtLastName.Size = New System.Drawing.Size(88, 20)
            txtLastName.TabIndex = 7
            Controls.Add(txtLastName)
    
            REM Label: Hourly Salary
            lblHourlySalary = New Label()
            lblHourlySalary.AutoSize = True
            lblHourlySalary.Location = New System.Drawing.Point(18, 61)
            lblHourlySalary.TabIndex = 20
            lblHourlySalary.Text = "Hourly Salary:"
            Controls.Add(lblHourlySalary)
    
            REM Text Box: Hourly Salary
            txtHourlySalary = New TextBox()
            txtHourlySalary.Location = New System.Drawing.Point(96, 58)
            txtHourlySalary.Size = New System.Drawing.Size(88, 20)
            txtHourlySalary.TabIndex = 21
            Controls.Add(txtHourlySalary)
    
            REM Label: Employee Number
            lblEmployeeNumber = New Label()
            lblEmployeeNumber.AutoSize = True
            lblEmployeeNumber.Location = New System.Drawing.Point(200, 61)
            lblEmployeeNumber.Size = New System.Drawing.Size(66, 13)
            lblEmployeeNumber.TabIndex = 23
            lblEmployeeNumber.Text = "Employee #:"
            Controls.Add(lblEmployeeNumber)
    
            REM Text Box: Employee Number
            txtEmployeeNumber = New TextBox()
            txtEmployeeNumber.Location = New System.Drawing.Point(281, 58)
            txtEmployeeNumber.Size = New System.Drawing.Size(88, 20)
            txtEmployeeNumber.TabIndex = 24
            Controls.Add(txtEmployeeNumber)
    
            REM Button: OK
            btnOK = New Button()
            btnOK.DialogResult = DialogResult.OK
            btnOK.Location = New System.Drawing.Point(198, 96)
            btnOK.Size = New System.Drawing.Size(75, 23)
            btnOK.TabIndex = 25
            btnOK.Text = "OK"
            Controls.Add(btnOK)
    
            REM Button: Cancel
            btnCancel = New Button()
            btnCancel.DialogResult = DialogResult.Cancel
            btnCancel.Location = New System.Drawing.Point(294, 96)
            btnCancel.Size = New System.Drawing.Size(75, 23)
            btnCancel.TabIndex = 26
            btnCancel.Text = "Cancel"
            Controls.Add(btnCancel)
    
            REM Dialog Box: Employee
            AcceptButton = btnOK
            CancelButton = btnCancel
            ClientSize = New System.Drawing.Size(389, 139)
            FormBorderStyle = FormBorderStyle.FixedDialog
            MaximizeBox = False
            MinimizeBox = False
            ShowInTaskbar = False
            StartPosition = FormStartPosition.CenterScreen
            Text = "Fun Department Store - New Employee"
        End Sub
    
    End Class
  3. On the main menu, click File -> New
  4. When asked whether you want to save, click Save (or Yes)
  5. Display the C: drive in the top combo box
  6. Click New Folder
  7. Type TimeSheetCalculations and press Enter twice to display the new folder in the top combo box
  8. Set the Save As Type to All Files
  9. Set the File Name to Employee.vb and press Enter
  10. In the empty document, type the following code:
    Imports System
    Imports System.IO
    Imports System.Xml
    Imports System.Drawing
    imports System.Windows.Forms
    
    Public Class Employees
        Inherits Form
    
        Private lvwEmployees As ListView
        Private colEmployeeNumber As ColumnHeader
        Private colFirstName As ColumnHeader
        Private colLastName As ColumnHeader
        Private colHourlySalary As ColumnHeader
        Private txtNumberOfEmployees As TextBox
        Private lblNumberOfEmployees As Label
        Private WithEvents btnNewEmployee As Button
        Private WithEvents btnClose As Button
    
        Public Sub New()
            InitializeComponent()
        End Sub
    
        Private Sub InitializeComponent()
            REM Form: Employees
            ClientSize = New System.Drawing.Size(342, 185)
    
            REM Column: Employee Number
            colEmployeeNumber = New ColumnHeader()
            colEmployeeNumber.Text = "Employee #"
            colEmployeeNumber.Width = 70
    
            REM Column: First Name 
            colFirstName = New ColumnHeader()
            colFirstName.Text = "First Name"
            colFirstName.Width = 65
    
            REM Column: Last Name
            colLastName = New ColumnHeader()
            colLastName.Text = "Last Name"
            colLastName.Width = 70
    
            REM Column: Hourly Salary
            colHourlySalary = New ColumnHeader()
            colHourlySalary.Text = "Hourly Salary"
            colHourlySalary.TextAlign = HorizontalAlignment.Right
            colHourlySalary.Width = 75
    
            REM List View: Employees
            lvwEmployees = New ListView()
            lvwEmployees.Anchor = AnchorStyles.Top Or AnchorStyles.Bottom Or AnchorStyles.Left Or AnchorStyles.Right
            lvwEmployees.Columns.AddRange(New ColumnHeader() {colEmployeeNumber, colFirstName, colLastName, colHourlySalary})
            lvwEmployees.FullRowSelect = True
            lvwEmployees.GridLines = True
            lvwEmployees.Location = New System.Drawing.Point(19, 12)
            lvwEmployees.Size = New System.Drawing.Size(307, 125)
            lvwEmployees.View = View.Details
            Controls.Add(lvwEmployees)
    
            REM Label: Number of Employees
            lblNumberOfEmployees = New Label()
            lblNumberOfEmployees.Anchor = AnchorStyles.Bottom Or AnchorStyles.Left
            lblNumberOfEmployees.AutoSize = True
            lblNumberOfEmployees.Location = New System.Drawing.Point(16, 155)
            lblNumberOfEmployees.Text = "Count:"
            Controls.Add(lblNumberOfEmployees)
    
            REM Text Box: Number of Employees
            txtNumberOfEmployees = New TextBox()
            txtNumberOfEmployees.Anchor = AnchorStyles.Bottom Or AnchorStyles.Left
            txtNumberOfEmployees.Location = New System.Drawing.Point(60, 152)
            txtNumberOfEmployees.Size = New System.Drawing.Size(60, 20)
            txtNumberOfEmployees.TabIndex = 35
            txtNumberOfEmployees.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtNumberOfEmployees)
    
            REM Button: New Employee
            btnNewEmployee = New Button()
            btnNewEmployee.Anchor = AnchorStyles.Bottom Or AnchorStyles.Right
            btnNewEmployee.Location = New System.Drawing.Point(136, 150)
            btnNewEmployee.Size = New System.Drawing.Size(109, 23)
            btnNewEmployee.Text = "New Employee ..."
            Controls.Add(btnNewEmployee)
    
            REM Button: Close
            btnClose = New Button()
            btnClose.Anchor = AnchorStyles.Bottom Or AnchorStyles.Right
            btnClose.Location = New System.Drawing.Point(251, 150)
            btnClose.Size = New System.Drawing.Size(75, 23)
            btnClose.Text = "Close"
            Controls.Add(btnClose)
    
            REM Form: Employees
            MaximizeBox = False
            StartPosition = FormStartPosition.CenterScreen
            Text = "Fun Department Store - Employees"
        End Sub
    
        Private Sub ShowEmployees()
            Dim xdEmployees As XmlDocument = New XmlDocument()
            Dim strEmployeesFile As String = "C:\Fun Department Store - Payroll\Employees.xml"
    
            If File.Exists(strEmployeesFile) Then
                lvwEmployees.Items.Clear()
                xdEmployees.Load(strEmployeesFile)
    
                Dim xeEmployee As XmlElement = xdEmployees.DocumentElement
                Dim xnlEmployees As XmlNodeList = xeEmployee.ChildNodes
    
                For Each xnEmployee As XmlNode In xnlEmployees
    
                    Dim lviEmployee As ListViewItem = New ListViewItem(xnEmployee.FirstChild.InnerText) REM Employee Number
    
                    lviEmployee.SubItems.Add(xnEmployee.FirstChild.NextSibling.InnerText) REM First Name
                    lviEmployee.SubItems.Add(xnEmployee.FirstChild.NextSibling.NextSibling.InnerText) REM Last Name
                    lviEmployee.SubItems.Add(xnEmployee.FirstChild.NextSibling.NextSibling.NextSibling.InnerText) REM Hourly Salary
    
                    lvwEmployees.Items.Add(lviEmployee)
                Next
    
                txtNumberOfEmployees.Text = xnlEmployees.Count.ToString()
            End If
        End Sub
    
        Private Sub EmployeesLoad(ByVal sender As Object, ByVal e As EventArgs) Handles me.load
            ShowEmployees()
        End Sub
    
        Private Sub btnNewEmployeeClick(ByVal sender As Object, ByVal e As EventArgs) Handles btnNewEmployee.Click
            Dim empl = New Employee()
            Dim xdEmployees As XmlDocument = New XmlDocument()
            Dim strEmployeesFile As String = "C:\Fun Department Store - Payroll\Employees.xml"
    
            If empl.ShowDialog() = DialogResult.OK Then
                If Not File.Exists(strEmployeesFile) Then
                    xdEmployees.LoadXml("<?xml version=""1.0"" encoding=""utf-8""?>" &
                                        "<Employees></Employees>")
                    xdEmployees.Save(strEmployeesFile)
                End If
    
                xdEmployees.Load(strEmployeesFile)
    
                Dim elmXML As XmlElement = xdEmployees.CreateElement("Employee")
                REM Create the XML code of the child element of Employee
                dim strNewEmployee = "<EmployeeNumber>" & empl.txtEmployeeNumber.Text & "</EmployeeNumber>" &
                                        "<FirstName>" & empl.txtFirstName.Text & "</FirstName>" &
                                        "<LastName>" & empl.txtLastName.Text & "</LastName>" &
                                        "<HourlySalary>" & empl.txtHourlySalary.Text & "</HourlySalary>"
                elmXML.InnerXml = strNewEmployee
                REM Append the new element as a child of employees
                xdEmployees.DocumentElement.AppendChild(elmXML)
    
                REM Save the XML file
                xdEmployees.Save(strEmployeesFile)
    
                ShowEmployees()
            End If
        End Sub
    
        Private Sub btnCloseClick(ByVal sender As Object, ByVal e As EventArgs) Handles btnclose.Click
            Close()
        End Sub
    
    End Class
  11. On the main menu, click File -> New
  12. When asked whether you want to save, click Save (or Yes)
  13. Set the Save As Type to All Files
  14. Set the File Name to Employees.cs and press Enter

Creating a Time Sheet

As far as a database is concerned, a time sheet is a list that contains some information about the employees and the time they workd. In most cases, the basic information about an employee is just what is enough to identify the employee. This should be a piece of informatiion that uniquely identify each emmployee. For most businesses, this is done through an employee number. The time worked is registered for each day from 0 to 24. Most companies also allow fractions of an hour, usually as half an hour. Some (rare) companies also consider time in fractions of quarters (.25,.50, and .75).

After an employee has filled her time sheet, she can click a button such as Submit, OK, or Apply.

Most companies require that each employee enter the time worked at the end of the day, and most of the time, the employee registers the time worked for one day at a time, or for only that day. To address this issue, after an employee has entered his employee number and the start date of the time sheet, we will check if the employee had previously entered time for at least one day based on the employee number and the start date. If we find such a record, we will open that time sheet and let the user update it. If we don't find a time sheet with that information, we will consider that the employee has filling a new time sheet.

Practical LearningPractical Learning: Introducing a Time Sheet

  1. In the empty document, type the following code:
    Imports System
    Imports System.IO
    Imports System.Xml
    Imports System.Drawing
    Imports System.Windows.Forms
    
    Public Class TimeSheet
        Inherits Form
        Private lblEmployeeNumber As Label
        Private WithEvents txtEmployeeNumber As TextBox
        Private txtEmployeeName As TextBox
        Private lblStartDate As Label
        Private WithEvents dtpStartDate As DateTimePicker
        Private lblEndDate As Label
        Private txtEndDate As TextBox
        Private lblLine1 As Label
        Private lblMonday As Label
        Private lblTuesday As Label
        Private lblWednesday As Label
        Private lblThursday As Label
        Private lblFriday As Label
        Private lblSaturday As Label
        Private lblSunday As Label
        Private lblWeek1 As Label
        Private txtWeek1Monday As TextBox
        Private txtWeek1Tuesday As TextBox
        Private txtWeek1Wednesday As TextBox
        Private txtWeek1Thursday As TextBox
        Private txtWeek1Friday As TextBox
        Private txtWeek1Saturday As TextBox
        Private txtWeek1Sunday As TextBox
        Private lblWeek2 As Label
        Private txtWeek2Monday As TextBox
        Private txtWeek2Tuesday As TextBox
        Private txtWeek2Wednesday As TextBox
        Private txtWeek2Thursday As TextBox
        Private txtWeek2Friday As TextBox
        Private txtWeek2Saturday As TextBox
        Private txtWeek2Sunday As TextBox
        Private lblLine2 As Label
        Private lblTimeSheetID As Label
        Private txtTimeSheetID As TextBox
        Private WithEvents btnUpdate As Button
        Private WithEvents btnSubmit As Button
        Private WithEvents btnClose As Button
    
        Public Sub New()
            InitializeComponent()
        End Sub
    
        Private Sub InitializeComponent()
            REM Label: Employee Number
            lblEmployeeNumber = New Label()
            lblEmployeeNumber.AutoSize = True
            lblEmployeeNumber.Location = New System.Drawing.Point(14, 20)
            lblEmployeeNumber.TabIndex = 331
            lblEmployeeNumber.Text = "Employee #:"
            Controls.Add(lblEmployeeNumber)
    
            REM Text Box: EmployeeNumber
            txtEmployeeNumber = New TextBox()
            txtEmployeeNumber.Location = New System.Drawing.Point(98, 14)
            txtEmployeeNumber.Size = New System.Drawing.Size(64, 20)
            txtEmployeeNumber.TabIndex = 332
            Controls.Add(txtEmployeeNumber)
    
            REM Text Box: Employee Name
            txtEmployeeName = New TextBox()
            txtEmployeeName.Location = New System.Drawing.Point(168, 14)
            txtEmployeeName.Size = New System.Drawing.Size(130, 20)
            txtEmployeeName.TabIndex = 363
            Controls.Add(txtEmployeeName)
    
            REM Label: Start Date
            lblStartDate = New Label()
            lblStartDate.AutoSize = True
            lblStartDate.Location = New System.Drawing.Point(14, 51)
            lblStartDate.TabIndex = 333
            lblStartDate.Text = "Start Date:"
            Controls.Add(lblStartDate)
    
            REM Date/Time Picker: Start Date
            dtpStartDate = New DateTimePicker()
            dtpStartDate.Location = New System.Drawing.Point(98, 45)
            dtpStartDate.Size = New System.Drawing.Size(200, 20)
            dtpStartDate.TabIndex = 364
            Controls.Add(dtpStartDate)
    
            REM Label: End Date
            lblEndDate = New Label()
            lblEndDate.AutoSize = True
            lblEndDate.Location = New System.Drawing.Point(314, 51)
            lblEndDate.TabIndex = 334
            lblEndDate.Text = "End Date:"
            Controls.Add(lblEndDate)
    
            REM Text Box: End Date
            txtEndDate = New TextBox()
            txtEndDate.Location = New System.Drawing.Point(379, 45)
            txtEndDate.Size = New System.Drawing.Size(75, 20)
            txtEndDate.TabIndex = 365
            Controls.Add(txtEndDate)
    
            REM Label: Line 1
            lblLine1 = New Label()
            lblLine1.AutoSize = True
            lblLine1.Location = New System.Drawing.Point(13, 79)
            lblLine1.TabIndex = 336
            lblLine1.Text = "--------------------------------------------------------------------------------------------------------------------------------------------------------------"
            Controls.Add(lblLine1)
    
            REM Label: Monday
            lblMonday = New Label()
            lblMonday.AutoSize = True
            lblMonday.Location = New System.Drawing.Point(95, 101)
            lblMonday.TabIndex = 340
            lblMonday.Text = "Monday"
            Controls.Add(lblMonday)
    
            REM Label: Tuesday
            lblTuesday = New Label()
            lblTuesday.AutoSize = True
            lblTuesday.Location = New System.Drawing.Point(152, 101)
            lblTuesday.TabIndex = 341
            lblTuesday.Text = "Tuesday"
            Controls.Add(lblTuesday)
    
            REM Label: Wednesday
            lblWednesday = New Label()
            lblWednesday.AutoSize = True
            lblWednesday.Location = New System.Drawing.Point(206, 101)
            lblWednesday.TabIndex = 342
            lblWednesday.Text = "Wednesday"
            Controls.Add(lblWednesday)
    
            REM Label: Thursday
            lblThursday = New Label()
            lblThursday.AutoSize = True
            lblThursday.Location = New System.Drawing.Point(270, 101)
            lblThursday.TabIndex = 343
            lblThursday.Text = "Thursday"
            Controls.Add(lblThursday)
    
            REM Label: Friday
            lblFriday = New Label()
            lblFriday.AutoSize = True
            lblFriday.Location = New System.Drawing.Point(325, 101)
            lblFriday.TabIndex = 344
            lblFriday.Text = "Friday"
            Controls.Add(lblFriday)
    
            REM Label: Saturday
            lblSaturday = New Label()
            lblSaturday.AutoSize = True
            lblSaturday.Location = New System.Drawing.Point(382, 101)
            lblSaturday.TabIndex = 345
            lblSaturday.Text = "Saturday"
            Controls.Add(lblSaturday)
    
            REM Label: Sunday
            lblSunday = New Label()
            lblSunday.AutoSize = True
            lblSunday.Location = New System.Drawing.Point(437, 101)
            lblSunday.TabIndex = 346
            lblSunday.Text = "Sunday"
            Controls.Add(lblSunday)
    
            REM Label: Week 1
            lblWeek1 = New Label()
            lblWeek1.AutoSize = True
            lblWeek1.Location = New System.Drawing.Point(14, 127)
            lblWeek1.TabIndex = 361
            lblWeek1.Text = "Week 1:"
            Controls.Add(lblWeek1)
    
            REM Text Box: Week 1 - Monday
            txtWeek1Monday = New TextBox()
            txtWeek1Monday.Location = New System.Drawing.Point(98, 124)
            txtWeek1Monday.Size = New System.Drawing.Size(51, 20)
            txtWeek1Monday.TabIndex = 347
            txtWeek1Monday.Text = "0.00"
            txtWeek1Monday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtWeek1Monday)
    
            REM Text Box: Week 1 - Tuesday
            txtWeek1Tuesday = New TextBox()
            txtWeek1Tuesday.Location = New System.Drawing.Point(155, 124)
            txtWeek1Tuesday.Size = New System.Drawing.Size(51, 20)
            txtWeek1Tuesday.TabIndex = 348
            txtWeek1Tuesday.Text = "0.00"
            txtWeek1Tuesday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtWeek1Tuesday)
    
            REM Text Box: Week 1 - Wednesday
            txtWeek1Wednesday = New TextBox()
            txtWeek1Wednesday.Location = New System.Drawing.Point(212, 124)
            txtWeek1Wednesday.Size = New System.Drawing.Size(51, 20)
            txtWeek1Wednesday.TabIndex = 349
            txtWeek1Wednesday.Text = "0.00"
            txtWeek1Wednesday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtWeek1Wednesday)
    
            REM Text Box: Week 1 - Thursday
            txtWeek1Thursday = New TextBox()
            txtWeek1Thursday.Location = New System.Drawing.Point(269, 124)
            txtWeek1Thursday.Size = New System.Drawing.Size(51, 20)
            txtWeek1Thursday.TabIndex = 350
            txtWeek1Thursday.Text = "0.00"
            txtWeek1Thursday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtWeek1Thursday)
    
            REM Text Box: Week 1 - Friday
            txtWeek1Friday = New TextBox()
            txtWeek1Friday.Location = New System.Drawing.Point(326, 124)
            txtWeek1Friday.Size = New System.Drawing.Size(51, 20)
            txtWeek1Friday.TabIndex = 351
            txtWeek1Friday.Text = "0.00"
            txtWeek1Friday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtWeek1Friday)
    
            REM Text Box: Week 1 - Saturday
            txtWeek1Saturday = New TextBox()
            txtWeek1Saturday.Location = New System.Drawing.Point(383, 124)
            txtWeek1Saturday.Name = "txtWeek1Saturday"
            txtWeek1Saturday.Size = New System.Drawing.Size(51, 20)
            txtWeek1Saturday.TabIndex = 352
            txtWeek1Saturday.Text = "0.00"
            txtWeek1Saturday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtWeek1Saturday)
    
            REM Text Box: Week 1 - Sunday
            txtWeek1Sunday = New TextBox()
            txtWeek1Sunday.Location = New System.Drawing.Point(440, 124)
            txtWeek1Sunday.Name = "txtWeek1Sunday"
            txtWeek1Sunday.Size = New System.Drawing.Size(51, 20)
            txtWeek1Sunday.TabIndex = 353
            txtWeek1Sunday.Text = "0.00"
            txtWeek1Sunday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtWeek1Sunday)
    
            REM Label: Week 2
            lblWeek2 = New Label()
            lblWeek2.AutoSize = True
            lblWeek2.Location = New System.Drawing.Point(14, 153)
            lblWeek2.TabIndex = 362
            lblWeek2.Text = "Week 2:"
            Controls.Add(lblWeek2)
    
            REM Text Box: Week 2 - Monday
            txtWeek2Monday = New TextBox()
            txtWeek2Monday.Location = New System.Drawing.Point(98, 150)
            txtWeek2Monday.Size = New System.Drawing.Size(51, 20)
            txtWeek2Monday.TabIndex = 354
            txtWeek2Monday.Text = "0.00"
            txtWeek2Monday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtWeek2Monday)
    
            REM Text Box: Week 2 - Tuesday
            txtWeek2Tuesday = New TextBox()
            txtWeek2Tuesday.Location = New System.Drawing.Point(155, 150)
            txtWeek2Tuesday.Size = New System.Drawing.Size(51, 20)
            txtWeek2Tuesday.TabIndex = 355
            txtWeek2Tuesday.Text = "0.00"
            txtWeek2Tuesday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtWeek2Tuesday)
    
            REM Text Box: Week 2 - Wednesday
            txtWeek2Wednesday = New TextBox()
            txtWeek2Wednesday.Location = New System.Drawing.Point(212, 150)
            txtWeek2Wednesday.Size = New System.Drawing.Size(51, 20)
            txtWeek2Wednesday.TabIndex = 356
            txtWeek2Wednesday.Text = "0.00"
            txtWeek2Wednesday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtWeek2Wednesday)
    
            REM Text Box: Week 2 - Thursday
            txtWeek2Thursday = New TextBox()
            txtWeek2Thursday.Location = New System.Drawing.Point(269, 150)
            txtWeek2Thursday.Size = New System.Drawing.Size(51, 20)
            txtWeek2Thursday.TabIndex = 357
            txtWeek2Thursday.Text = "0.00"
            txtWeek2Thursday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtWeek2Thursday)
    
            REM Text Box: Week 2 - Friday
            txtWeek2Friday = New TextBox()
            txtWeek2Friday.Location = New System.Drawing.Point(326, 150)
            txtWeek2Friday.Size = New System.Drawing.Size(51, 20)
            txtWeek2Friday.TabIndex = 358
            txtWeek2Friday.Text = "0.00"
            txtWeek2Friday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtWeek2Friday)
    
            REM Text Box: Week 2 - Saturday
            txtWeek2Saturday = New TextBox()
            txtWeek2Saturday.Location = New System.Drawing.Point(383, 150)
            txtWeek2Saturday.Size = New System.Drawing.Size(51, 20)
            txtWeek2Saturday.TabIndex = 359
            txtWeek2Saturday.Text = "0.00"
            txtWeek2Saturday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtWeek2Saturday)
    
            REM Text Box: Week 2 - Sunday
            txtWeek2Sunday = New TextBox()
            txtWeek2Sunday.Location = New System.Drawing.Point(440, 150)
            txtWeek2Sunday.Size = New System.Drawing.Size(51, 20)
            txtWeek2Sunday.TabIndex = 360
            txtWeek2Sunday.Text = "0.00"
            txtWeek2Sunday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtWeek2Sunday)
    
            REM Label: Line 2
            lblLine2 = New Label()
            lblLine2.AutoSize = True
            lblLine2.Location = New System.Drawing.Point(13, 181)
            lblLine2.TabIndex = 335
            lblLine2.Text = "---------------------------------------------------------------------------------------------------------------------------------------------------------------"
            Controls.Add(lblLine2)
    
            REM Label: Time Sheet ID
            lblTimeSheetID = New Label()
            lblTimeSheetID.AutoSize = True
            lblTimeSheetID.Location = New System.Drawing.Point(14, 211)
            lblTimeSheetID.TabIndex = 366
            lblTimeSheetID.Text = "Time Sheet #:"
            Controls.Add(lblTimeSheetID)
    
            REM Text Box: TimeSheetID
            txtTimeSheetID = New TextBox()
            txtTimeSheetID.Location = New System.Drawing.Point(98, 208)
            txtTimeSheetID.Size = New System.Drawing.Size(80, 20)
            txtTimeSheetID.TabIndex = 367
            txtTimeSheetID.Text = "1001"
            Controls.Add(txtTimeSheetID)
    
            REM Button: Update
            btnUpdate = New Button()
            btnUpdate.Location = New System.Drawing.Point(199, 205)
            btnUpdate.Size = New System.Drawing.Size(75, 23)
            btnUpdate.TabIndex = 337
            btnUpdate.Text = "Update"
            Controls.Add(btnUpdate)
    
            REM Button: Submit
            btnSubmit = New Button()
            btnSubmit.Location = New System.Drawing.Point(328, 205)
            btnSubmit.Size = New System.Drawing.Size(75, 23)
            btnSubmit.TabIndex = 338
            btnSubmit.Text = "Submit"
            Controls.Add(btnSubmit)
    
            REM Button: Close
            btnClose = New Button()
            btnClose.Location = New System.Drawing.Point(416, 205)
            btnClose.Size = New System.Drawing.Size(75, 23)
            btnClose.TabIndex = 339
            btnClose.Text = "Close"
            Controls.Add(btnClose)
    
            REM Form: Time Sheet
            ClientSize = New System.Drawing.Size(510, 243)
            MaximizeBox = False
            StartPosition = FormStartPosition.CenterScreen
            Text = "Fun Department Store: Employee - New Time Sheet"
        End Sub
    
        Private Sub TimeSheetLoad(ByVal sender As Object, ByVal e As EventArgs) Handles me.load
            Dim iTimeSheetID = 1000
    
            Dim xdTimeSheets As XmlDocument = New XmlDocument()
            Dim strTimeSheetsFile = "C:\Fun Department Store - Payroll\TimeSheets.xml"
    
            If File.Exists(strTimeSheetsFile) Then
                xdTimeSheets.Load(strTimeSheetsFile)
    
                Dim xnlTimeSheets As XmlNodeList = xdTimeSheets.DocumentElement.SelectNodes("/TimeSheets/TimeSheet/TimeSheetID")
    
                For Each xnTimeSheet As XmlNode In xnlTimeSheets
                    iTimeSheetID = CInt(xnTimeSheet.InnerText)
                Next
            End If
    
            txtTimeSheetID.Text = (iTimeSheetID + 1).ToString()
    
            btnUpdate.Visible = False
        End Sub
    
        Private Sub txtEmployeeNumberLeave(ByVal sender As Object, ByVal e As EventArgs) Handles txtEmployeeNumber.leave
            Dim xdEmployees As XmlDocument = New XmlDocument()
            Dim strEmployeesFile As String = "C:\Fun Department Store - Payroll\Employees.xml"
    
            If File.Exists(strEmployeesFile) Then
                xdEmployees.Load(strEmployeesFile)
    
    
                Dim xnlEmployees As XmlNodeList = xdEmployees.DocumentElement.SelectNodes("/Employees/Employee/EmployeeNumber(.='" & txtEmployeeNumber.Text & "')")
    
                For Each xnEmployee As XmlNode In xnlEmployees
                    txtEmployeeName.Text = xnEmployee.NextSibling.InnerText & " " & xnEmployee.NextSibling.NextSibling.InnerText
                Next
    
                txtWeek1Monday.Text = "0.00"
                txtWeek1Tuesday.Text = "0.00"
                txtWeek1Wednesday.Text = "0.00"
                txtWeek1Thursday.Text = "0.00"
                txtWeek1Friday.Text = "0.00"
                txtWeek1Saturday.Text = "0.00"
                txtWeek1Sunday.Text = "0.00"
                txtWeek2Monday.Text = "0.00"
                txtWeek2Tuesday.Text = "0.00"
                txtWeek2Wednesday.Text = "0.00"
                txtWeek2Thursday.Text = "0.00"
                txtWeek2Friday.Text = "0.00"
                txtWeek2Saturday.Text = "0.00"
                txtWeek2Sunday.Text = "0.00"
            End If
        End Sub
    
        Private Sub dtpStartDateCloseUp(ByVal sender As Object, ByVal e As EventArgs) Handles dtpStartDate.CloseUp
            Dim xdTimeSheets As XmlDocument = New XmlDocument()
            Dim strTimeSheetsFile = "C:\Fun Department Store - Payroll\TimeSheets.xml"
    
            Dim dtStartDate = dtpStartDate.Value
            txtEndDate.Text = dtStartDate.AddDays(13).ToShortDateString()
    
            If File.Exists(strTimeSheetsFile) Then
                Using fsTimeSheets As FileStream = New FileStream(strTimeSheetsFile, FileMode.Open, FileAccess.Read)
                    xdTimeSheets.Load(fsTimeSheets)
    
                    Dim xnlTimeSheets As XmlNodeList = xdTimeSheets.DocumentElement.SelectNodes("/TimeSheets/TimeSheet/EmployeeNumber(.='" & txtEmployeeNumber.Text & "')")
    
                    For Each xnTimeSheet As XmlNode In xnlTimeSheets
                        If xnTimeSheet.NextSibling.InnerText = dtpStartDate.Value.ToShortDateString() Then
                            txtTimeSheetID.Text = xnTimeSheet.PreviousSibling.InnerText
                            txtWeek1Monday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.InnerText))
                            txtWeek1Tuesday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.InnerText))
                            txtWeek1Wednesday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtWeek1Thursday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtWeek1Friday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtWeek1Saturday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtWeek1Sunday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
    
                            txtWeek2Monday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtWeek2Tuesday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtWeek2Wednesday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtWeek2Thursday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtWeek2Friday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtWeek2Saturday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtWeek2Sunday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
    
                            btnUpdate.Visible = True
                            btnSubmit.Visible = False
                        End If
                    Next
                End Using
            End If
        End Sub
    
        Private Sub btnUpdateClick(ByVal sender As Object, ByVal e As EventArgs) Handles btnUpdate.Click
            Dim xdTimeSheets As XmlDocument = New XmlDocument()
            Dim strTimeSheetsFile = "C:\Fun Department Store - Payroll\TimeSheets.xml"
    
            Using fsTimeSheets As FileStream = New FileStream(strTimeSheetsFile, FileMode.Open, FileAccess.Read)
                xdTimeSheets.Load(fsTimeSheets)
    
                Dim xnlTimeSheets As XmlNodeList = xdTimeSheets.GetElementsByTagName("TimeSheetID")
    
                For Each xnTimeSheet As XmlNode In xnlTimeSheets
                    If xnTimeSheet.InnerText = txtTimeSheetID.Text Then
                        xnTimeSheet.ParentNode.InnerXml = "<TimeSheetID>" & cint(txtTimeSheetID.Text) & "</TimeSheetID>" &
                                                          "<EmployeeNumber>" & txtEmployeeNumber.Text & "</EmployeeNumber>" &
                                                          "<StartDate>" & dtpStartDate.Value.ToShortDateString() & "</StartDate>" &
                                                          "<Week1Monday>" & cdbl(txtWeek1Monday.Text) & "</Week1Monday>" &
                                                          "<Week1Tuesday>" & cdbl(txtWeek1Tuesday.Text) & "</Week1Tuesday>" &
                                                          "<Week1Wednesday>" & cdbl(txtWeek1Wednesday.Text) & "</Week1Wednesday>" &
                                                          "<Week1Thursday>" & cdbl(txtWeek1Thursday.Text) & "</Week1Thursday>" &
                                                          "<Week1Friday>" & cdbl(txtWeek1Friday.Text) & "</Week1Friday>" &
                                                          "<Week1Saturday>" & cdbl(txtWeek1Saturday.Text) & "</Week1Saturday>" &
                                                          "<Week1Sunday>" & cdbl(txtWeek1Sunday.Text) & "</Week1Sunday>" &
                                                          "<Week2Monday>" & cdbl(txtWeek2Monday.Text) & "</Week2Monday>" &
                                                          "<Week2Tuesday>" & cdbl(txtWeek2Tuesday.Text) & "</Week2Tuesday>" &
                                                          "<Week2Wednesday>" & cdbl(txtWeek2Wednesday.Text) & "</Week2Wednesday>" &
                                                          "<Week2Thursday>" & cdbl(txtWeek2Thursday.Text) & "</Week2Thursday>" &
                                                          "<Week2Friday>" & cdbl(txtWeek2Friday.Text) & "</Week2Friday>" &
                                                          "<Week2Saturday>" & cdbl(txtWeek2Saturday.Text) & "</Week2Saturday>" &
                                                          "<Week2Sunday>" & cdbl(txtWeek2Sunday.Text) & "</Week2Sunday>"
                        Exit For
                    End If
                Next
            End Using
    
            Using fsTimeSheets As FileStream = New FileStream(strTimeSheetsFile, FileMode.Create, FileAccess.Write)
                xdTimeSheets.Save(fsTimeSheets)
    
                msgbox("The employee's time sheet has been updated.",
                                MsgBoxStyle.OKOnly Or MsgBoxStyle.Information,
                                "FunDS - Employees Records")
            End Using
    
            Close()
        End Sub
    
        Private Sub btnSubmitClick(ByVal sender As Object, ByVal e As EventArgs) Handles btnSubmit.Click
            Dim xdTimeSheets As XmlDocument = New XmlDocument()
            Dim strTimeSheetsFile = "C:\Fun Department Store - Payroll\TimeSheets.xml"
    
            If Not File.Exists(strTimeSheetsFile) Then
                xdTimeSheets.LoadXml("<?xml version=""1.0"" encoding=""utf-8""?>" &
                                     "<TimeSheets></TimeSheets>")
                xdTimeSheets.Save(strTimeSheetsFile)
            End If
    
            xdTimeSheets.Load(strTimeSheetsFile)
    
            Dim xeTimeSheet As XmlElement = xdTimeSheets.CreateElement("TimeSheet")
            xeTimeSheet.InnerXml = "<TimeSheetID>" & cint(txtTimeSheetID.Text) & "</TimeSheetID>" &
                                   "<EmployeeNumber>" & txtEmployeeNumber.Text & "</EmployeeNumber>" &
                                   "<StartDate>" & dtpStartDate.Value.ToShortDateString() & "</StartDate>" &
                                   "<Week1Monday>" & cdbl(txtWeek1Monday.Text) & "</Week1Monday>" &
                                   "<Week1Tuesday>" & cdbl(txtWeek1Tuesday.Text) & "</Week1Tuesday>" &
                                   "<Week1Wednesday>" & cdbl(txtWeek1Wednesday.Text) & "</Week1Wednesday>" &
                                   "<Week1Thursday>" & cdbl(txtWeek1Thursday.Text) & "</Week1Thursday>" &
                                   "<Week1Friday>" & cdbl(txtWeek1Friday.Text) & "</Week1Friday>" &
                                   "<Week1Saturday>" & cdbl(txtWeek1Saturday.Text) & "</Week1Saturday>" &
                                   "<Week1Sunday>" & cdbl(txtWeek1Sunday.Text) & "</Week1Sunday>" &
                                   "<Week2Monday>" & cdbl(txtWeek2Monday.Text) & "</Week2Monday>" &
                                   "<Week2Tuesday>" & cdbl(txtWeek2Tuesday.Text) & "</Week2Tuesday>" &
                                   "<Week2Wednesday>" & cdbl(txtWeek2Wednesday.Text) & "</Week2Wednesday>" &
                                   "<Week2Thursday>" & cdbl(txtWeek2Thursday.Text) & "</Week2Thursday>" &
                                   "<Week2Friday>" & cdbl(txtWeek2Friday.Text) & "</Week2Friday>" &
                                   "<Week2Saturday>" & cdbl(txtWeek2Saturday.Text) & "</Week2Saturday>" &
                                   "<Week2Sunday>" & cdbl(txtWeek2Sunday.Text) & "</Week2Sunday>"
    
            xdTimeSheets.DocumentElement.AppendChild(xeTimeSheet)
            xdTimeSheets.Save(strTimeSheetsFile)
    
            Close()
        End Sub
    
        Private Sub btnCloseClick(ByVal sender As Object, ByVal e As EventArgs) Handles btnclose.Click
            Close()
        End Sub
    
    End Class
  2. On the main menu, click File -> New
  3. When asked whether you want to save, click Save (or Yes)
  4. Set the Save As Type to All Files
  5. Set the File Name to TimeSheet.vb and press Enter

Overtime and the Weekly Time Sheet

The easiest way to calculate the values of a time sheet is to simply add the time worked for each day to get the total time worked. If an employee worked some limited time, this is fine. Most companies pay overtime if an employee works beyond a certain amount of time. There are different techniques to apply or to calculate overtime, but there are two broad categories.

The time worked can be considered on a weekly basis. In this case, an employee typically works 5 days a week for 40 hours. Any period over 40 hours is considered overtime.

Practical LearningPractical Learning: Evaluating a Payroll

  1. In the empty document, type the following:
    Imports System
    Imports System.IO
    Imports System.Xml
    Imports System.Drawing
    imports System.Windows.Forms
    
    Public Class PayrollSummary1
        Inherits Form
    
        Private lblStartDate As Label
        Private dtpStartDate As DateTimePicker
        Private lblEmployeeNumber As Label
        Private WithEvents txtEmployeeNumber As TextBox
        Private txtEmployeeName As TextBox
        Private WithEvents btnFind As Button
        Private lblHourlySalary As Label
        Private txtHourlySalary As TextBox
        Private lblTimeSheetID As Label
        Private txtTimeSheetID As TextBox
    
        Private lblDoubleLine1 As Label
    
        Private lblTimeSheetMonday As Label
        Private lblTimeSheetTuesday As Label
        Private lblTimeSheetWednesday As Label
        Private lblTimeSheetThursday As Label
        Private lblTimeSheetFriday As Label
        Private lblTimeSheetSaturday As Label
        Private lblTimeSheetSunday As Label
        Private lblTotals As Label
    
        Private lblTimeSheetWeek1 As Label
        Private txtTSWk1Monday As TextBox
        Private txtTSWk1Tuesday As TextBox
        Private txtTSWk1Wednesday As TextBox
        Private txtTSWk1Thursday As TextBox
        Private txtTSWk1Friday As TextBox
        Private txtTSWk1Saturday As TextBox
        Private txtTSWk1Sunday As TextBox
        Private txtTotalTimeWeek1 As TextBox
    
        Private lblLineWeek1Summary As Label
    
        Private lblTimeSheetWeek2 As Label
        Private txtTSWk2Monday As TextBox
        Private txtTSWk2Tuesday As TextBox
        Private txtTSWk2Wednesday As TextBox
        Private txtTSWk2Thursday As TextBox
        Private txtTSWk2Friday As TextBox
        Private txtTSWk2Saturday As TextBox
        Private txtTSWk2Sunday As TextBox
        Private txtTotalTimeWeek2 As TextBox
    
        Private lblDoubleLine2 As Label
    
        Private lblTime As Label
        Private lblPay As Label
        Private lblRegular As Label
        Private txtRegularTime As TextBox
        Private txtRegularPay As TextBox
        Private lblOvertime As Label
        Private txtOvertime As TextBox
        Private txtOvertimePay As TextBox
        Private lblGrossSalary As Label
        Private txtGrossSalary As TextBox
    
        Private WithEvents btnClose As Button
        Private lblDoubleLine3 As Label
    
        Public Sub New()
            InitializeComponent()
        End Sub
    
        Private Sub InitializeComponent()
            REM Label: Start Date
            lblStartDate = New Label()
            lblStartDate.AutoSize = True
            lblStartDate.Location = New System.Drawing.Point(22, 22)
            lblStartDate.TabIndex = 344
            lblStartDate.Text = "Start Date:"
            Controls.Add(lblStartDate)
    
            REM Date/Time Picker: Start Date
            dtpStartDate = New DateTimePicker()
            dtpStartDate.Location = New System.Drawing.Point(100, 18)
            dtpStartDate.Size = New System.Drawing.Size(200, 20)
            dtpStartDate.TabIndex = 346
            Controls.Add(dtpStartDate)
    
            REM Label: Employee Number
            lblEmployeeNumber = New Label()
            lblEmployeeNumber.AutoSize = True
            lblEmployeeNumber.Location = New System.Drawing.Point(21, 49)
            lblEmployeeNumber.TabIndex = 347
            lblEmployeeNumber.Text = "Employee #:"
            Controls.Add(lblEmployeeNumber)
    
            REM Text Box: Employee Number
            txtEmployeeNumber = New TextBox()
            txtEmployeeNumber.Location = New System.Drawing.Point(100, 46)
            txtEmployeeNumber.Size = New System.Drawing.Size(64, 20)
            txtEmployeeNumber.TabIndex = 348
            Controls.Add(txtEmployeeNumber)
    
            REM Text Box: Employee Name
            txtEmployeeName = New TextBox()
            txtEmployeeName.Location = New System.Drawing.Point(170, 46)
            txtEmployeeName.Size = New System.Drawing.Size(200, 20)
            txtEmployeeName.TabIndex = 376
            Controls.Add(txtEmployeeName)
    
            REM Button: Find
            btnFind = New Button()
            btnFind.Location = New System.Drawing.Point(384, 46)
            btnFind.Size = New System.Drawing.Size(75, 23)
            btnFind.TabIndex = 508
            btnFind.Text = "Find"
            Controls.Add(btnFind)
    
            REM Label: Hourly Salary
            lblHourlySalary = New Label()
            lblHourlySalary.AutoSize = True
            lblHourlySalary.Location = New System.Drawing.Point(20, 75)
            lblHourlySalary.TabIndex = 353
            lblHourlySalary.Text = "Hourly Salary:"
            Controls.Add(lblHourlySalary)
    
            REM Text Box: Hourly Salary
            txtHourlySalary = New TextBox()
            txtHourlySalary.Location = New System.Drawing.Point(100, 72)
            txtHourlySalary.Size = New System.Drawing.Size(64, 20)
            txtHourlySalary.TabIndex = 380
            txtHourlySalary.Text = "0.00"
            txtHourlySalary.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtHourlySalary)
    
            REM Label: Time Sheet ID
            lblTimeSheetID = New Label()
            lblTimeSheetID.Visible = False
            lblTimeSheetID.AutoSize = True
            lblTimeSheetID.Location = New System.Drawing.Point(209, 75)
            lblTimeSheetID.TabIndex = 494
            lblTimeSheetID.Text = "Time Sheet #:"
            Controls.Add(lblTimeSheetID)
    
            REM Text Box: Time Sheet ID
            txtTimeSheetID = New TextBox()
            txtTimeSheetID.Visible = False
            txtTimeSheetID.Location = New System.Drawing.Point(290, 72)
            txtTimeSheetID.Size = New System.Drawing.Size(80, 20)
            txtTimeSheetID.TabIndex = 495
            Controls.Add(txtTimeSheetID)
    
            REM Label: Double Line 1
            lblDoubleLine1 = New Label()
            lblDoubleLine1.AutoSize = True
            lblDoubleLine1.Location = New System.Drawing.Point(17, 98)
            lblDoubleLine1.TabIndex = 506
            lblDoubleLine1.Text = "============================================="
            Controls.Add(lblDoubleLine1)
    
            REM Label: Time Sheet Monday
            lblTimeSheetMonday = New Label()
            lblTimeSheetMonday.AutoSize = True
            lblTimeSheetMonday.Location = New System.Drawing.Point(94, 119)
            lblTimeSheetMonday.TabIndex = 356
            lblTimeSheetMonday.Text = "Monday"
            Controls.Add(lblTimeSheetMonday)
    
            REM Label: Time Sheet Tuesday
            lblTimeSheetTuesday = New Label()
            lblTimeSheetTuesday.AutoSize = True
            lblTimeSheetTuesday.Location = New System.Drawing.Point(151, 119)
            lblTimeSheetTuesday.TabIndex = 357
            lblTimeSheetTuesday.Text = "Tuesday"
            Controls.Add(lblTimeSheetTuesday)
    
            REM Label: Time Sheet Wednesday
            lblTimeSheetWednesday = New Label()
            lblTimeSheetWednesday.AutoSize = True
            lblTimeSheetWednesday.Location = New System.Drawing.Point(205, 119)
            lblTimeSheetWednesday.TabIndex = 358
            lblTimeSheetWednesday.Text = "Wednesday"
            Controls.Add(lblTimeSheetWednesday)
    
            REM Label: Time Sheet Thursday
            lblTimeSheetThursday = New Label()
            lblTimeSheetThursday.AutoSize = True
            lblTimeSheetThursday.Location = New System.Drawing.Point(269, 119)
            lblTimeSheetThursday.TabIndex = 359
            lblTimeSheetThursday.Text = "Thursday"
            Controls.Add(lblTimeSheetThursday)
    
            REM Label: Time Sheet Friday
            lblTimeSheetFriday = New Label()
            lblTimeSheetFriday.AutoSize = True
            lblTimeSheetFriday.Location = New System.Drawing.Point(324, 119)
            lblTimeSheetFriday.TabIndex = 360
            lblTimeSheetFriday.Text = "Friday"
            Controls.Add(lblTimeSheetFriday)
    
            REM Label: Time Sheet Saturday
            lblTimeSheetSaturday = New Label()
            lblTimeSheetSaturday.AutoSize = True
            lblTimeSheetSaturday.Location = New System.Drawing.Point(381, 119)
            lblTimeSheetSaturday.TabIndex = 361
            lblTimeSheetSaturday.Text = "Saturday"
            Controls.Add(lblTimeSheetSaturday)
    
            REM Label: Time Sheet Sunday
            lblTimeSheetSunday = New Label()
            lblTimeSheetSunday.AutoSize = True
            lblTimeSheetSunday.Location = New System.Drawing.Point(436, 119)
            lblTimeSheetSunday.TabIndex = 362
            lblTimeSheetSunday.Text = "Sunday"
            Controls.Add(lblTimeSheetSunday)
    
            REM Label: Totals
            lblTotals = New Label()
            lblTotals.AutoSize = True
            lblTotals.Location = New System.Drawing.Point(509, 119)
            lblTotals.TabIndex = 385
            lblTotals.Text = "Total"
            Controls.Add(lblTotals)
    
            REM Label: Time Sheet Week 1
            lblTimeSheetWeek1 = New Label()
            lblTimeSheetWeek1.AutoSize = True
            lblTimeSheetWeek1.Location = New System.Drawing.Point(30, 141)
            lblTimeSheetWeek1.TabIndex = 355
            lblTimeSheetWeek1.Text = "Week 1:"
            Controls.Add(lblTimeSheetWeek1)
    
            REM Text Box: Time Sheet Week 1 - Monday
            txtTSWk1Monday = New TextBox()
            txtTSWk1Monday.Location = New System.Drawing.Point(97, 138)
            txtTSWk1Monday.Size = New System.Drawing.Size(51, 20)
            txtTSWk1Monday.TabIndex = 363
            txtTSWk1Monday.Text = "0.00"
            txtTSWk1Monday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTSWk1Monday)
    
            REM Text Box: Time Sheet Week 1 - Tuesday
            txtTSWk1Tuesday = New TextBox()
            txtTSWk1Tuesday.Location = New System.Drawing.Point(154, 138)
            txtTSWk1Tuesday.Size = New System.Drawing.Size(51, 20)
            txtTSWk1Tuesday.TabIndex = 364
            txtTSWk1Tuesday.Text = "0.00"
            txtTSWk1Tuesday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTSWk1Tuesday)
    
            REM Text Box: Time Sheet Week 1 - Wednesday
            txtTSWk1Wednesday = New TextBox()
            txtTSWk1Wednesday.Location = New System.Drawing.Point(211, 138)
            txtTSWk1Wednesday.Size = New System.Drawing.Size(51, 20)
            txtTSWk1Wednesday.TabIndex = 365
            txtTSWk1Wednesday.Text = "0.00"
            txtTSWk1Wednesday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTSWk1Wednesday)
    
            REM Text Box: Time Sheet Week 1 - Thursday
            txtTSWk1Thursday = New TextBox()
            txtTSWk1Thursday.Location = New System.Drawing.Point(268, 138)
            txtTSWk1Thursday.Size = New System.Drawing.Size(51, 20)
            txtTSWk1Thursday.TabIndex = 366
            txtTSWk1Thursday.Text = "0.00"
            txtTSWk1Thursday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTSWk1Thursday)
    
            REM Text Box: Time Sheet Week 1 - Friday
            txtTSWk1Friday = New TextBox()
            txtTSWk1Friday.Location = New System.Drawing.Point(325, 138)
            txtTSWk1Friday.Size = New System.Drawing.Size(51, 20)
            txtTSWk1Friday.TabIndex = 367
            txtTSWk1Friday.Text = "0.00"
            txtTSWk1Friday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTSWk1Friday)
    
            REM Text Box: Time Sheet Week 1 - Saturday
            txtTSWk1Saturday = New TextBox()
            txtTSWk1Saturday.Location = New System.Drawing.Point(382, 138)
            txtTSWk1Saturday.Size = New System.Drawing.Size(51, 20)
            txtTSWk1Saturday.TabIndex = 368
            txtTSWk1Saturday.Text = "0.00"
            txtTSWk1Saturday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTSWk1Saturday)
    
            REM Text Box: Time Sheet Week 1 - Sunday
            txtTSWk1Sunday = New TextBox()
            txtTSWk1Sunday.Location = New System.Drawing.Point(439, 138)
            txtTSWk1Sunday.Size = New System.Drawing.Size(51, 20)
            txtTSWk1Sunday.TabIndex = 369
            txtTSWk1Sunday.Text = "0.00"
            txtTSWk1Sunday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTSWk1Sunday)
    
            REM Text Box: Total Time Week 1
            txtTotalTimeWeek1 = New TextBox()
            txtTotalTimeWeek1.Location = New System.Drawing.Point(507, 138)
            txtTotalTimeWeek1.Size = New System.Drawing.Size(51, 20)
            txtTotalTimeWeek1.TabIndex = 496
            txtTotalTimeWeek1.Text = "0.00"
            txtTotalTimeWeek1.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTotalTimeWeek1)
    
            REM Label: Line Week 1 - Summary
            lblLineWeek1Summary = New Label()
            lblLineWeek1Summary.AutoSize = True
            lblLineWeek1Summary.Location = New System.Drawing.Point(17, 163)
            lblLineWeek1Summary.TabIndex = 370
            lblLineWeek1Summary.Text = "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
            Controls.Add(lblLineWeek1Summary)
    
            REM Label: Time Sheet Week 2
            lblTimeSheetWeek2 = New Label()
            lblTimeSheetWeek2.AutoSize = True
            lblTimeSheetWeek2.Location = New System.Drawing.Point(30, 192)
            lblTimeSheetWeek2.TabIndex = 435
            lblTimeSheetWeek2.Text = "Week 2:"
            Controls.Add(lblTimeSheetWeek2)
            REM 
            REM Text Box: Time Sheet Week 2 - Monday
            txtTSWk2Monday = New TextBox()
            txtTSWk2Monday.Location = New System.Drawing.Point(97, 187)
            txtTSWk2Monday.Size = New System.Drawing.Size(51, 20)
            txtTSWk2Monday.TabIndex = 436
            txtTSWk2Monday.Text = "0.00"
            txtTSWk2Monday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTSWk2Monday)
    
            REM Text Box: Time Sheet Week 2 - Tuesday
            txtTSWk2Tuesday = New TextBox()
            txtTSWk2Tuesday.Location = New System.Drawing.Point(155, 188)
            txtTSWk2Tuesday.Size = New System.Drawing.Size(51, 20)
            txtTSWk2Tuesday.TabIndex = 437
            txtTSWk2Tuesday.Text = "0.00"
            txtTSWk2Tuesday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTSWk2Tuesday)
    
            REM Text Box: Time Sheet Week 2 - Wednesday
            txtTSWk2Wednesday = New TextBox()
            txtTSWk2Wednesday.Location = New System.Drawing.Point(212, 189)
            txtTSWk2Wednesday.Size = New System.Drawing.Size(51, 20)
            txtTSWk2Wednesday.TabIndex = 438
            txtTSWk2Wednesday.Text = "0.00"
            txtTSWk2Wednesday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTSWk2Wednesday)
    
            REM Text Box: Time Sheet Week 2 - Thursday
            txtTSWk2Thursday = New TextBox()
            txtTSWk2Thursday.Location = New System.Drawing.Point(269, 187)
            txtTSWk2Thursday.Size = New System.Drawing.Size(51, 20)
            txtTSWk2Thursday.TabIndex = 439
            txtTSWk2Thursday.Text = "0.00"
            txtTSWk2Thursday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTSWk2Thursday)
    
            REM Text Box: Time Sheet Week 2 - Friday
            txtTSWk2Friday = New TextBox()
            txtTSWk2Friday.Location = New System.Drawing.Point(326, 187)
            txtTSWk2Friday.Size = New System.Drawing.Size(51, 20)
            txtTSWk2Friday.TabIndex = 440
            txtTSWk2Friday.Text = "0.00"
            txtTSWk2Friday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTSWk2Friday)
    
            REM Text Box: Time Sheet Week 2 - Saturday
            txtTSWk2Saturday = New TextBox()
            txtTSWk2Saturday.Location = New System.Drawing.Point(383, 187)
            txtTSWk2Saturday.Size = New System.Drawing.Size(51, 20)
            txtTSWk2Saturday.TabIndex = 441
            txtTSWk2Saturday.Text = "0.00"
            txtTSWk2Saturday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTSWk2Saturday)
    
            REM Text Box: Time Sheet Week 2 - Sunday
            txtTSWk2Sunday = New TextBox()
            txtTSWk2Sunday.Location = New System.Drawing.Point(440, 187)
            txtTSWk2Sunday.Size = New System.Drawing.Size(51, 20)
            txtTSWk2Sunday.TabIndex = 442
            txtTSWk2Sunday.Text = "0.00"
            txtTSWk2Sunday.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTSWk2Sunday)
    
            REM Text Box: Total Time Week 2
            txtTotalTimeWeek2 = New TextBox()
            txtTotalTimeWeek2.Location = New System.Drawing.Point(507, 189)
            txtTotalTimeWeek2.Size = New System.Drawing.Size(51, 20)
            txtTotalTimeWeek2.TabIndex = 501
            txtTotalTimeWeek2.Text = "0.00"
            txtTotalTimeWeek2.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtTotalTimeWeek2)
    
            REM Label: DoubleLine2
            lblDoubleLine2 = New Label()
            lblDoubleLine2.AutoSize = True
            lblDoubleLine2.Location = New System.Drawing.Point(17, 215)
            lblDoubleLine2.TabIndex = 434
            lblDoubleLine2.Text = "============================================="
            Controls.Add(lblDoubleLine2)
    
            REM Label: Time
            lblTime = New Label()
            lblTime.AutoSize = True
            lblTime.Location = New System.Drawing.Point(265, 235)
            lblTime.TabIndex = 386
            lblTime.Text = "Time"
            Controls.Add(lblTime)
    
            REM Label: Pay
            lblPay = New Label()
            lblPay.AutoSize = True
            lblPay.Location = New System.Drawing.Point(324, 235)
            lblPay.Size = New System.Drawing.Size(25, 13)
            lblPay.TabIndex = 387
            lblPay.Text = "Pay"
            Controls.Add(lblPay)
    
            REM Label: Regular
            lblRegular = New Label()
            lblRegular.AutoSize = True
            lblRegular.Location = New System.Drawing.Point(187, 256)
            lblRegular.TabIndex = 388
            lblRegular.Text = "Regular:"
            Controls.Add(lblRegular)
    
            REM Text Box: Regular Time
            txtRegularTime = New TextBox()
            txtRegularTime.Location = New System.Drawing.Point(268, 253)
            txtRegularTime.Size = New System.Drawing.Size(51, 20)
            txtRegularTime.TabIndex = 389
            txtRegularTime.Text = "0.00"
            txtRegularTime.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtRegularTime)
    
            REM Text Box: RegularPay
            txtRegularPay = New TextBox()
            txtRegularPay.Location = New System.Drawing.Point(325, 253)
            txtRegularPay.Size = New System.Drawing.Size(51, 20)
            txtRegularPay.TabIndex = 390
            txtRegularPay.Text = "0.00"
            txtRegularPay.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtRegularPay)
    
            REM Label: Overtime
            lblOvertime = New Label()
            lblOvertime.AutoSize = True
            lblOvertime.Location = New System.Drawing.Point(187, 282)
            lblOvertime.TabIndex = 402
            lblOvertime.Text = "Overtime:"
            Controls.Add(lblOvertime)
    
            REM Text Box: Overtime
            txtOvertime = New TextBox()
            txtOvertime.Location = New System.Drawing.Point(268, 279)
            txtOvertime.Size = New System.Drawing.Size(51, 20)
            txtOvertime.TabIndex = 391
            txtOvertime.Text = "0.00"
            txtOvertime.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtOvertime)
    
            REM Text Box: Overtime Pay
            txtOvertimePay = New TextBox()
            txtOvertimePay.Location = New System.Drawing.Point(325, 279)
            txtOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtOvertimePay.TabIndex = 392
            txtOvertimePay.Text = "0.00"
            txtOvertimePay.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtOvertimePay)
    
            REM Label: Gross Salary
            lblGrossSalary = New Label()
            lblGrossSalary.AutoSize = True
            lblGrossSalary.Location = New System.Drawing.Point(189, 312)
            lblGrossSalary.TabIndex = 403
            lblGrossSalary.Text = "Gross Salary:"
            Controls.Add(lblGrossSalary)
    
            REM Text Box: Gross Salary
            txtGrossSalary = New TextBox()
            txtGrossSalary.Location = New System.Drawing.Point(268, 309)
            txtGrossSalary.Size = New System.Drawing.Size(79, 20)
            txtGrossSalary.TabIndex = 393
            txtGrossSalary.Text = "0.00"
            txtGrossSalary.TextAlign = HorizontalAlignment.Right
            Controls.Add(txtGrossSalary)
    
            REM Button: Close
            btnClose = New Button()
            btnClose.Location = New System.Drawing.Point(465, 306)
            btnClose.Size = New System.Drawing.Size(75, 23)
            btnClose.TabIndex = 373
            btnClose.Text = "Close"
            Controls.Add(btnClose)
    
            REM Label: Double Line 3
            lblDoubleLine3 = New Label()
            lblDoubleLine3.AutoSize = True
            lblDoubleLine3.Location = New System.Drawing.Point(17, 341)
            lblDoubleLine3.TabIndex = 507
            lblDoubleLine3.Text = "============================================="
            Controls.Add(lblDoubleLine3)
    
            REM Form: Payroll Summary
            ClientSize = New System.Drawing.Size(582, 365)
            MaximizeBox = False
            StartPosition = FormStartPosition.CenterScreen
            Text = "Fun Department Store - Payroll Summary"
        End Sub
    
        Private Sub ResetForm()
            txtEmployeeName.Text = ""
            txtHourlySalary.Text = ""
    
            txtTSWk1Monday.Text = "0.00"
            txtTSWk1Tuesday.Text = "0.00"
            txtTSWk1Wednesday.Text = "0.00"
            txtTSWk1Thursday.Text = "0.00"
            txtTSWk1Friday.Text = "0.00"
            txtTSWk1Saturday.Text = "0.00"
            txtTSWk1Sunday.Text = "0.00"
            txtTotalTimeWeek1.Text = "0.00"
    
            txtTSWk2Monday.Text = "0.00"
            txtTSWk2Tuesday.Text = "0.00"
            txtTSWk2Wednesday.Text = "0.00"
            txtTSWk2Thursday.Text = "0.00"
            txtTSWk2Friday.Text = "0.00"
            txtTSWk2Saturday.Text = "0.00"
            txtTSWk2Sunday.Text = "0.00"
            txtTotalTimeWeek2.Text = "0.00"
    
            txtRegularTime.Text = "0.00"
            txtOvertime.Text = "0.00"
            txtRegularPay.Text = "0.00"
            txtOvertimePay.Text = "0.00"
    
            txtGrossSalary.Text = "0.00"
        End Sub
    
        Private Function GetWorkDaySummary(ByVal timeWorked As Double, ByVal hourlySalary As Double) As Tuple(Of Double, Double, Double, Double)
            Dim regTime = 0.0
            Dim overTime = 0.0
            Dim overtimeSalary = hourlySalary * 1.5
    
            If timeWorked <= 8.0 Then
                regTime = timeWorked
            Else
                regTime = 8.0
            End If
    
            If timeWorked <= 8.0 Then
                overTime = 0.0
            Else
                overTime = timeWorked - 8.0
            End If
    
            Dim regPay = regTime * hourlySalary
            Dim overPay = overTime * overtimeSalary
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overTime, regPay, overPay)
        End Function
    
        Private Sub txtEmployeeNumberLeave(ByVal sender As Object, ByVal e As EventArgs) Handles txtEmployeeNumber.Leave
            Dim employeeFound = False
            Dim xdEmployees As XmlDocument = New XmlDocument()
            Dim strEmployeesFile As String = "C:\Fun Department Store - Payroll\Employees.xml"
    
            If String.IsNullOrEmpty(txtEmployeeNumber.Text) Then
                Exit Sub
            End If
    
            If File.Exists(strEmployeesFile) Then
                Using fsEmployees As FileStream = New FileStream(strEmployeesFile, FileMode.Open, FileAccess.Read)
                    xdEmployees.Load(fsEmployees)
    
                    Dim xnlEmployees As XmlNodeList = xdEmployees.GetElementsByTagName("EmployeeNumber")
    
                    For Each xnEmployee As XmlNode In xnlEmployees
                        If xnEmployee.InnerText = txtEmployeeNumber.Text Then
                            txtEmployeeName.Text = xnEmployee.NextSibling.InnerText & " " & xnEmployee.NextSibling.NextSibling.InnerText
                            txtHourlySalary.Text = xnEmployee.NextSibling.NextSibling.NextSibling.InnerText
    
                            employeeFound = True
                        End If
                    Next
    
                    If employeeFound = False Then
                        msgbox("There is no staff member with that employee number.",
                                        MsgBoxStyle.OKOnly Or MsgBoxStyle.Information,
                                        "FunDS - Employees Time Sheets")
    
                        ResetForm()
                        Exit Sub
                    End If
                End Using
            End If
        End Sub
    
        Private Sub btnFindClick(ByVal sender As Object, ByVal e As EventArgs) Handles btnFind.Click
            Dim timeSheetFound = False
            Dim xdTimeSheets As XmlDocument = New XmlDocument()
            Dim strTimeSheetsFile = "C:\Fun Department Store - Payroll\TimeSheets.xml"
    
            Dim hourlySalary = 0.0
            Dim totalTimeWeek1 = 0.0, totalTimeWeek2 = 0.0
    
            Dim regularTimeWeek1 = 0.0
            Dim regularPayWeek1 = 0.0, overtimeWeek1 = 0.0, overtimePayWeek1 = 0.0
    
            Dim regularTimeWeek2 = 0.0
            Dim regularPayWeek2 = 0.0, overtimeWeek2 = 0.0, overtimePayWeek2 = 0.0
    
            Dim totalRegularTime = 0.0, totalOvertime = 0.0
            Dim totalRegularPay = 0.0, overtimePay = 0.0, totalEarnings = 0.0
    
            If String.IsNullOrEmpty(txtEmployeeNumber.Text) Then
                Exit Sub
            End If
    
            If File.Exists(strTimeSheetsFile) Then
                Using fsTimeSheets As FileStream = New FileStream(strTimeSheetsFile, FileMode.Open, FileAccess.Read)
                    xdTimeSheets.Load(fsTimeSheets)
    
                    Dim xnlTimeSheets As XmlNodeList = xdTimeSheets.DocumentElement.SelectNodes("/TimeSheets/TimeSheet/EmployeeNumber[.='" & txtEmployeeNumber.Text & "']")
    
                    For Each xnTimeSheet As XmlNode In xnlTimeSheets
                        If xnTimeSheet.NextSibling.InnerText = dtpStartDate.Value.ToShortDateString() Then
                            timeSheetFound = True
    
                            lblTimeSheetID.Visible = True
                            txtTimeSheetID.Visible = True
                            txtTimeSheetID.Text = xnTimeSheet.PreviousSibling.InnerText
    
                            txtTSWk1Monday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.InnerText))
                            txtTSWk1Tuesday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk1Wednesday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk1Thursday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk1Friday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk1Saturday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk1Sunday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
    
                            txtTSWk2Monday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk2Tuesday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk2Wednesday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk2Thursday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk2Friday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk2Saturday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk2Sunday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
    
                            totalTimeWeek1 = CDbl(txtTSWk1Monday.Text) + CDbl(txtTSWk1Tuesday.Text) + CDbl(txtTSWk1Wednesday.Text) + CDbl(txtTSWk1Thursday.Text) + CDbl(txtTSWk1Friday.Text) + CDbl(txtTSWk1Saturday.Text) + CDbl(txtTSWk1Sunday.Text)
                            totalTimeWeek2 = CDbl(txtTSWk2Monday.Text) + CDbl(txtTSWk2Tuesday.Text) + CDbl(txtTSWk2Wednesday.Text) + CDbl(txtTSWk2Thursday.Text) + CDbl(txtTSWk2Friday.Text) + CDbl(txtTSWk2Saturday.Text) + CDbl(txtTSWk2Sunday.Text)
    
                            Try
                                hourlySalary = CDbl(txtHourlySalary.Text)
                            Catch fe As FormatException
                                msgbox(fe.Message)
                            End Try
    
                            REM The overtime is paid time and half
                            Dim overtimeSalary = hourlySalary * 1.5
    
                            REM If the employee worked under 40 hours, there is no overtime
                            If totalTimeWeek1 < 40.0 Then
                                regularTimeWeek1 = totalTimeWeek1
                                regularPayWeek1 = hourlySalary * regularTimeWeek1
                                overtimeWeek1 = 0.0
                                overtimePayWeek1 = 0.0
                                REM If the employee worked over 40 hours, calculate the overtime
                            ElseIf totalTimeWeek1 >= 40.0 Then
                                regularTimeWeek1 = 40.0
                                regularPayWeek1 = hourlySalary * 40.0
                                overtimeWeek1 = totalTimeWeek1 - 40.0
                                overtimePayWeek1 = overtimeWeek1 * overtimeSalary
                            End If
    
                            If totalTimeWeek2 < 40.0 Then
                                regularTimeWeek2 = totalTimeWeek2
                                regularPayWeek2 = hourlySalary * regularTimeWeek2
                                overtimeWeek2 = 0.0
                                overtimePayWeek2 = 0.0
                            ElseIf totalTimeWeek2 >= 40.0 Then
                                regularTimeWeek2 = 40.0
                                regularPayWeek2 = hourlySalary * 40.0
                                overtimeWeek2 = totalTimeWeek2 - 40.0
                                overtimePayWeek2 = overtimeWeek2 * overtimeSalary
                            End If
    
                            txtTotalTimeWeek1.Text = FormatNumber(totalTimeWeek1)
                            txtTotalTimeWeek2.Text = FormatNumber(totalTimeWeek2)
    
                            totalRegularTime = regularTimeWeek1 + regularTimeWeek2
                            totalOvertime = overtimeWeek1 + overtimeWeek2
                            totalRegularPay = regularPayWeek1 + regularPayWeek2
                            overtimePay = overtimePayWeek1 + overtimePayWeek2
                            totalEarnings = totalRegularPay + overtimePay
    
                            txtRegularTime.Text = FormatNumber(totalRegularTime)
                            txtOvertime.Text = FormatNumber(totalOvertime)
                            txtRegularPay.Text = FormatNumber(totalRegularPay)
                            txtOvertimePay.Text = FormatNumber(overtimePay)
    
                            txtGrossSalary.Text = FormatNumber(totalEarnings)
                        End If
                    Next
    
                    If timeSheetFound = False Then
                        msgbox("There is no time sheet for that start date and that employee number.",
                                        MsgBoxStyle.OKOnly Or MsgBoxStyle.Information,
                                        "FunDS - Employees Time Sheets")
                    End If
                End Using
            End If
        End Sub
    
        Private Sub btnCloseClick(ByVal sender As Object, ByVal e As EventArgs) Handles btnclose.Click
            Close()
        End Sub
    
    End Class
  2. On the main menu, click File -> New
  3. When asked whether you want to save, click Save (or Yes)
  4. Set the Save As Type to All Files
  5. Set the File Name to PayrollEvaluation1.vb and press Enter
 
 
 

Overtime and the Daily Time Sheet

Another to calculate overtime considers each day on its own. In this case, a regular work day has 1 to 8 hours. Any period over 8 hours is considered overtime. As a result, an employee can work one or two days in a week and get overtime, just like another employee can work 5 or more days a week but not get overtime.

Practical LearningPractical Learning: Evaluating a Payroll

  1. In the empty document, type the following:
    Imports System
    Imports System.IO
    Imports System.Xml
    Imports System.Drawing
    Imports System.Windows.Forms
    
    Public Class PayrollSummary2
        Inherits Form
        Private lblStartDate As Label
        Private dtpStartDate As DateTimePicker
        Private WithEvents txtEmployeeNumber As TextBox
    
        Private lblHourlySalary As Label
        Private txtHourlySalary As TextBox
        Private lblTimeSheetID As Label
        Private txtTimeSheetID As TextBox
        Private WithEvents btnFind As Button
        Private txtTotalOvertimePayWeek2 As TextBox
        Private txtTotalRegularPayWeek2 As TextBox
        Private txtTotalOvertimeWeek2 As TextBox
        Private txtTotalRegularTimeWeek2 As TextBox
        Private txtTotalOvertimePayWeek1 As TextBox
        Private txtTotalRegularPayWeek1 As TextBox
        Private txtTotalOvertimeWeek1 As TextBox
        Private txtTotalRegularTimeWeek1 As TextBox
        Private txtTotalTimeWeek2 As TextBox
        Private txtTotalTimeWeek1 As TextBox
        Private lblDoubleLine As Label
        Private lblSmrWk2OvertimePay As Label
        Private txtSmrWk2SunOvertimePay As TextBox
        Private txtSmrWk2SatOvertimePay As TextBox
        Private txtSmrWk2FriOvertimePay As TextBox
        Private txtSmrWk2ThuOvertimePay As TextBox
        Private txtSmrWk2WedOvertimePay As TextBox
        Private txtSmrWk2TueOvertimePay As TextBox
        Private txtSmrWk2MonOvertimePay As TextBox
        Private lblSmrWk2RegularPay As Label
        Private txtSmrWk2SunRegularPay As TextBox
        Private txtSmrWk2SatRegularPay As TextBox
        Private txtSmrWk2FriRegularPay As TextBox
        Private txtSmrWk2ThuRegularPay As TextBox
        Private txtSmrWk2WedRegularPay As TextBox
        Private txtSmrWk2TueRegularPay As TextBox
        Private txtSmrWk2MonRegularPay As TextBox
        Private lblSmrWk2Overtime As Label
        Private txtSmrWk2SunOvertime As TextBox
        Private txtSmrWk2SatOvertime As TextBox
        Private txtSmrWk2FriOvertime As TextBox
        Private txtSmrWk2ThuOvertime As TextBox
        Private txtSmrWk2WedOvertime As TextBox
        Private txtSmrWk2TueOvertime As TextBox
        Private txtSmrWk2MonOvertime As TextBox
        Private lblSmrWk2RegularTime As Label
        Private txtSmrWk2SunRegularTime As TextBox
        Private txtSmrWk2SatRegularTime As TextBox
        Private txtSmrWk2FriRegularTime As TextBox
        Private txtSmrWk2ThuRegularTime As TextBox
        Private txtSmrWk2WedRegularTime As TextBox
        Private txtSmrWk2TueRegularTime As TextBox
        Private txtSmrWk2MonRegularTime As TextBox
        Private lblSmrWk1OvertimePay As Label
        Private txtSmrWk1SunOvertimePay As TextBox
        Private txtSmrWk1SatOvertimePay As TextBox
        Private txtSmrWk1FriOvertimePay As TextBox
        Private txtSmrWk1ThuOvertimePay As TextBox
        Private txtSmrWk1WedOvertimePay As TextBox
        Private txtSmrWk1TueOvertimePay As TextBox
        Private txtSmrWk1MonOvertimePay As TextBox
        Private lblSmrWk1RegularPay As Label
        Private txtSmrWk1MonRegularPay As TextBox
        Private txtSmrWk1TueRegularPay As TextBox
        Private txtSmrWk1WedRegularPay As TextBox
        Private txtSmrWk1ThuRegularPay As TextBox
        Private txtSmrWk1FriRegularPay As TextBox
        Private txtSmrWk1SatRegularPay As TextBox
        Private txtSmrWk1SunRegularPay As TextBox
        Private lblSmrWk1Overtime As Label
        Private txtSmrWk1MonOvertime As TextBox
        Private txtSmrWk1TueOvertime As TextBox
        Private txtSmrWk1WedOvertime As TextBox
        Private txtSmrWk1ThuOvertime As TextBox
        Private txtSmrWk1FriOvertime As TextBox
        Private txtSmrWk1SatOvertime As TextBox
        Private txtSmrWk1SunOvertime As TextBox
        Private lblSmrWk1RegularTime As Label
        Private txtSmrWk1MonRegularTime As TextBox
        Private txtSmrWk1TueRegularTime As TextBox
        Private txtSmrWk1WedRegularTime As TextBox
        Private txtSmrWk1ThuRegularTime As TextBox
        Private txtSmrWk1FriRegularTime As TextBox
        Private txtSmrWk1SatRegularTime As TextBox
        Private txtSmrWk1SunRegularTime As TextBox
        Private lblLineWeek2Summary As Label
        Private lblLineWeek1Summary As Label
        Private lblSummarySunday As Label
        Private lblEmployeeNumber As Label
        Private txtEmployeeName As TextBox
        Private lblTimeSheetWeek2 As Label
        Private lblTimeSheetWeek1 As Label
        Private txtTSWk2Sunday As TextBox
        Private txtTSWk2Saturday As TextBox
        Private txtTSWk2Friday As TextBox
        Private txtTSWk2Thursday As TextBox
        Private txtTSWk2Wednesday As TextBox
        Private txtTSWk2Tuesday As TextBox
        Private txtTSWk2Monday As TextBox
        Private txtTSWk1Monday As TextBox
        Private txtTSWk1Tuesday As TextBox
        Private txtTSWk1Wednesday As TextBox
        Private txtTSWk1Thursday As TextBox
        Private txtTSWk1Friday As TextBox
        Private txtTSWk1Saturday As TextBox
        Private txtTSWk1Sunday As TextBox
        Private lblTimeSheetSunday As Label
        Private lblTimeSheetSaturday As Label
        Private lblTimeSheetFriday As Label
        Private lblTimeSheetThursday As Label
        Private lblTimeSheetWednesday As Label
        Private lblTimeSheetTuesday As Label
        Private lblTimeSheetMonday As Label
        Private txtGrossSalary As TextBox
        Private lblGrossSalary As Label
        Private txtOvertimePay As TextBox
        Private txtRegularPay As TextBox
        Private txtOvertime As TextBox
        Private txtRegularTime As TextBox
        Private lblOvertime As Label
        Private lblRegular As Label
        Private lblTime As Label
        Private lblPay As Label
        Private lblTotals As Label
        Private lblDoubleLine1 As Label
        Private label2 As Label
        Private WithEvents btnClose As Button
    
        Private hourlySalary As Double
        Private overtimeSalary As Double
    
        Private week1Monday As Double
        Private week1Tuesday As Double
        Private week1Wednesday As Double
        Private week1Thursday As Double
        Private week1Friday As Double
        Private week1Saturday As Double
        Private week1Sunday As Double
        Private week2Monday As Double
        Private week2Tuesday As Double
        Private week2Wednesday As Double
        Private week2Thursday As Double
        Private week2Friday As Double
        Private week2Saturday As Double
        Private week2Sunday As Double
    
        Public Sub New()
            InitializeComponent()
        End Sub
    
        Private Sub InitializeComponent()
            REM Label: Start Date
            lblStartDate = New Label()
            lblStartDate.AutoSize = True
            lblStartDate.Location = New System.Drawing.Point(22, 22)
            lblStartDate.TabIndex = 344
            lblStartDate.Text = "Start Date:"
    
            REM Date/Time Picker: Start Date
            dtpStartDate = New DateTimePicker()
            dtpStartDate.Location = New System.Drawing.Point(100, 18)
            dtpStartDate.Size = New System.Drawing.Size(200, 20)
            dtpStartDate.TabIndex = 346
    
            REM Label: EmployeeNumber
            lblEmployeeNumber = New Label()
            lblEmployeeNumber.AutoSize = True
            lblEmployeeNumber.Location = New System.Drawing.Point(21, 49)
            lblEmployeeNumber.TabIndex = 347
            lblEmployeeNumber.Text = "Employee #:"
    
            REM Text Box: EmployeeName
            txtEmployeeName = New TextBox()
            txtEmployeeName.Location = New System.Drawing.Point(170, 46)
            txtEmployeeName.Size = New System.Drawing.Size(200, 20)
            txtEmployeeName.TabIndex = 376
    
            REM Text Box: Employee Number
            txtEmployeeNumber = New TextBox()
            txtEmployeeNumber.Location = New System.Drawing.Point(100, 46)
            txtEmployeeNumber.Size = New System.Drawing.Size(64, 20)
            txtEmployeeNumber.TabIndex = 348
    
            REM Label: Hourly Salary
            lblHourlySalary = New Label()
            lblHourlySalary.AutoSize = True
            lblHourlySalary.Location = New System.Drawing.Point(22, 78)
            lblHourlySalary.TabIndex = 353
            lblHourlySalary.Text = "Hourly Salary:"
    
            REM Text Box: Hourly Salary
            txtHourlySalary = New TextBox()
            txtHourlySalary.Location = New System.Drawing.Point(100, 75)
            txtHourlySalary.Size = New System.Drawing.Size(64, 20)
            txtHourlySalary.TabIndex = 380
            txtHourlySalary.Text = "0.00"
            txtHourlySalary.TextAlign = HorizontalAlignment.Right
    
            REM Label: TimeSheetID
            lblTimeSheetID = New Label()
            lblTimeSheetID.AutoSize = True
            lblTimeSheetID.Location = New System.Drawing.Point(220, 78)
            lblTimeSheetID.TabIndex = 494
            lblTimeSheetID.Text = "Time Sheet #:"
    
            REM Text Box: TimeSheetID
            txtTimeSheetID = New TextBox()
            txtTimeSheetID.Location = New System.Drawing.Point(300, 75)
            txtTimeSheetID.Size = New System.Drawing.Size(70, 20)
            txtTimeSheetID.TabIndex = 495
    
            REM Button: Find
            btnFind = New Button()
            btnFind.Location = New System.Drawing.Point(383, 73)
            btnFind.Size = New System.Drawing.Size(91, 23)
            btnFind.TabIndex = 375
            btnFind.Text = "Find"
            txtTotalOvertimePayWeek2 = New TextBox()
            txtTotalRegularPayWeek2 = New TextBox()
            txtTotalOvertimeWeek2 = New TextBox()
            txtTotalRegularTimeWeek2 = New TextBox()
            txtTotalOvertimePayWeek1 = New TextBox()
            txtTotalRegularPayWeek1 = New TextBox()
            txtTotalOvertimeWeek1 = New TextBox()
            txtTotalRegularTimeWeek1 = New TextBox()
            txtTotalTimeWeek2 = New TextBox()
            txtTotalTimeWeek1 = New TextBox()
            lblDoubleLine = New Label()
            lblSmrWk2OvertimePay = New Label()
            txtSmrWk2SunOvertimePay = New TextBox()
            txtSmrWk2SatOvertimePay = New TextBox()
            txtSmrWk2FriOvertimePay = New TextBox()
            txtSmrWk2ThuOvertimePay = New TextBox()
            txtSmrWk2WedOvertimePay = New TextBox()
            txtSmrWk2TueOvertimePay = New TextBox()
            txtSmrWk2MonOvertimePay = New TextBox()
            lblSmrWk2RegularPay = New Label()
            txtSmrWk2SunRegularPay = New TextBox()
            txtSmrWk2SatRegularPay = New TextBox()
            txtSmrWk2FriRegularPay = New TextBox()
            txtSmrWk2ThuRegularPay = New TextBox()
            txtSmrWk2WedRegularPay = New TextBox()
            txtSmrWk2TueRegularPay = New TextBox()
            txtSmrWk2MonRegularPay = New TextBox()
            lblSmrWk2Overtime = New Label()
            txtSmrWk2SunOvertime = New TextBox()
            txtSmrWk2SatOvertime = New TextBox()
            txtSmrWk2FriOvertime = New TextBox()
            txtSmrWk2ThuOvertime = New TextBox()
            txtSmrWk2WedOvertime = New TextBox()
            txtSmrWk2TueOvertime = New TextBox()
            txtSmrWk2MonOvertime = New TextBox()
            lblSmrWk2RegularTime = New Label()
            txtSmrWk2SunRegularTime = New TextBox()
            txtSmrWk2SatRegularTime = New TextBox()
            txtSmrWk2FriRegularTime = New TextBox()
            txtSmrWk2ThuRegularTime = New TextBox()
            txtSmrWk2WedRegularTime = New TextBox()
            txtSmrWk2TueRegularTime = New TextBox()
            txtSmrWk2MonRegularTime = New TextBox()
            lblSmrWk1OvertimePay = New Label()
            txtSmrWk1SunOvertimePay = New TextBox()
            txtSmrWk1SatOvertimePay = New TextBox()
            txtSmrWk1FriOvertimePay = New TextBox()
            txtSmrWk1ThuOvertimePay = New TextBox()
            txtSmrWk1WedOvertimePay = New TextBox()
            txtSmrWk1TueOvertimePay = New TextBox()
            txtSmrWk1MonOvertimePay = New TextBox()
            lblSmrWk1RegularPay = New Label()
            txtSmrWk1SunRegularPay = New TextBox()
            txtSmrWk1SatRegularPay = New TextBox()
            txtSmrWk1FriRegularPay = New TextBox()
            txtSmrWk1ThuRegularPay = New TextBox()
            txtSmrWk1WedRegularPay = New TextBox()
            txtSmrWk1TueRegularPay = New TextBox()
            txtSmrWk1MonRegularPay = New TextBox()
            lblSmrWk1Overtime = New Label()
            txtSmrWk1SunOvertime = New TextBox()
            txtSmrWk1SatOvertime = New TextBox()
            txtSmrWk1FriOvertime = New TextBox()
            txtSmrWk1ThuOvertime = New TextBox()
            txtSmrWk1WedOvertime = New TextBox()
            txtSmrWk1TueOvertime = New TextBox()
            txtSmrWk1MonOvertime = New TextBox()
            lblSmrWk1RegularTime = New Label()
            txtSmrWk1SunRegularTime = New TextBox()
            txtSmrWk1SatRegularTime = New TextBox()
            txtSmrWk1FriRegularTime = New TextBox()
            txtSmrWk1ThuRegularTime = New TextBox()
            txtSmrWk1WedRegularTime = New TextBox()
            txtSmrWk1TueRegularTime = New TextBox()
            txtSmrWk1MonRegularTime = New TextBox()
            lblLineWeek2Summary = New Label()
            lblLineWeek1Summary = New Label()
            lblSummarySunday = New Label()
            lblTimeSheetWeek2 = New Label()
            lblTimeSheetWeek1 = New Label()
            txtTSWk2Sunday = New TextBox()
            txtTSWk2Saturday = New TextBox()
            txtTSWk2Friday = New TextBox()
            txtTSWk2Thursday = New TextBox()
            txtTSWk2Wednesday = New TextBox()
            txtTSWk2Tuesday = New TextBox()
            txtTSWk2Monday = New TextBox()
            txtTSWk1Sunday = New TextBox()
            txtTSWk1Saturday = New TextBox()
            txtTSWk1Friday = New TextBox()
            txtTSWk1Thursday = New TextBox()
            txtTSWk1Wednesday = New TextBox()
            txtTSWk1Tuesday = New TextBox()
            txtTSWk1Monday = New TextBox()
            lblTimeSheetSunday = New Label()
            lblTimeSheetSaturday = New Label()
            lblTimeSheetFriday = New Label()
            lblTimeSheetThursday = New Label()
            lblTimeSheetWednesday = New Label()
            lblTimeSheetTuesday = New Label()
            lblTimeSheetMonday = New Label()
            txtGrossSalary = New TextBox()
            lblGrossSalary = New Label()
            txtOvertimePay = New TextBox()
            txtRegularPay = New TextBox()
            txtOvertime = New TextBox()
            txtRegularTime = New TextBox()
            lblOvertime = New Label()
            lblRegular = New Label()
            lblPay = New Label()
            lblTime = New Label()
            lblTotals = New Label()
            lblDoubleLine1 = New Label()
            label2 = New Label()
    
            REM Text Box: TotalOvertimePayWeek2
            txtTotalOvertimePayWeek2.Location = New System.Drawing.Point(507, 447)
            txtTotalOvertimePayWeek2.Size = New System.Drawing.Size(51, 20)
            txtTotalOvertimePayWeek2.TabIndex = 505
            txtTotalOvertimePayWeek2.Text = "0.00"
            txtTotalOvertimePayWeek2.TextAlign = HorizontalAlignment.Right
    
            REM Text Box: TotalRegularPayWeek2
            txtTotalRegularPayWeek2.Location = New System.Drawing.Point(507, 421)
            txtTotalRegularPayWeek2.Size = New System.Drawing.Size(51, 20)
            txtTotalRegularPayWeek2.TabIndex = 504
            txtTotalRegularPayWeek2.Text = "0.00"
            txtTotalRegularPayWeek2.TextAlign = HorizontalAlignment.Right
    
            REM Text Box: Total Overtime Week 2
            txtTotalOvertimeWeek2.Location = New System.Drawing.Point(507, 395)
            txtTotalOvertimeWeek2.Size = New System.Drawing.Size(51, 20)
            txtTotalOvertimeWeek2.TabIndex = 503
            txtTotalOvertimeWeek2.Text = "0.00"
            txtTotalOvertimeWeek2.TextAlign = HorizontalAlignment.Right
    
            REM Text Box: Total Regular Time Week 2
            txtTotalRegularTimeWeek2.Location = New System.Drawing.Point(507, 369)
            txtTotalRegularTimeWeek2.Size = New System.Drawing.Size(51, 20)
            txtTotalRegularTimeWeek2.TabIndex = 502
            txtTotalRegularTimeWeek2.Text = "0.00"
            txtTotalRegularTimeWeek2.TextAlign = HorizontalAlignment.Right
    
            REM Text Box: Total Overtime Pay Week 1
            txtTotalOvertimePayWeek1.Location = New System.Drawing.Point(507, 274)
            txtTotalOvertimePayWeek1.Size = New System.Drawing.Size(51, 20)
            txtTotalOvertimePayWeek1.TabIndex = 500
            txtTotalOvertimePayWeek1.Text = "0.00"
            txtTotalOvertimePayWeek1.TextAlign = HorizontalAlignment.Right
    
            REM Text Box: Total Regular Pay Week 1
            txtTotalRegularPayWeek1.Location = New System.Drawing.Point(507, 248)
            txtTotalRegularPayWeek1.Size = New System.Drawing.Size(51, 20)
            txtTotalRegularPayWeek1.TabIndex = 499
            txtTotalRegularPayWeek1.Text = "0.00"
            txtTotalRegularPayWeek1.TextAlign = HorizontalAlignment.Right
    
            REM Text Box: Total Overtime Week 1
            txtTotalOvertimeWeek1.Location = New System.Drawing.Point(507, 222)
            txtTotalOvertimeWeek1.Name = "txtTotalOvertimeWeek1"
            txtTotalOvertimeWeek1.Size = New System.Drawing.Size(51, 20)
            txtTotalOvertimeWeek1.TabIndex = 498
            txtTotalOvertimeWeek1.Text = "0.00"
            txtTotalOvertimeWeek1.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: TotalRegularTimeWeek1
            REM 
            txtTotalRegularTimeWeek1.Location = New System.Drawing.Point(507, 196)
            txtTotalRegularTimeWeek1.Name = "txtTotalRegularTimeWeek1"
            txtTotalRegularTimeWeek1.Size = New System.Drawing.Size(51, 20)
            txtTotalRegularTimeWeek1.TabIndex = 497
            txtTotalRegularTimeWeek1.Text = "0.00"
            txtTotalRegularTimeWeek1.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: TotalTimeWeek2
            REM 
            txtTotalTimeWeek2.Location = New System.Drawing.Point(507, 325)
            txtTotalTimeWeek2.Name = "txtTotalTimeWeek2"
            txtTotalTimeWeek2.Size = New System.Drawing.Size(51, 20)
            txtTotalTimeWeek2.TabIndex = 501
            txtTotalTimeWeek2.Text = "0.00"
            txtTotalTimeWeek2.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: TotalTimeWeek1
            REM 
            txtTotalTimeWeek1.Location = New System.Drawing.Point(507, 151)
            txtTotalTimeWeek1.Name = "txtTotalTimeWeek1"
            txtTotalTimeWeek1.Size = New System.Drawing.Size(51, 20)
            txtTotalTimeWeek1.TabIndex = 496
            txtTotalTimeWeek1.Text = "0.00"
            txtTotalTimeWeek1.TextAlign = HorizontalAlignment.Right
            REM 
            REM Label: DoubleLine
            REM 
            lblDoubleLine.AutoSize = True
            lblDoubleLine.Location = New System.Drawing.Point(19, 300)
            lblDoubleLine.Name = "lblDoubleLine"
            lblDoubleLine.Size = New System.Drawing.Size(763, 13)
            lblDoubleLine.TabIndex = 434
            lblDoubleLine.Text = "==============================================================="
            REM 
            REM Label: SmrWk2OvertimePay
            REM 
            lblSmrWk2OvertimePay.AutoSize = True
            lblSmrWk2OvertimePay.Location = New System.Drawing.Point(19, 448)
            lblSmrWk2OvertimePay.Name = "lblSmrWk2OvertimePay"
            lblSmrWk2OvertimePay.Size = New System.Drawing.Size(73, 13)
            lblSmrWk2OvertimePay.TabIndex = 469
            lblSmrWk2OvertimePay.Text = "Overtime Pay:"
            REM 
            REM REM Text Box: Summary Week 2 - Sunday OvertimePay
            REM 
            txtSmrWk2SunOvertimePay.Location = New System.Drawing.Point(440, 445)
            txtSmrWk2SunOvertimePay.Name = "txtSmrWk2SunOvertimePay"
            txtSmrWk2SunOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2SunOvertimePay.TabIndex = 476
            txtSmrWk2SunOvertimePay.Text = "0.00"
            txtSmrWk2SunOvertimePay.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Saturday OvertimePay
            REM 
            txtSmrWk2SatOvertimePay.Location = New System.Drawing.Point(383, 445)
            txtSmrWk2SatOvertimePay.Name = "txtSmrWk2SatOvertimePay"
            txtSmrWk2SatOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2SatOvertimePay.TabIndex = 475
            txtSmrWk2SatOvertimePay.Text = "0.00"
            txtSmrWk2SatOvertimePay.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Friday OvertimePay
            REM 
            txtSmrWk2FriOvertimePay.Location = New System.Drawing.Point(326, 445)
            txtSmrWk2FriOvertimePay.Name = "txtSmrWk2FriOvertimePay"
            txtSmrWk2FriOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2FriOvertimePay.TabIndex = 474
            txtSmrWk2FriOvertimePay.Text = "0.00"
            txtSmrWk2FriOvertimePay.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Thursday OvertimePay
            REM 
            txtSmrWk2ThuOvertimePay.Location = New System.Drawing.Point(269, 445)
            txtSmrWk2ThuOvertimePay.Name = "txtSmrWk2ThuOvertimePay"
            txtSmrWk2ThuOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2ThuOvertimePay.TabIndex = 473
            txtSmrWk2ThuOvertimePay.Text = "0.00"
            txtSmrWk2ThuOvertimePay.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Wednesday OvertimePay
            REM 
            txtSmrWk2WedOvertimePay.Location = New System.Drawing.Point(212, 445)
            txtSmrWk2WedOvertimePay.Name = "txtSmrWk2WedOvertimePay"
            txtSmrWk2WedOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2WedOvertimePay.TabIndex = 472
            txtSmrWk2WedOvertimePay.Text = "0.00"
            txtSmrWk2WedOvertimePay.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Tueday OvertimePay
            REM 
            txtSmrWk2TueOvertimePay.Location = New System.Drawing.Point(155, 445)
            txtSmrWk2TueOvertimePay.Name = "txtSmrWk2TueOvertimePay"
            txtSmrWk2TueOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2TueOvertimePay.TabIndex = 471
            txtSmrWk2TueOvertimePay.Text = "0.00"
            txtSmrWk2TueOvertimePay.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Monday OvertimePay
            REM 
            txtSmrWk2MonOvertimePay.Location = New System.Drawing.Point(98, 445)
            txtSmrWk2MonOvertimePay.Name = "txtSmrWk2MonOvertimePay"
            txtSmrWk2MonOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2MonOvertimePay.TabIndex = 470
            txtSmrWk2MonOvertimePay.Text = "0.00"
            txtSmrWk2MonOvertimePay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Label: SmrWk2RegularPay
            REM 
            lblSmrWk2RegularPay.AutoSize = True
            lblSmrWk2RegularPay.Location = New System.Drawing.Point(19, 422)
            lblSmrWk2RegularPay.Name = "lblSmrWk2RegularPay"
            lblSmrWk2RegularPay.Size = New System.Drawing.Size(68, 13)
            lblSmrWk2RegularPay.TabIndex = 461
            lblSmrWk2RegularPay.Text = "Regular Pay:"
            REM 
            REM REM Text Box: Summary Week 2 - Sunday RegularPay
            REM 
            txtSmrWk2SunRegularPay.Location = New System.Drawing.Point(440, 419)
            txtSmrWk2SunRegularPay.Name = "txtSmrWk2SunRegularPay"
            txtSmrWk2SunRegularPay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2SunRegularPay.TabIndex = 468
            txtSmrWk2SunRegularPay.Text = "0.00"
            txtSmrWk2SunRegularPay.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Saturday RegularPay
            REM 
            txtSmrWk2SatRegularPay.Location = New System.Drawing.Point(383, 419)
            txtSmrWk2SatRegularPay.Name = "txtSmrWk2SatRegularPay"
            txtSmrWk2SatRegularPay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2SatRegularPay.TabIndex = 467
            txtSmrWk2SatRegularPay.Text = "0.00"
            txtSmrWk2SatRegularPay.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Friday RegularPay
            REM 
            txtSmrWk2FriRegularPay.Location = New System.Drawing.Point(326, 419)
            txtSmrWk2FriRegularPay.Name = "txtSmrWk2FriRegularPay"
            txtSmrWk2FriRegularPay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2FriRegularPay.TabIndex = 466
            txtSmrWk2FriRegularPay.Text = "0.00"
            txtSmrWk2FriRegularPay.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Thursday RegularPay
            REM 
            txtSmrWk2ThuRegularPay.Location = New System.Drawing.Point(269, 419)
            txtSmrWk2ThuRegularPay.Name = "txtSmrWk2ThuRegularPay"
            txtSmrWk2ThuRegularPay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2ThuRegularPay.TabIndex = 465
            txtSmrWk2ThuRegularPay.Text = "0.00"
            txtSmrWk2ThuRegularPay.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Wednesday RegularPay
            REM 
            txtSmrWk2WedRegularPay.Location = New System.Drawing.Point(212, 419)
            txtSmrWk2WedRegularPay.Name = "txtSmrWk2WedRegularPay"
            txtSmrWk2WedRegularPay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2WedRegularPay.TabIndex = 464
            txtSmrWk2WedRegularPay.Text = "0.00"
            txtSmrWk2WedRegularPay.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Tueday RegularPay
            REM 
            txtSmrWk2TueRegularPay.Location = New System.Drawing.Point(155, 419)
            txtSmrWk2TueRegularPay.Name = "txtSmrWk2TueRegularPay"
            txtSmrWk2TueRegularPay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2TueRegularPay.TabIndex = 463
            txtSmrWk2TueRegularPay.Text = "0.00"
            txtSmrWk2TueRegularPay.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Monday RegularPay
            REM 
            txtSmrWk2MonRegularPay.Location = New System.Drawing.Point(98, 419)
            txtSmrWk2MonRegularPay.Name = "txtSmrWk2MonRegularPay"
            txtSmrWk2MonRegularPay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2MonRegularPay.TabIndex = 462
            txtSmrWk2MonRegularPay.Text = "0.00"
            txtSmrWk2MonRegularPay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Label: SmrWk2Overtime
            REM 
            lblSmrWk2Overtime.AutoSize = True
            lblSmrWk2Overtime.Location = New System.Drawing.Point(19, 396)
            lblSmrWk2Overtime.Name = "lblSmrWk2Overtime"
            lblSmrWk2Overtime.Size = New System.Drawing.Size(59, 13)
            lblSmrWk2Overtime.TabIndex = 453
            lblSmrWk2Overtime.Text = "Over Time:"
            REM 
            REM REM Text Box: Summary Week 2 - Sunday Overtime
            REM 
            txtSmrWk2SunOvertime.Location = New System.Drawing.Point(440, 393)
            txtSmrWk2SunOvertime.Name = "txtSmrWk2SunOvertime"
            txtSmrWk2SunOvertime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2SunOvertime.TabIndex = 460
            txtSmrWk2SunOvertime.Text = "0.00"
            txtSmrWk2SunOvertime.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Saturday Overtime
            REM 
            txtSmrWk2SatOvertime.Location = New System.Drawing.Point(383, 393)
            txtSmrWk2SatOvertime.Name = "txtSmrWk2SatOvertime"
            txtSmrWk2SatOvertime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2SatOvertime.TabIndex = 459
            txtSmrWk2SatOvertime.Text = "0.00"
            txtSmrWk2SatOvertime.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Friday Overtime
            REM 
            txtSmrWk2FriOvertime.Location = New System.Drawing.Point(326, 393)
            txtSmrWk2FriOvertime.Name = "txtSmrWk2FriOvertime"
            txtSmrWk2FriOvertime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2FriOvertime.TabIndex = 458
            txtSmrWk2FriOvertime.Text = "0.00"
            txtSmrWk2FriOvertime.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Thursday Overtime
            REM 
            txtSmrWk2ThuOvertime.Location = New System.Drawing.Point(269, 393)
            txtSmrWk2ThuOvertime.Name = "txtSmrWk2ThuOvertime"
            txtSmrWk2ThuOvertime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2ThuOvertime.TabIndex = 457
            txtSmrWk2ThuOvertime.Text = "0.00"
            txtSmrWk2ThuOvertime.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Wednesday Overtime
            REM 
            txtSmrWk2WedOvertime.Location = New System.Drawing.Point(212, 393)
            txtSmrWk2WedOvertime.Name = "txtSmrWk2WedOvertime"
            txtSmrWk2WedOvertime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2WedOvertime.TabIndex = 456
            txtSmrWk2WedOvertime.Text = "0.00"
            txtSmrWk2WedOvertime.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Tueday Overtime
            REM 
            txtSmrWk2TueOvertime.Location = New System.Drawing.Point(155, 393)
            txtSmrWk2TueOvertime.Name = "txtSmrWk2TueOvertime"
            txtSmrWk2TueOvertime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2TueOvertime.TabIndex = 455
            txtSmrWk2TueOvertime.Text = "0.00"
            txtSmrWk2TueOvertime.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Monday Overtime
            REM 
            txtSmrWk2MonOvertime.Location = New System.Drawing.Point(98, 393)
            txtSmrWk2MonOvertime.Name = "txtSmrWk2MonOvertime"
            txtSmrWk2MonOvertime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2MonOvertime.TabIndex = 454
            txtSmrWk2MonOvertime.Text = "0.00"
            txtSmrWk2MonOvertime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Label: SmrWk2RegularTime
            REM 
            lblSmrWk2RegularTime.AutoSize = True
            lblSmrWk2RegularTime.Location = New System.Drawing.Point(19, 370)
            lblSmrWk2RegularTime.Name = "lblSmrWk2RegularTime"
            lblSmrWk2RegularTime.Size = New System.Drawing.Size(73, 13)
            lblSmrWk2RegularTime.TabIndex = 445
            lblSmrWk2RegularTime.Text = "Regular Time:"
            REM 
            REM REM Text Box: Summary Week 2 - Sunday RegularTime
            REM 
            txtSmrWk2SunRegularTime.Location = New System.Drawing.Point(440, 367)
            txtSmrWk2SunRegularTime.Name = "txtSmrWk2SunRegularTime"
            txtSmrWk2SunRegularTime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2SunRegularTime.TabIndex = 452
            txtSmrWk2SunRegularTime.Text = "0.00"
            txtSmrWk2SunRegularTime.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Saturday RegularTime
            REM 
            txtSmrWk2SatRegularTime.Location = New System.Drawing.Point(383, 367)
            txtSmrWk2SatRegularTime.Name = "txtSmrWk2SatRegularTime"
            txtSmrWk2SatRegularTime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2SatRegularTime.TabIndex = 451
            txtSmrWk2SatRegularTime.Text = "0.00"
            txtSmrWk2SatRegularTime.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Friday RegularTime
            REM 
            txtSmrWk2FriRegularTime.Location = New System.Drawing.Point(326, 367)
            txtSmrWk2FriRegularTime.Name = "txtSmrWk2FriRegularTime"
            txtSmrWk2FriRegularTime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2FriRegularTime.TabIndex = 450
            txtSmrWk2FriRegularTime.Text = "0.00"
            txtSmrWk2FriRegularTime.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Thursday RegularTime
            REM 
            txtSmrWk2ThuRegularTime.Location = New System.Drawing.Point(269, 367)
            txtSmrWk2ThuRegularTime.Name = "txtSmrWk2ThuRegularTime"
            txtSmrWk2ThuRegularTime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2ThuRegularTime.TabIndex = 449
            txtSmrWk2ThuRegularTime.Text = "0.00"
            txtSmrWk2ThuRegularTime.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Wednesday RegularTime
            REM 
            txtSmrWk2WedRegularTime.Location = New System.Drawing.Point(212, 367)
            txtSmrWk2WedRegularTime.Name = "txtSmrWk2WedRegularTime"
            txtSmrWk2WedRegularTime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2WedRegularTime.TabIndex = 448
            txtSmrWk2WedRegularTime.Text = "0.00"
            txtSmrWk2WedRegularTime.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Tueday RegularTime
            REM 
            txtSmrWk2TueRegularTime.Location = New System.Drawing.Point(155, 367)
            txtSmrWk2TueRegularTime.Name = "txtSmrWk2TueRegularTime"
            txtSmrWk2TueRegularTime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2TueRegularTime.TabIndex = 447
            txtSmrWk2TueRegularTime.Text = "0.00"
            txtSmrWk2TueRegularTime.TextAlign = HorizontalAlignment.Right
            REM 
            REM REM Text Box: Summary Week 2 - Monday RegularTime
            REM 
            txtSmrWk2MonRegularTime.Location = New System.Drawing.Point(98, 367)
            txtSmrWk2MonRegularTime.Name = "txtSmrWk2MonRegularTime"
            txtSmrWk2MonRegularTime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk2MonRegularTime.TabIndex = 446
            txtSmrWk2MonRegularTime.Text = "0.00"
            txtSmrWk2MonRegularTime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Label: Summary Week 1 - OvertimePay
            REM 
            lblSmrWk1OvertimePay.AutoSize = True
            lblSmrWk1OvertimePay.Location = New System.Drawing.Point(19, 275)
            lblSmrWk1OvertimePay.Name = "lblSmrWk1OvertimePay"
            lblSmrWk1OvertimePay.Size = New System.Drawing.Size(73, 13)
            lblSmrWk1OvertimePay.TabIndex = 419
            lblSmrWk1OvertimePay.Text = "Overtime Pay:"
            REM 
            REM Text Box: Summary Week 1 - Sunday OvertimePay
            REM 
            txtSmrWk1SunOvertimePay.Location = New System.Drawing.Point(440, 272)
            txtSmrWk1SunOvertimePay.Name = "txtSmrWk1SunOvertimePay"
            txtSmrWk1SunOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1SunOvertimePay.TabIndex = 428
            txtSmrWk1SunOvertimePay.Text = "0.00"
            txtSmrWk1SunOvertimePay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Summary Week 1 - Saturday OvertimePay
            REM 
            txtSmrWk1SatOvertimePay.Location = New System.Drawing.Point(383, 272)
            txtSmrWk1SatOvertimePay.Name = "txtSmrWk1SatOvertimePay"
            txtSmrWk1SatOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1SatOvertimePay.TabIndex = 425
            txtSmrWk1SatOvertimePay.Text = "0.00"
            txtSmrWk1SatOvertimePay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Summary Week 1 - Friday OvertimePay
            REM 
            txtSmrWk1FriOvertimePay.Location = New System.Drawing.Point(326, 272)
            txtSmrWk1FriOvertimePay.Name = "txtSmrWk1FriOvertimePay"
            txtSmrWk1FriOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1FriOvertimePay.TabIndex = 424
            txtSmrWk1FriOvertimePay.Text = "0.00"
            txtSmrWk1FriOvertimePay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: SmrWk1ThuOvertimePay
            REM 
            txtSmrWk1ThuOvertimePay.Location = New System.Drawing.Point(269, 272)
            txtSmrWk1ThuOvertimePay.Name = "txtSmrWk1ThuOvertimePay"
            txtSmrWk1ThuOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1ThuOvertimePay.TabIndex = 423
            txtSmrWk1ThuOvertimePay.Text = "0.00"
            txtSmrWk1ThuOvertimePay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: SmrWk1WedOvertimePay
            REM 
            txtSmrWk1WedOvertimePay.Location = New System.Drawing.Point(212, 272)
            txtSmrWk1WedOvertimePay.Name = "txtSmrWk1WedOvertimePay"
            txtSmrWk1WedOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1WedOvertimePay.TabIndex = 422
            txtSmrWk1WedOvertimePay.Text = "0.00"
            txtSmrWk1WedOvertimePay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: SmrWk1TueOvertimePay
            REM 
            txtSmrWk1TueOvertimePay.Location = New System.Drawing.Point(155, 272)
            txtSmrWk1TueOvertimePay.Name = "txtSmrWk1TueOvertimePay"
            txtSmrWk1TueOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1TueOvertimePay.TabIndex = 421
            txtSmrWk1TueOvertimePay.Text = "0.00"
            txtSmrWk1TueOvertimePay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Summary Week 1 - Monday Overtime Pay
            REM 
            txtSmrWk1MonOvertimePay.Location = New System.Drawing.Point(98, 272)
            txtSmrWk1MonOvertimePay.Name = "txtSmrWk1MonOvertimePay"
            txtSmrWk1MonOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1MonOvertimePay.TabIndex = 420
            txtSmrWk1MonOvertimePay.Text = "0.00"
            txtSmrWk1MonOvertimePay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Label: Summary Week 1 - Regular Pay
            REM 
            lblSmrWk1RegularPay.AutoSize = True
            lblSmrWk1RegularPay.Location = New System.Drawing.Point(19, 249)
            lblSmrWk1RegularPay.Name = "lblSmrWk1RegularPay"
            lblSmrWk1RegularPay.Size = New System.Drawing.Size(68, 13)
            lblSmrWk1RegularPay.TabIndex = 412
            lblSmrWk1RegularPay.Text = "Regular Pay:"
            REM 
            REM Text Box: Summary Week 1 - Sunday Regular Pay
            REM 
            txtSmrWk1SunRegularPay.Location = New System.Drawing.Point(440, 246)
            txtSmrWk1SunRegularPay.Name = "txtSmrWk1SunRegularPay"
            txtSmrWk1SunRegularPay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1SunRegularPay.TabIndex = 426
            txtSmrWk1SunRegularPay.Text = "0.00"
            txtSmrWk1SunRegularPay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Summary Week 1 - Saturday Regular Pay
            REM 
            txtSmrWk1SatRegularPay.Location = New System.Drawing.Point(383, 246)
            txtSmrWk1SatRegularPay.Name = "txtSmrWk1SatRegularPay"
            txtSmrWk1SatRegularPay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1SatRegularPay.TabIndex = 418
            txtSmrWk1SatRegularPay.Text = "0.00"
            txtSmrWk1SatRegularPay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Summary Week 1 - Friday RegularPay
            REM 
            txtSmrWk1FriRegularPay.Location = New System.Drawing.Point(326, 246)
            txtSmrWk1FriRegularPay.Name = "txtSmrWk1FriRegularPay"
            txtSmrWk1FriRegularPay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1FriRegularPay.TabIndex = 417
            txtSmrWk1FriRegularPay.Text = "0.00"
            txtSmrWk1FriRegularPay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: SmrWk1ThuRegularPay
            REM 
            txtSmrWk1ThuRegularPay.Location = New System.Drawing.Point(269, 246)
            txtSmrWk1ThuRegularPay.Name = "txtSmrWk1ThuRegularPay"
            txtSmrWk1ThuRegularPay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1ThuRegularPay.TabIndex = 416
            txtSmrWk1ThuRegularPay.Text = "0.00"
            txtSmrWk1ThuRegularPay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: SmrWk1WedRegularPay
            REM 
            txtSmrWk1WedRegularPay.Location = New System.Drawing.Point(212, 246)
            txtSmrWk1WedRegularPay.Name = "txtSmrWk1WedRegularPay"
            txtSmrWk1WedRegularPay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1WedRegularPay.TabIndex = 415
            txtSmrWk1WedRegularPay.Text = "0.00"
            txtSmrWk1WedRegularPay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: SmrWk1TueRegularPay
            REM 
            txtSmrWk1TueRegularPay.Location = New System.Drawing.Point(155, 246)
            txtSmrWk1TueRegularPay.Name = "txtSmrWk1TueRegularPay"
            txtSmrWk1TueRegularPay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1TueRegularPay.TabIndex = 414
            txtSmrWk1TueRegularPay.Text = "0.00"
            txtSmrWk1TueRegularPay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Summary Week 1 - Monday RegularPay
            REM 
            txtSmrWk1MonRegularPay.Location = New System.Drawing.Point(98, 246)
            txtSmrWk1MonRegularPay.Name = "txtSmrWk1MonRegularPay"
            txtSmrWk1MonRegularPay.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1MonRegularPay.TabIndex = 413
            txtSmrWk1MonRegularPay.Text = "0.00"
            txtSmrWk1MonRegularPay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Label: Summary Week 1 - Overtime
            REM 
            lblSmrWk1Overtime.AutoSize = True
            lblSmrWk1Overtime.Location = New System.Drawing.Point(19, 223)
            lblSmrWk1Overtime.Name = "lblSmrWk1Overtime"
            lblSmrWk1Overtime.Size = New System.Drawing.Size(59, 13)
            lblSmrWk1Overtime.TabIndex = 404
            lblSmrWk1Overtime.Text = "Over Time:"
            REM 
            REM Text Box: Summary Week 1 - Sunday Overtime
            REM 
            txtSmrWk1SunOvertime.Location = New System.Drawing.Point(440, 220)
            txtSmrWk1SunOvertime.Name = "txtSmrWk1SunOvertime"
            txtSmrWk1SunOvertime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1SunOvertime.TabIndex = 411
            txtSmrWk1SunOvertime.Text = "0.00"
            txtSmrWk1SunOvertime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Summary Week 1 - Saturday Overtime
            REM 
            txtSmrWk1SatOvertime.Location = New System.Drawing.Point(383, 220)
            txtSmrWk1SatOvertime.Name = "txtSmrWk1SatOvertime"
            txtSmrWk1SatOvertime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1SatOvertime.TabIndex = 410
            txtSmrWk1SatOvertime.Text = "0.00"
            txtSmrWk1SatOvertime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Summary Week 1 - Friday Overtime
            REM 
            txtSmrWk1FriOvertime.Location = New System.Drawing.Point(326, 220)
            txtSmrWk1FriOvertime.Name = "txtSmrWk1FriOvertime"
            txtSmrWk1FriOvertime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1FriOvertime.TabIndex = 409
            txtSmrWk1FriOvertime.Text = "0.00"
            txtSmrWk1FriOvertime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: SmrWk1ThuOvertime
            REM 
            txtSmrWk1ThuOvertime.Location = New System.Drawing.Point(269, 220)
            txtSmrWk1ThuOvertime.Name = "txtSmrWk1ThuOvertime"
            txtSmrWk1ThuOvertime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1ThuOvertime.TabIndex = 408
            txtSmrWk1ThuOvertime.Text = "0.00"
            txtSmrWk1ThuOvertime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: SmrWk1WedOvertime
            REM 
            txtSmrWk1WedOvertime.Location = New System.Drawing.Point(212, 220)
            txtSmrWk1WedOvertime.Name = "txtSmrWk1WedOvertime"
            txtSmrWk1WedOvertime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1WedOvertime.TabIndex = 407
            txtSmrWk1WedOvertime.Text = "0.00"
            txtSmrWk1WedOvertime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: SmrWk1TueOvertime
            REM 
            txtSmrWk1TueOvertime.Location = New System.Drawing.Point(155, 220)
            txtSmrWk1TueOvertime.Name = "txtSmrWk1TueOvertime"
            txtSmrWk1TueOvertime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1TueOvertime.TabIndex = 406
            txtSmrWk1TueOvertime.Text = "0.00"
            txtSmrWk1TueOvertime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Summary Week 1 - Monday Overtime
            REM 
            txtSmrWk1MonOvertime.Location = New System.Drawing.Point(98, 220)
            txtSmrWk1MonOvertime.Name = "txtSmrWk1MonOvertime"
            txtSmrWk1MonOvertime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1MonOvertime.TabIndex = 405
            txtSmrWk1MonOvertime.Text = "0.00"
            txtSmrWk1MonOvertime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Label: Summary Week 1 - RegularTime
            REM 
            lblSmrWk1RegularTime.AutoSize = True
            lblSmrWk1RegularTime.Location = New System.Drawing.Point(19, 197)
            lblSmrWk1RegularTime.Name = "lblSmrWk1RegularTime"
            lblSmrWk1RegularTime.Size = New System.Drawing.Size(73, 13)
            lblSmrWk1RegularTime.TabIndex = 394
            lblSmrWk1RegularTime.Text = "Regular Time:"
            REM 
            REM Text Box: Summary Week 1 - Sunday RegularTime
            REM 
            txtSmrWk1SunRegularTime.Location = New System.Drawing.Point(440, 194)
            txtSmrWk1SunRegularTime.Name = "txtSmrWk1SunRegularTime"
            txtSmrWk1SunRegularTime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1SunRegularTime.TabIndex = 401
            txtSmrWk1SunRegularTime.Text = "0.00"
            txtSmrWk1SunRegularTime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Summary Week 1 - Saturday RegularTime
            REM 
            txtSmrWk1SatRegularTime.Location = New System.Drawing.Point(383, 194)
            txtSmrWk1SatRegularTime.Name = "txtSmrWk1SatRegularTime"
            txtSmrWk1SatRegularTime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1SatRegularTime.TabIndex = 400
            txtSmrWk1SatRegularTime.Text = "0.00"
            txtSmrWk1SatRegularTime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Summary Week 1 - Friday RegularTime
            REM 
            txtSmrWk1FriRegularTime.Location = New System.Drawing.Point(326, 194)
            txtSmrWk1FriRegularTime.Name = "txtSmrWk1FriRegularTime"
            txtSmrWk1FriRegularTime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1FriRegularTime.TabIndex = 399
            txtSmrWk1FriRegularTime.Text = "0.00"
            txtSmrWk1FriRegularTime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: SmrWk1ThuRegularTime
            REM 
            txtSmrWk1ThuRegularTime.Location = New System.Drawing.Point(269, 194)
            txtSmrWk1ThuRegularTime.Name = "txtSmrWk1ThuRegularTime"
            txtSmrWk1ThuRegularTime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1ThuRegularTime.TabIndex = 398
            txtSmrWk1ThuRegularTime.Text = "0.00"
            txtSmrWk1ThuRegularTime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: SmrWk1WedRegularTime
            REM 
            txtSmrWk1WedRegularTime.Location = New System.Drawing.Point(212, 194)
            txtSmrWk1WedRegularTime.Name = "txtSmrWk1WedRegularTime"
            txtSmrWk1WedRegularTime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1WedRegularTime.TabIndex = 397
            txtSmrWk1WedRegularTime.Text = "0.00"
            txtSmrWk1WedRegularTime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: SmrWk1TueRegularTime
            REM 
            txtSmrWk1TueRegularTime.Location = New System.Drawing.Point(155, 194)
            txtSmrWk1TueRegularTime.Name = "txtSmrWk1TueRegularTime"
            txtSmrWk1TueRegularTime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1TueRegularTime.TabIndex = 396
            txtSmrWk1TueRegularTime.Text = "0.00"
            txtSmrWk1TueRegularTime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Summary Week 1 - Monday RegularTime
            REM 
            txtSmrWk1MonRegularTime.Location = New System.Drawing.Point(98, 194)
            txtSmrWk1MonRegularTime.Name = "txtSmrWk1MonRegularTime"
            txtSmrWk1MonRegularTime.Size = New System.Drawing.Size(51, 20)
            txtSmrWk1MonRegularTime.TabIndex = 395
            txtSmrWk1MonRegularTime.Text = "0.00"
            txtSmrWk1MonRegularTime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Label: LineWeek2Summary
            REM 
            lblLineWeek2Summary.AutoSize = True
            lblLineWeek2Summary.Location = New System.Drawing.Point(20, 348)
            lblLineWeek2Summary.Name = "lblLineWeek2Summary"
            lblLineWeek2Summary.Size = New System.Drawing.Size(544, 13)
            lblLineWeek2Summary.TabIndex = 444
            lblLineWeek2Summary.Text = "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
            REM 
            REM Label: LineWeek1Summary
            REM 
            lblLineWeek1Summary.AutoSize = True
            lblLineWeek1Summary.Location = New System.Drawing.Point(20, 175)
            lblLineWeek1Summary.Name = "lblLineWeek1Summary"
            lblLineWeek1Summary.Size = New System.Drawing.Size(544, 13)
            lblLineWeek1Summary.TabIndex = 370
            lblLineWeek1Summary.Text = "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
    
            REM Label: SummarySunday
            REM 
            lblSummarySunday.AutoSize = True
            lblSummarySunday.Location = New System.Drawing.Point(437, 249)
            lblSummarySunday.Name = "lblSummarySunday"
            lblSummarySunday.Size = New System.Drawing.Size(43, 13)
            lblSummarySunday.TabIndex = 427
            lblSummarySunday.Text = "Sunday"
            REM 
            REM Label: TimeSheetWeek2
            REM 
            lblTimeSheetWeek2.AutoSize = True
            lblTimeSheetWeek2.Location = New System.Drawing.Point(19, 327)
            lblTimeSheetWeek2.Name = "lblTimeSheetWeek2"
            lblTimeSheetWeek2.Size = New System.Drawing.Size(48, 13)
            lblTimeSheetWeek2.TabIndex = 435
            lblTimeSheetWeek2.Text = "Week 2:"
            REM 
            REM Label: TimeSheetWeek1
            REM 
            lblTimeSheetWeek1.AutoSize = True
            lblTimeSheetWeek1.Location = New System.Drawing.Point(20, 152)
            lblTimeSheetWeek1.Name = "lblTimeSheetWeek1"
            lblTimeSheetWeek1.Size = New System.Drawing.Size(48, 13)
            lblTimeSheetWeek1.TabIndex = 355
            lblTimeSheetWeek1.Text = "Week 1:"
            REM 
            REM Text Box: Time Sheet Week 2 - Sunday
            REM 
            txtTSWk2Sunday.Location = New System.Drawing.Point(440, 323)
            txtTSWk2Sunday.Name = "txtTSWk2Sunday"
            txtTSWk2Sunday.Size = New System.Drawing.Size(51, 20)
            txtTSWk2Sunday.TabIndex = 442
            txtTSWk2Sunday.Text = "0.00"
            txtTSWk2Sunday.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Time Sheet Week 2 - Saturday
            REM 
            txtTSWk2Saturday.Location = New System.Drawing.Point(383, 323)
            txtTSWk2Saturday.Name = "txtTSWk2Saturday"
            txtTSWk2Saturday.Size = New System.Drawing.Size(51, 20)
            txtTSWk2Saturday.TabIndex = 441
            txtTSWk2Saturday.Text = "0.00"
            txtTSWk2Saturday.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Time Sheet Week 2 - Friday
            REM 
            txtTSWk2Friday.Location = New System.Drawing.Point(326, 323)
            txtTSWk2Friday.Name = "txtTSWk2Friday"
            txtTSWk2Friday.Size = New System.Drawing.Size(51, 20)
            txtTSWk2Friday.TabIndex = 440
            txtTSWk2Friday.Text = "0.00"
            txtTSWk2Friday.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Time Sheet Week 2 - Thursday
            REM 
            txtTSWk2Thursday.Location = New System.Drawing.Point(269, 323)
            txtTSWk2Thursday.Name = "txtTSWk2Thursday"
            txtTSWk2Thursday.Size = New System.Drawing.Size(51, 20)
            txtTSWk2Thursday.TabIndex = 439
            txtTSWk2Thursday.Text = "0.00"
            txtTSWk2Thursday.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Time Sheet Week 2 - Wednesday
            REM 
            txtTSWk2Wednesday.Location = New System.Drawing.Point(212, 323)
            txtTSWk2Wednesday.Name = "txtTSWk2Wednesday"
            txtTSWk2Wednesday.Size = New System.Drawing.Size(51, 20)
            txtTSWk2Wednesday.TabIndex = 438
            txtTSWk2Wednesday.Text = "0.00"
            txtTSWk2Wednesday.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Time Sheet Week 2 - Tuesday
            REM 
            txtTSWk2Tuesday.Location = New System.Drawing.Point(155, 323)
            txtTSWk2Tuesday.Name = "txtTSWk2Tuesday"
            txtTSWk2Tuesday.Size = New System.Drawing.Size(51, 20)
            txtTSWk2Tuesday.TabIndex = 437
            txtTSWk2Tuesday.Text = "0.00"
            txtTSWk2Tuesday.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Time Sheet Week 2 - Monday
            REM 
            txtTSWk2Monday.Location = New System.Drawing.Point(98, 323)
            txtTSWk2Monday.Name = "txtTSWk2Monday"
            txtTSWk2Monday.Size = New System.Drawing.Size(51, 20)
            txtTSWk2Monday.TabIndex = 436
            txtTSWk2Monday.Text = "0.00"
            txtTSWk2Monday.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Time Sheet Week 1 - Sunday
            REM 
            txtTSWk1Sunday.Location = New System.Drawing.Point(440, 149)
            txtTSWk1Sunday.Name = "txtTSWk1Sunday"
            txtTSWk1Sunday.Size = New System.Drawing.Size(51, 20)
            txtTSWk1Sunday.TabIndex = 369
            txtTSWk1Sunday.Text = "0.00"
            txtTSWk1Sunday.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Time Sheet Week 1 - Saturday
            REM 
            txtTSWk1Saturday.Location = New System.Drawing.Point(383, 149)
            txtTSWk1Saturday.Name = "txtTSWk1Saturday"
            txtTSWk1Saturday.Size = New System.Drawing.Size(51, 20)
            txtTSWk1Saturday.TabIndex = 368
            txtTSWk1Saturday.Text = "0.00"
            txtTSWk1Saturday.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Time Sheet Week 1 - Friday
            REM 
            txtTSWk1Friday.Location = New System.Drawing.Point(326, 149)
            txtTSWk1Friday.Name = "txtTSWk1Friday"
            txtTSWk1Friday.Size = New System.Drawing.Size(51, 20)
            txtTSWk1Friday.TabIndex = 367
            txtTSWk1Friday.Text = "0.00"
            txtTSWk1Friday.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Time Sheet Week 1 - Thursday
            REM 
            txtTSWk1Thursday.Location = New System.Drawing.Point(269, 149)
            txtTSWk1Thursday.Name = "txtTSWk1Thursday"
            txtTSWk1Thursday.Size = New System.Drawing.Size(51, 20)
            txtTSWk1Thursday.TabIndex = 366
            txtTSWk1Thursday.Text = "0.00"
            txtTSWk1Thursday.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Time Sheet Week 1 - Wednesday
            REM 
            txtTSWk1Wednesday.Location = New System.Drawing.Point(212, 149)
            txtTSWk1Wednesday.Name = "txtTSWk1Wednesday"
            txtTSWk1Wednesday.Size = New System.Drawing.Size(51, 20)
            txtTSWk1Wednesday.TabIndex = 365
            txtTSWk1Wednesday.Text = "0.00"
            txtTSWk1Wednesday.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Time Sheet Week 1 - Tuesday
            REM 
            txtTSWk1Tuesday.Location = New System.Drawing.Point(155, 149)
            txtTSWk1Tuesday.Name = "txtTSWk1Tuesday"
            txtTSWk1Tuesday.Size = New System.Drawing.Size(51, 20)
            txtTSWk1Tuesday.TabIndex = 364
            txtTSWk1Tuesday.Text = "0.00"
            txtTSWk1Tuesday.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Time Sheet Week 1 - Monday
            REM 
            txtTSWk1Monday.Location = New System.Drawing.Point(98, 149)
            txtTSWk1Monday.Name = "txtTSWk1Monday"
            txtTSWk1Monday.Size = New System.Drawing.Size(51, 20)
            txtTSWk1Monday.TabIndex = 363
            txtTSWk1Monday.Text = "0.00"
            txtTSWk1Monday.TextAlign = HorizontalAlignment.Right
            REM 
            REM Label: TimeSheetSunday
            REM 
            lblTimeSheetSunday.AutoSize = True
            lblTimeSheetSunday.Location = New System.Drawing.Point(437, 130)
            lblTimeSheetSunday.Name = "lblTimeSheetSunday"
            lblTimeSheetSunday.Size = New System.Drawing.Size(43, 13)
            lblTimeSheetSunday.TabIndex = 362
            lblTimeSheetSunday.Text = "Sunday"
            REM 
            REM Label: TimeSheetSaturday
            REM 
            lblTimeSheetSaturday.AutoSize = True
            lblTimeSheetSaturday.Location = New System.Drawing.Point(382, 130)
            lblTimeSheetSaturday.Name = "lblTimeSheetSaturday"
            lblTimeSheetSaturday.Size = New System.Drawing.Size(49, 13)
            lblTimeSheetSaturday.TabIndex = 361
            lblTimeSheetSaturday.Text = "Saturday"
            REM 
            REM Label: TimeSheetFriday
            REM 
            lblTimeSheetFriday.AutoSize = True
            lblTimeSheetFriday.Location = New System.Drawing.Point(325, 130)
            lblTimeSheetFriday.Name = "lblTimeSheetFriday"
            lblTimeSheetFriday.Size = New System.Drawing.Size(35, 13)
            lblTimeSheetFriday.TabIndex = 360
            lblTimeSheetFriday.Text = "Friday"
            REM 
            REM Label: TimeSheetThursday
            REM 
            lblTimeSheetThursday.AutoSize = True
            lblTimeSheetThursday.Location = New System.Drawing.Point(270, 130)
            lblTimeSheetThursday.Name = "lblTimeSheetThursday"
            lblTimeSheetThursday.Size = New System.Drawing.Size(51, 13)
            lblTimeSheetThursday.TabIndex = 359
            lblTimeSheetThursday.Text = "Thursday"
            REM 
            REM Label: TimeSheetWednesday
            REM 
            lblTimeSheetWednesday.AutoSize = True
            lblTimeSheetWednesday.Location = New System.Drawing.Point(206, 130)
            lblTimeSheetWednesday.Name = "lblTimeSheetWednesday"
            lblTimeSheetWednesday.Size = New System.Drawing.Size(64, 13)
            lblTimeSheetWednesday.TabIndex = 358
            lblTimeSheetWednesday.Text = "Wednesday"
            REM 
            REM Label: TimeSheetTuesday
            REM 
            lblTimeSheetTuesday.AutoSize = True
            lblTimeSheetTuesday.Location = New System.Drawing.Point(152, 130)
            lblTimeSheetTuesday.Name = "lblTimeSheetTuesday"
            lblTimeSheetTuesday.Size = New System.Drawing.Size(48, 13)
            lblTimeSheetTuesday.TabIndex = 357
            lblTimeSheetTuesday.Text = "Tuesday"
            REM 
            REM Label: TimeSheetMonday
            REM 
            lblTimeSheetMonday.AutoSize = True
            lblTimeSheetMonday.Location = New System.Drawing.Point(95, 130)
            lblTimeSheetMonday.Name = "lblTimeSheetMonday"
            lblTimeSheetMonday.Size = New System.Drawing.Size(45, 13)
            lblTimeSheetMonday.TabIndex = 356
            lblTimeSheetMonday.Text = "Monday"
            REM 
            REM Text Box: GrossSalary
            REM 
            txtGrossSalary.Location = New System.Drawing.Point(664, 406)
            txtGrossSalary.Name = "txtGrossSalary"
            txtGrossSalary.Size = New System.Drawing.Size(79, 20)
            txtGrossSalary.TabIndex = 393
            txtGrossSalary.Text = "0.00"
            txtGrossSalary.TextAlign = HorizontalAlignment.Right
            REM 
            REM Label: GrossSalary
            REM 
            lblGrossSalary.AutoSize = True
            lblGrossSalary.Location = New System.Drawing.Point(589, 409)
            lblGrossSalary.Name = "lblGrossSalary"
            lblGrossSalary.Size = New System.Drawing.Size(69, 13)
            lblGrossSalary.TabIndex = 403
            lblGrossSalary.Text = "Gross Salary:"
            REM 
            REM Text Box: OvertimePay
            REM 
            txtOvertimePay.Location = New System.Drawing.Point(721, 376)
            txtOvertimePay.Name = "txtOvertimePay"
            txtOvertimePay.Size = New System.Drawing.Size(51, 20)
            txtOvertimePay.TabIndex = 392
            txtOvertimePay.Text = "0.00"
            txtOvertimePay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: RegularPay
            REM 
            txtRegularPay.Location = New System.Drawing.Point(721, 350)
            txtRegularPay.Name = "txtRegularPay"
            txtRegularPay.Size = New System.Drawing.Size(51, 20)
            txtRegularPay.TabIndex = 390
            txtRegularPay.Text = "0.00"
            txtRegularPay.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: Overtime
            REM 
            txtOvertime.Location = New System.Drawing.Point(664, 376)
            txtOvertime.Name = "txtOvertime"
            txtOvertime.Size = New System.Drawing.Size(51, 20)
            txtOvertime.TabIndex = 391
            txtOvertime.Text = "0.00"
            txtOvertime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Text Box: RegularTime
            REM 
            txtRegularTime.Location = New System.Drawing.Point(664, 350)
            txtRegularTime.Name = "txtRegularTime"
            txtRegularTime.Size = New System.Drawing.Size(51, 20)
            txtRegularTime.TabIndex = 389
            txtRegularTime.Text = "0.00"
            txtRegularTime.TextAlign = HorizontalAlignment.Right
            REM 
            REM Label: Overtime
            REM 
            lblOvertime.AutoSize = True
            lblOvertime.Location = New System.Drawing.Point(589, 379)
            lblOvertime.Name = "lblOvertime"
            lblOvertime.Size = New System.Drawing.Size(52, 13)
            lblOvertime.TabIndex = 402
            lblOvertime.Text = "Overtime:"
            REM 
            REM Label: Regular
            REM 
            lblRegular.AutoSize = True
            lblRegular.Location = New System.Drawing.Point(589, 353)
            lblRegular.Name = "lblRegular"
            lblRegular.Size = New System.Drawing.Size(47, 13)
            lblRegular.TabIndex = 388
            lblRegular.Text = "Regular:"
            REM 
            REM Label: Pay
            REM 
            lblPay.AutoSize = True
            lblPay.Location = New System.Drawing.Point(720, 332)
            lblPay.Name = "lblPay"
            lblPay.Size = New System.Drawing.Size(25, 13)
            lblPay.TabIndex = 387
            lblPay.Text = "Pay"
            REM 
            REM Label: Time
            REM 
            lblTime.AutoSize = True
            lblTime.Location = New System.Drawing.Point(661, 332)
            lblTime.Name = "lblTime"
            lblTime.Size = New System.Drawing.Size(30, 13)
            lblTime.TabIndex = 386
            lblTime.Text = "Time"
            REM 
            REM Label: Totals
            REM 
            lblTotals.AutoSize = True
            lblTotals.Location = New System.Drawing.Point(510, 130)
            lblTotals.TabIndex = 385
            lblTotals.Text = "Total"
            Controls.Add(lblTotals)
    
            REM Label: Double Line 1
            lblDoubleLine1.AutoSize = True
            lblDoubleLine1.Location = New System.Drawing.Point(22, 107)
            lblDoubleLine1.TabIndex = 508
            lblDoubleLine1.Text = "============================================="
            Controls.Add(lblDoubleLine1)
    
            REM label2
            label2.AutoSize = True
            label2.Location = New System.Drawing.Point(19, 476)
            label2.Name = "label2"
            label2.Size = New System.Drawing.Size(763, 13)
            label2.TabIndex = 509
            label2.Text = "==============================================================="
            Controls.Add(label2)
    
            REM Button: Close
            btnClose = New Button()
            btnClose.Location = New System.Drawing.Point(664, 444)
            btnClose.Size = New System.Drawing.Size(108, 23)
            btnClose.TabIndex = 373
            btnClose.Text = "Close"
            Controls.Add(btnClose)
    
            REM Form: Payroll Summary 2
            ClientSize = New System.Drawing.Size(797, 501)
            Controls.Add(lblStartDate)
            Controls.Add(dtpStartDate)
            Controls.Add(txtEmployeeNumber)
            Controls.Add(lblHourlySalary)
            Controls.Add(txtHourlySalary)
            Controls.Add(lblTimeSheetID)
            Controls.Add(txtTimeSheetID)
            Controls.Add(btnFind)
            Controls.Add(txtTotalOvertimePayWeek2)
            Controls.Add(txtTotalRegularPayWeek2)
            Controls.Add(txtTotalOvertimeWeek2)
            Controls.Add(txtTotalRegularTimeWeek2)
            Controls.Add(txtTotalOvertimePayWeek1)
            Controls.Add(txtTotalRegularPayWeek1)
            Controls.Add(txtTotalOvertimeWeek1)
            Controls.Add(txtTotalRegularTimeWeek1)
            Controls.Add(txtTotalTimeWeek2)
            Controls.Add(txtTotalTimeWeek1)
            Controls.Add(lblDoubleLine)
            Controls.Add(lblSmrWk2OvertimePay)
            Controls.Add(txtSmrWk2SunOvertimePay)
            Controls.Add(txtSmrWk2SatOvertimePay)
            Controls.Add(txtSmrWk2FriOvertimePay)
            Controls.Add(txtSmrWk2ThuOvertimePay)
            Controls.Add(txtSmrWk2WedOvertimePay)
            Controls.Add(txtSmrWk2TueOvertimePay)
            Controls.Add(txtSmrWk2MonOvertimePay)
            Controls.Add(lblSmrWk2RegularPay)
            Controls.Add(txtSmrWk2SunRegularPay)
            Controls.Add(txtSmrWk2SatRegularPay)
            Controls.Add(txtSmrWk2FriRegularPay)
            Controls.Add(txtSmrWk2ThuRegularPay)
            Controls.Add(txtSmrWk2WedRegularPay)
            Controls.Add(txtSmrWk2TueRegularPay)
            Controls.Add(txtSmrWk2MonRegularPay)
            Controls.Add(lblSmrWk2Overtime)
            Controls.Add(txtSmrWk2SunOvertime)
            Controls.Add(txtSmrWk2SatOvertime)
            Controls.Add(txtSmrWk2FriOvertime)
            Controls.Add(txtSmrWk2ThuOvertime)
            Controls.Add(txtSmrWk2WedOvertime)
            Controls.Add(txtSmrWk2TueOvertime)
            Controls.Add(txtSmrWk2MonOvertime)
            Controls.Add(lblSmrWk2RegularTime)
            Controls.Add(txtSmrWk2SunRegularTime)
            Controls.Add(txtSmrWk2SatRegularTime)
            Controls.Add(txtSmrWk2FriRegularTime)
            Controls.Add(txtSmrWk2ThuRegularTime)
            Controls.Add(txtSmrWk2WedRegularTime)
            Controls.Add(txtSmrWk2TueRegularTime)
            Controls.Add(txtSmrWk2MonRegularTime)
            Controls.Add(lblSmrWk1OvertimePay)
            Controls.Add(txtSmrWk1SunOvertimePay)
            Controls.Add(txtSmrWk1SatOvertimePay)
            Controls.Add(txtSmrWk1FriOvertimePay)
            Controls.Add(txtSmrWk1ThuOvertimePay)
            Controls.Add(txtSmrWk1WedOvertimePay)
            Controls.Add(txtSmrWk1TueOvertimePay)
            Controls.Add(txtSmrWk1MonOvertimePay)
            Controls.Add(lblSmrWk1RegularPay)
            Controls.Add(txtSmrWk1SunRegularPay)
            Controls.Add(txtSmrWk1SatRegularPay)
            Controls.Add(txtSmrWk1FriRegularPay)
            Controls.Add(txtSmrWk1ThuRegularPay)
            Controls.Add(txtSmrWk1WedRegularPay)
            Controls.Add(txtSmrWk1TueRegularPay)
            Controls.Add(txtSmrWk1MonRegularPay)
            Controls.Add(lblSmrWk1Overtime)
            Controls.Add(txtSmrWk1SunOvertime)
            Controls.Add(txtSmrWk1SatOvertime)
            Controls.Add(txtSmrWk1FriOvertime)
            Controls.Add(txtSmrWk1ThuOvertime)
            Controls.Add(txtSmrWk1WedOvertime)
            Controls.Add(txtSmrWk1TueOvertime)
            Controls.Add(txtSmrWk1MonOvertime)
            Controls.Add(lblSmrWk1RegularTime)
            Controls.Add(txtSmrWk1SunRegularTime)
            Controls.Add(txtSmrWk1SatRegularTime)
            Controls.Add(txtSmrWk1FriRegularTime)
            Controls.Add(txtSmrWk1ThuRegularTime)
            Controls.Add(txtSmrWk1WedRegularTime)
            Controls.Add(txtSmrWk1TueRegularTime)
            Controls.Add(txtSmrWk1MonRegularTime)
            Controls.Add(lblLineWeek2Summary)
            Controls.Add(lblLineWeek1Summary)
            Controls.Add(lblSummarySunday)
            Controls.Add(lblEmployeeNumber)
            Controls.Add(txtEmployeeName)
            Controls.Add(lblTimeSheetWeek2)
            Controls.Add(lblTimeSheetWeek1)
            Controls.Add(txtTSWk2Sunday)
            Controls.Add(txtTSWk2Saturday)
            Controls.Add(txtTSWk2Friday)
            Controls.Add(txtTSWk2Thursday)
            Controls.Add(txtTSWk2Wednesday)
            Controls.Add(txtTSWk2Tuesday)
            Controls.Add(txtTSWk2Monday)
            Controls.Add(txtTSWk1Sunday)
            Controls.Add(txtTSWk1Saturday)
            Controls.Add(txtTSWk1Friday)
            Controls.Add(txtTSWk1Thursday)
            Controls.Add(txtTSWk1Wednesday)
            Controls.Add(txtTSWk1Tuesday)
            Controls.Add(txtTSWk1Monday)
            Controls.Add(lblTimeSheetSunday)
            Controls.Add(lblTimeSheetSaturday)
            Controls.Add(lblTimeSheetFriday)
            Controls.Add(lblTimeSheetThursday)
            Controls.Add(lblTimeSheetWednesday)
            Controls.Add(lblTimeSheetTuesday)
            Controls.Add(lblTimeSheetMonday)
            Controls.Add(txtGrossSalary)
            Controls.Add(lblGrossSalary)
            Controls.Add(txtOvertimePay)
            Controls.Add(txtRegularPay)
            Controls.Add(txtOvertime)
            Controls.Add(txtRegularTime)
            Controls.Add(lblOvertime)
            Controls.Add(lblRegular)
            Controls.Add(lblPay)
            Controls.Add(lblTime)
            MaximizeBox = False
            StartPosition = FormStartPosition.CenterScreen
            Text = "Fun Department Store - Payroll Summary"
        End Sub
    
        Private Sub ResetForm()
            hourlySalary = 0.0
            overtimeSalary = 0.0
    
            week1Monday = 0.0
            week1Tuesday = 0.0
            week1Wednesday = 0.0
            week1Thursday = 0.0
            week1Friday = 0.0
            week1Saturday = 0.0
            week1Sunday = 0.0
            week2Monday = 0.0
            week2Tuesday = 0.0
            week2Wednesday = 0.0
            week2Thursday = 0.0
            week2Friday = 0.0
            week2Saturday = 0.0
            week2Sunday = 0.0
    
            txtEmployeeNumber.Text = ""
            txtEmployeeName.Text = ""
            txtHourlySalary.Text = ""
    
            txtTSWk1Monday.Text = "0.00"
            txtTSWk1Tuesday.Text = "0.00"
            txtTSWk1Wednesday.Text = "0.00"
            txtTSWk1Thursday.Text = "0.00"
            txtTSWk1Friday.Text = "0.00"
            txtTSWk1Saturday.Text = "0.00"
            txtTSWk1Sunday.Text = "0.00"
            txtTotalTimeWeek1.Text = "0.00"
            txtTotalRegularTimeWeek1.Text = "0.00"
            txtTotalOvertimeWeek1.Text = "0.00"
            txtTotalRegularPayWeek1.Text = "0.00"
            txtTotalOvertimePayWeek1.Text = "0.00"
    
            txtSmrWk1MonRegularTime.Text = "0.00"
            txtSmrWk1MonOvertime.Text = "0.00"
            txtSmrWk1MonRegularPay.Text = "0.00"
            txtSmrWk1MonOvertimePay.Text = "0.00"
    
            txtSmrWk1TueRegularTime.Text = "0.00"
            txtSmrWk1TueOvertime.Text = "0.00"
            txtSmrWk1TueRegularPay.Text = "0.00"
            txtSmrWk1TueOvertimePay.Text = "0.00"
    
            txtSmrWk1WedRegularTime.Text = "0.00"
            txtSmrWk1WedOvertime.Text = "0.00"
            txtSmrWk1WedRegularPay.Text = "0.00"
            txtSmrWk1WedOvertimePay.Text = "0.00"
    
            txtSmrWk1ThuRegularTime.Text = "0.00"
            txtSmrWk1ThuOvertime.Text = "0.00"
            txtSmrWk1ThuRegularPay.Text = "0.00"
            txtSmrWk1ThuOvertimePay.Text = "0.00"
    
            txtSmrWk1FriRegularTime.Text = "0.00"
            txtSmrWk1FriOvertime.Text = "0.00"
            txtSmrWk1FriRegularPay.Text = "0.00"
            txtSmrWk1FriOvertimePay.Text = "0.00"
    
            txtSmrWk1SatRegularTime.Text = "0.00"
            txtSmrWk1SatOvertime.Text = "0.00"
            txtSmrWk1SatRegularPay.Text = "0.00"
            txtSmrWk1SatOvertimePay.Text = "0.00"
    
            txtSmrWk1SunRegularTime.Text = "0.00"
            txtSmrWk1SunOvertime.Text = "0.00"
            txtSmrWk1SunRegularPay.Text = "0.00"
            txtSmrWk1SunOvertimePay.Text = "0.00"
    
            txtTSWk2Monday.Text = "0.00"
            txtTSWk2Tuesday.Text = "0.00"
            txtTSWk2Wednesday.Text = "0.00"
            txtTSWk2Thursday.Text = "0.00"
            txtTSWk2Friday.Text = "0.00"
            txtTSWk2Saturday.Text = "0.00"
            txtTSWk2Sunday.Text = "0.00"
            txtTotalTimeWeek2.Text = "0.00"
            txtTotalRegularTimeWeek2.Text = "0.00"
            txtTotalOvertimeWeek2.Text = "0.00"
            txtTotalRegularPayWeek2.Text = "0.00"
            txtTotalOvertimePayWeek2.Text = "0.00"
    
            txtSmrWk2MonRegularTime.Text = "0.00"
            txtSmrWk2MonOvertime.Text = "0.00"
            txtSmrWk2MonRegularPay.Text = "0.00"
            txtSmrWk2MonOvertimePay.Text = "0.00"
    
            txtSmrWk2TueRegularTime.Text = "0.00"
            txtSmrWk2TueOvertime.Text = "0.00"
            txtSmrWk2TueRegularPay.Text = "0.00"
            txtSmrWk2TueOvertimePay.Text = "0.00"
    
            txtSmrWk2WedRegularTime.Text = "0.00"
            txtSmrWk2WedOvertime.Text = "0.00"
            txtSmrWk2WedRegularPay.Text = "0.00"
            txtSmrWk2WedOvertimePay.Text = "0.00"
    
            txtSmrWk2ThuRegularTime.Text = "0.00"
            txtSmrWk2ThuOvertime.Text = "0.00"
            txtSmrWk2ThuRegularPay.Text = "0.00"
            txtSmrWk2ThuOvertimePay.Text = "0.00"
    
            txtSmrWk2FriRegularTime.Text = "0.00"
            txtSmrWk2FriOvertime.Text = "0.00"
            txtSmrWk2FriRegularPay.Text = "0.00"
            txtSmrWk2FriOvertimePay.Text = "0.00"
    
            txtSmrWk2SatRegularTime.Text = "0.00"
            txtSmrWk2SatOvertime.Text = "0.00"
            txtSmrWk2SatRegularPay.Text = "0.00"
            txtSmrWk2SatOvertimePay.Text = "0.00"
    
            txtSmrWk2SunRegularTime.Text = "0.00"
            txtSmrWk2SunOvertime.Text = "0.00"
            txtSmrWk2SunRegularPay.Text = "0.00"
            txtSmrWk2SunOvertimePay.Text = "0.00"
    
            txtRegularTime.Text = "0.00"
            txtOvertime.Text = "0.00"
            txtRegularPay.Text = "0.00"
            txtOvertimePay.Text = "0.00"
    
            txtGrossSalary.Text = "0.00"
        End Sub
    
        Private Sub PayrollSummaryLoad(ByVal sender As Object, ByVal e As EventArgs) Handles me.load
            ResetForm()
        End Sub
    
        Private Sub txtEmployeeNumberLeave(ByVal sender As Object, ByVal e As EventArgs) Handles txtEmployeeNumber.Leave
            Dim employeeFound = False
            Dim xdEmployees As XmlDocument = New XmlDocument()
            Dim strEmployeesFile As String = "C:\Fun Department Store - Payroll\Employees.xml"
    
            If String.IsNullOrEmpty(txtEmployeeNumber.Text) Then
                Exit Sub
            End If
    
            If File.Exists(strEmployeesFile) Then
                Using fsEmployees As FileStream = New FileStream(strEmployeesFile, FileMode.Open, FileAccess.Read)
                    xdEmployees.Load(fsEmployees)
    
                    Dim xnlEmployees As XmlNodeList = xdEmployees.GetElementsByTagName("EmployeeNumber")
    
                    For Each xnEmployee As XmlNode In xnlEmployees
                        If xnEmployee.InnerText = txtEmployeeNumber.Text Then
                            txtEmployeeName.Text = xnEmployee.NextSibling.InnerText & " " & xnEmployee.NextSibling.NextSibling.InnerText
                            txtHourlySalary.Text = xnEmployee.NextSibling.NextSibling.NextSibling.InnerText
    
                            employeeFound = True
                        End If
                    Next
    
                    If employeeFound = False Then
                        msgbox("There is no staff member with that employee number.",
                                        MsgBoxStyle.OKOnly Or MsgBoxStyle.Information,
                                        "FunDS - Employees Time Sheets")
    
                        ResetForm()
                        Exit Sub
                    End If
                End Using
            End If
        End Sub
    
        Private Sub btnFindClick(ByVal sender As Object, ByVal e As EventArgs) Handles btnFind.Click
            Dim timeSheetFound = False
            Dim xdTimeSheets As XmlDocument = New XmlDocument()
            Dim strTimeSheetsFile = "C:\Fun Department Store10\TimeSheets.xml"
    
            If String.IsNullOrEmpty(txtEmployeeNumber.Text) Then
                Exit Sub
            End If
    
            If File.Exists(strTimeSheetsFile) Then
                Using fsTimeSheets As FileStream = New FileStream(strTimeSheetsFile, FileMode.Open, FileAccess.Read)
                    xdTimeSheets.Load(fsTimeSheets)
    
                    Dim xnlTimeSheets As XmlNodeList = xdTimeSheets.DocumentElement.SelectNodes("/TimeSheets/TimeSheet/EmployeeNumber[.='" & txtEmployeeNumber.Text & "']")
    
                    For Each xnTimeSheet As XmlNode In xnlTimeSheets
                        If xnTimeSheet.NextSibling.InnerText = dtpStartDate.Value.ToShortDateString() Then
                            txtTimeSheetID.Text = xnTimeSheet.PreviousSibling.InnerText
    
                            txtTSWk1Monday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.InnerText))
                            txtTSWk1Tuesday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk1Wednesday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk1Thursday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk1Friday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk1Saturday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk1Sunday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
    
                            txtTSWk2Monday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk2Tuesday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk2Wednesday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk2Thursday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk2Friday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk2Saturday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
                            txtTSWk2Sunday.Text = FormatNumber(CDbl(xnTimeSheet.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText))
    
                            timeSheetFound = True
                            ProcessTimeSheet()
                        End If
                    Next
    
                    If timeSheetFound = False Then
                        msgbox("There is no time sheet for that start date and that employee number.",
                                        MsgBoxStyle.OKOnly Or MsgBoxStyle.Information,
                                        "FunDS - Employees Time Sheets")
                        ResetForm()
                    End If
                End Using
            End If
        End Sub
    
        Public Function GetWeek1MondaySummary() As Tuple(Of Double, Double, Double, Double)
            week1Monday = CDbl(txtTSWk1Monday.Text)
    
            Dim regTime As Double = 0.0
            Dim overTime As Double = 0.0
    
            If week1Monday <= 8.0 Then
                regTime = week1Monday
            Else
                regTime = 8.0
            End If
    
            If week1Monday <= 8.0 Then
                overTime = 0.0
            Else
                overTime = week1Monday - 8.0
            End If
    
            Dim regPay As Double = regTime * hourlySalary
            Dim overPay As Double = overTime * overtimeSalary
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overTime, regPay, overPay)
        End Function
    
        Public Function GetWeek1TuesdaySummary() As Tuple(Of Double, Double, Double, Double)
            week1Tuesday = CDbl(txtTSWk1Tuesday.Text)
    
            Dim regTime = 0.0
            Dim overtime = 0.0
    
            If week1Tuesday <= 8.0 Then
                regTime = week1Tuesday
            Else
                regTime = 8.0
            End If
    
            If week1Tuesday <= 8.0 Then
                overtime = 0.0
            Else
                overtime = week1Tuesday - 8.0
            End If
    
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overtime, regTime * hourlySalary, overtime * overtimeSalary)
        End Function
    
        Public Function GetWeek1WednesdaySummary() As Tuple(Of Double, Double, Double, Double)
            week1Wednesday = CDbl(txtTSWk1Wednesday.Text)
    
            Dim regTime As Double = 0.0
            Dim overtime = 0.0
    
            If week1Wednesday <= 8.0 Then
                regTime = week1Wednesday
                overtime = 0.0
            Else
                regTime = 8.0
                overtime = week1Wednesday - 8.0
            End If
    
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overtime, regTime * hourlySalary, overtime * overtimeSalary)
        End Function
    
        Public Function GetWeek1ThursdaySummary() As Tuple(Of Double, Double, Double, Double)
            week1Thursday = CDbl(txtTSWk1Thursday.Text)
    
            Dim regTime = 0.0
            Dim overtime = 0.0
            Dim regPay = 0.0
            Dim overPay = 0.0
    
            If week1Thursday <= 8.0 Then
                regTime = week1Thursday
            Else
                regTime = 8.0
            End If
    
            If week1Thursday <= 8.0 Then overtime = 0.0 Else overtime = week1Thursday - 8.0
            If week1Thursday <= 8.0 Then regPay = week1Thursday * hourlySalary Else regPay = 8.0 * hourlySalary
            If week1Thursday <= 8.0 Then overPay = 0.0 Else overPay = (week1Thursday - 8.0) * overtimeSalary
    
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overtime, regPay, overPay)
        End Function
    
        Public Function GetWeek1FridaySummary() As Tuple(Of Double, Double, Double, Double)
            week1Friday = CDbl(txtTSWk1Friday.Text)
    
            Dim regTime = 0.0, overtime = 0.0, regPay = 0.0, overPay = 0.0
    
            If week1Friday <= 8.0 Then regTime = week1Friday Else regTime = 8.0
            If week1Friday <= 8.0 Then overtime = 0.0 Else overtime = week1Friday - 8.0
            If week1Friday <= 8.0 Then regPay = week1Friday * hourlySalary Else regPay = 8.0 * hourlySalary
            If week1Friday <= 8.0 Then overPay = 0.0 Else overPay = (week1Friday - 8.0) * overtimeSalary
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overtime, regPay, overPay)
        End Function
    
        Public Function GetWeek1SaturdaySummary() As Tuple(Of Double, Double, Double, Double)
            week1Saturday = CDbl(txtTSWk1Saturday.Text)
    
            Dim regTime = 0.0, overtime = 0.0, regPay = 0.0, overPay = 0.0
    
            If week1Saturday <= 8.0 Then regTime = week1Saturday Else regTime = 8.0
            If week1Saturday <= 8.0 Then overtime = 0.0 Else overtime = week1Saturday - 8.0
            If week1Saturday <= 8.0 Then regPay = week1Saturday * hourlySalary Else regPay = 8.0 * hourlySalary
            If week1Saturday <= 8.0 Then overPay = 0.0 Else overPay = overtime * overtimeSalary
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overtime, regPay, overPay)
        End Function
    
        Public Function GetWeek1SundaySummary() As Tuple(Of Double, Double, Double, Double)
            week1Sunday = CDbl(txtTSWk1Sunday.Text)
    
            Dim regTime = 0.0, overtime = 0.0, regPay = 0.0, overPay = 0.0
    
            If week1Sunday <= 8.0 Then
                regTime = week1Sunday
                overtime = 0.0
                regPay = week1Sunday * hourlySalary
                overPay = 0.0
            Else
                regTime = 8.0
                overtime = week1Sunday - 8.0
                regPay = 8.0 * hourlySalary
                overPay = (week1Sunday - 8.0) * overtimeSalary
            End If
    
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overtime, regPay, overPay)
        End Function
    
        Public Function GetWeek2MondaySummary() As Tuple(Of Double, Double, Double, Double)
            week2Monday = CDbl(txtTSWk2Monday.Text)
    
            Dim regTime = 0.0, overtime = 0.0, regPay = 0.0, overPay = 0.0
    
            If week2Monday <= 8.0 Then
                regTime = week2Monday
                overtime = 0.0
                regPay = week2Monday
                overPay = 0.0
            Else
                regTime = 8.0
                overtime = week2Monday - 8.0
                regPay = 8.0 * hourlySalary
                overPay = (week2Monday - 8.0) * overtimeSalary
            End If
    
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overtime, regPay, overPay)
        End Function
    
        Public Function GetWeek2TuesdaySummary() As Tuple(Of Double, Double, Double, Double)
            week2Tuesday = CDbl(txtTSWk2Tuesday.Text)
    
            Dim regTime = 0.0, overtime = 0.0, regPay = 0.0, overPay = 0.0
    
            If week2Tuesday <= 8.0 Then
                regTime = week2Tuesday
                overtime = 0.0
                regPay = week2Tuesday * hourlySalary
                overPay = 0.0
            Else
                regTime = 8.0
                overtime = week2Tuesday - 8.0
                regPay = 8.0 * hourlySalary
                overPay = (week2Tuesday - 8.0) * overtimeSalary
            End If
    
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overtime, regPay, overPay)
        End Function
    
        Public Function GetWeek2WednesdaySummary() As Tuple(Of Double, Double, Double, Double)
            week2Wednesday = CDbl(txtTSWk2Wednesday.Text)
    
            Dim regTime = 0.0, overtime = 0.0, regPay = 0.0, overPay = 0.0
    
            If week2Wednesday <= 8.0 Then
                regTime = week2Wednesday
                overtime = 0.0
                regPay = week2Wednesday * hourlySalary
                overPay = 0.0
            Else
                regTime = 8.0
                overtime = week2Wednesday - 8.0
                regPay = 8.0 * hourlySalary
                overPay = (week2Wednesday - 8.0) * overtimeSalary
            End If
    
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overtime, regPay, overPay)
        End Function
    
        Public Function GetWeek2ThursdaySummary() As Tuple(Of Double, Double, Double, Double)
            week2Thursday = CDbl(txtTSWk2Thursday.Text)
    
            Dim regTime = 0.0, overtime = 0.0, regPay = 0.0, overPay = 0.0
    
            If week2Thursday <= 8.0 Then
                regTime = week2Thursday
                overtime = 0.0
                regPay = week2Thursday * hourlySalary
                overPay = 0.0
            Else
                regTime = 8.0
                overtime = week2Thursday - 8.0
                regPay = 8.0 * hourlySalary
                overPay = (week2Thursday - 8.0) * overtimeSalary
            End If
    
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overtime, regPay, overPay)
        End Function
    
        Public Function GetWeek2FridaySummary() As Tuple(Of Double, Double, Double, Double)
            week2Friday = CDbl(txtTSWk2Friday.Text)
    
            Dim regTime = 0.0, overtime = 0.0, regPay = 0.0, overPay = 0.0
    
            If week2Friday <= 8.0 Then
                regTime = week2Friday
                overtime = 0.0
                regPay = week2Friday * hourlySalary
                overPay = 0.0
            Else
                regTime = 8.0
                overtime = week2Friday - 8.0
                regPay = 8.0 * hourlySalary
                overPay = (week2Friday - 8.0) * overtimeSalary
            End If
    
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overtime, regPay, overPay)
        End Function
    
        Public Function GetWeek2SaturdaySummary() As Tuple(Of Double, Double, Double, Double)
            week2Saturday = CDbl(txtTSWk2Saturday.Text)
    
            Dim regTime = 0.0, overtime = 0.0, regPay = 0.0, overPay = 0.0
    
            If week2Saturday <= 8.0 Then
                regTime = week2Saturday
                overtime = 0.0
                regPay = week2Saturday * hourlySalary
                overPay = 0.0
            Else
                regTime = 8.0
                overtime = week2Saturday - 8.0
                regPay = 8.0 * hourlySalary
                overPay = (week2Saturday - 8.0) * overtimeSalary
            End If
    
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overtime, regPay, overPay)
        End Function
    
        Public Function GetWeek2SundaySummary() As Tuple(Of Double, Double, Double, Double)
            week2Sunday = CDbl(txtTSWk2Sunday.Text)
    
            Dim regTime = 0.0, overtime = 0.0, regPay = 0.0, overPay = 0.0
    
            If week2Sunday <= 8.0 Then
                regTime = week2Sunday
                overtime = 0.0
                regPay = week2Sunday * hourlySalary
                overPay = 0.0
            Else
                regTime = 8.0
                overtime = week2Sunday - 8.0
                regPay = 8.0 * hourlySalary
                overPay = (week2Sunday - 8.0) * overtimeSalary
            End If
    
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overtime, regPay, overPay)
        End Function
    
        Public Function CalculateTotalTimeWorked() As Double
            Return week1Monday + week1Tuesday + week1Wednesday + week1Thursday + week1Friday + week1Saturday + week1Sunday + week2Monday + week2Tuesday + week2Wednesday + week2Thursday + week2Friday + week2Saturday + week2Sunday
        End Function
    
        Public Function GetTimePaySummary() As Tuple(Of Double, Double, Double, Double)
            Dim totalRegularTime = 0.0
            Dim totalOvertime = 0.0
            Dim totalRegularPay = 0.0
            Dim totalOvertimePay = 0.0
    
            Dim w1Mon As Tuple(Of Double, Double, Double, Double) = GetWeek1MondaySummary()
            Dim w1Tue As Tuple(Of Double, Double, Double, Double) = GetWeek1TuesdaySummary()
            Dim w1Wed As Tuple(Of Double, Double, Double, Double) = GetWeek1WednesdaySummary()
            Dim w1Thu As Tuple(Of Double, Double, Double, Double) = GetWeek1ThursdaySummary()
            Dim w1Fri As Tuple(Of Double, Double, Double, Double) = GetWeek1FridaySummary()
            Dim w1Sat As Tuple(Of Double, Double, Double, Double) = GetWeek1SaturdaySummary()
            Dim w1Sun As Tuple(Of Double, Double, Double, Double) = GetWeek1SundaySummary()
    
            Dim w2Mon As Tuple(Of Double, Double, Double, Double) = GetWeek2MondaySummary()
            Dim w2Tue As Tuple(Of Double, Double, Double, Double) = GetWeek2TuesdaySummary()
            Dim w2Wed As Tuple(Of Double, Double, Double, Double) = GetWeek2WednesdaySummary()
            Dim w2Thu As Tuple(Of Double, Double, Double, Double) = GetWeek2ThursdaySummary()
            Dim w2Fri As Tuple(Of Double, Double, Double, Double) = GetWeek2FridaySummary()
            Dim w2Sat As Tuple(Of Double, Double, Double, Double) = GetWeek2SaturdaySummary()
            Dim w2Sun As Tuple(Of Double, Double, Double, Double) = GetWeek2SundaySummary()
    
            totalRegularTime = w1Mon.Item1 + w1Tue.Item1 + w1Wed.Item1 + w1Thu.Item1 + w1Fri.Item1 + w1Sat.Item1 + w1Sun.Item1 + w2Mon.Item1 + w2Tue.Item1 + w2Wed.Item1 + w2Thu.Item1 + w2Fri.Item1 + w2Sat.Item1 + w2Sun.Item1
            totalOvertime = w1Mon.Item2 + w1Tue.Item2 + w1Wed.Item2 + w1Thu.Item2 + w1Fri.Item2 + w1Sat.Item2 + w1Sun.Item2 + w2Mon.Item2 + w2Tue.Item2 + w2Wed.Item2 + w2Thu.Item2 + w2Fri.Item2 + w2Sat.Item2 + w2Sun.Item2
            totalRegularPay = w1Mon.Item3 + w1Tue.Item3 + w1Wed.Item3 + w1Thu.Item3 + w1Fri.Item3 + w1Sat.Item3 + w1Sun.Item3 + w2Mon.Item3 + w2Tue.Item3 + w2Wed.Item3 + w2Thu.Item3 + w2Fri.Item3 + w2Sat.Item3 + w2Sun.Item3
            totalOvertimePay = w1Mon.Item4 + w1Tue.Item4 + w1Wed.Item4 + w1Thu.Item4 + w1Fri.Item4 + w1Sat.Item4 + w1Sun.Item4 + w2Mon.Item4 + w2Tue.Item4 + w2Wed.Item4 + w2Thu.Item4 + w2Fri.Item4 + w2Sat.Item4 + w2Sun.Item4
    
            Return New Tuple(Of Double, Double, Double, Double)(totalRegularTime, totalOvertime, totalRegularPay, totalOvertimePay)
        End Function
    
        Public Function CalculateGrossSalary() As Double
            Dim grossSalary As Tuple(Of Double, Double, Double, Double) = GetTimePaySummary()
    
            Return grossSalary.Item3 + grossSalary.Item4
        End Function
    
        Private Function GetWorkDaySummary(ByVal timeWorked As Double, ByVal hourlySalary As Double) As Tuple(Of Double, Double, Double, Double)
            Dim regTime = 0.0
            Dim overTime = 0.0
            Dim overtimeSalary = hourlySalary * 1.5
    
            If timeWorked <= 8.0 Then
                regTime = timeWorked
            Else
                regTime = 8.0
            End If
    
            If timeWorked <= 8.0 Then
                overTime = 0.0
            Else
                overTime = timeWorked - 8.0
            End If
    
            Dim regPay = regTime * hourlySalary
            Dim overPay = overTime * overtimeSalary
            Return New Tuple(Of Double, Double, Double, Double)(regTime, overTime, regPay, overPay)
        End Function
    
        Private Sub ProcessTimeSheet()
            Dim wk1MondaySummary As Tuple(Of Double, Double, Double, Double) = GetWorkDaySummary(CDbl(txtTSWk1Monday.Text), CDbl(txtHourlySalary.Text))
            Dim wk1TuesdaySummary As Tuple(Of Double, Double, Double, Double) = GetWorkDaySummary(CDbl(txtTSWk1Tuesday.Text), CDbl(txtHourlySalary.Text))
            Dim wk1WednesdaySummary As Tuple(Of Double, Double, Double, Double) = GetWorkDaySummary(CDbl(txtTSWk1Wednesday.Text), CDbl(txtHourlySalary.Text))
            Dim wk1ThursdaySummary As Tuple(Of Double, Double, Double, Double) = GetWorkDaySummary(CDbl(txtTSWk1Thursday.Text), CDbl(txtHourlySalary.Text))
            Dim wk1FridaySummary As Tuple(Of Double, Double, Double, Double) = GetWorkDaySummary(CDbl(txtTSWk1Friday.Text), CDbl(txtHourlySalary.Text))
            Dim wk1SaturdaySummary As Tuple(Of Double, Double, Double, Double) = GetWorkDaySummary(CDbl(txtTSWk1Saturday.Text), CDbl(txtHourlySalary.Text))
            Dim wk1SundaySummary As Tuple(Of Double, Double, Double, Double) = GetWorkDaySummary(CDbl(txtTSWk1Sunday.Text), CDbl(txtHourlySalary.Text))
    
            Dim wk2MondaySummary As Tuple(Of Double, Double, Double, Double) = GetWorkDaySummary(CDbl(txtTSWk2Monday.Text), CDbl(txtHourlySalary.Text))
            Dim wk2TuesdaySummary As Tuple(Of Double, Double, Double, Double) = GetWorkDaySummary(CDbl(txtTSWk2Tuesday.Text), CDbl(txtHourlySalary.Text))
            Dim wk2WednesdaySummary As Tuple(Of Double, Double, Double, Double) = GetWorkDaySummary(CDbl(txtTSWk2Wednesday.Text), CDbl(txtHourlySalary.Text))
            Dim wk2ThursdaySummary As Tuple(Of Double, Double, Double, Double) = GetWorkDaySummary(CDbl(txtTSWk2Thursday.Text), CDbl(txtHourlySalary.Text))
            Dim wk2FridaySummary As Tuple(Of Double, Double, Double, Double) = GetWorkDaySummary(CDbl(txtTSWk2Friday.Text), CDbl(txtHourlySalary.Text))
            Dim wk2SaturdaySummary As Tuple(Of Double, Double, Double, Double) = GetWorkDaySummary(CDbl(txtTSWk2Saturday.Text), CDbl(txtHourlySalary.Text))
            Dim wk2SundaySummary As Tuple(Of Double, Double, Double, Double) = GetWorkDaySummary(CDbl(txtTSWk2Sunday.Text), CDbl(txtHourlySalary.Text))
    
            txtTotalTimeWeek1.Text = FormatNumber(CDbl(txtTSWk1Monday.Text) + CDbl(txtTSWk1Tuesday.Text) + CDbl(txtTSWk1Wednesday.Text) + CDbl(txtTSWk1Thursday.Text) + CDbl(txtTSWk1Friday.Text) + CDbl(txtTSWk1Saturday.Text) + CDbl(txtTSWk1Sunday.Text))
            txtTotalRegularTimeWeek1.Text = FormatNumber(wk1MondaySummary.Item1 + wk1TuesdaySummary.Item1 + wk1WednesdaySummary.Item1 + wk1ThursdaySummary.Item1 + wk1FridaySummary.Item1 + wk1SaturdaySummary.Item1 + wk1SundaySummary.Item1)
            txtTotalOvertimeWeek1.Text = FormatNumber(wk1MondaySummary.Item2 + wk1TuesdaySummary.Item2 + wk1WednesdaySummary.Item2 + wk1ThursdaySummary.Item2 + wk1FridaySummary.Item2 + wk1SaturdaySummary.Item2 + wk1SundaySummary.Item2)
            txtTotalRegularPayWeek1.Text = FormatNumber(wk1MondaySummary.Item3 + wk1TuesdaySummary.Item3 + wk1WednesdaySummary.Item3 + wk1ThursdaySummary.Item3 + wk1FridaySummary.Item3 + wk1SaturdaySummary.Item3 + wk1SundaySummary.Item3)
            txtTotalOvertimePayWeek1.Text = FormatNumber(wk1MondaySummary.Item4 + wk1TuesdaySummary.Item4 + wk1WednesdaySummary.Item4 + wk1ThursdaySummary.Item4 + wk1FridaySummary.Item4 + wk1SaturdaySummary.Item4 + wk1SundaySummary.Item4)
    
            txtTotalTimeWeek2.Text = FormatNumber(CDbl(txtTSWk2Monday.Text) + CDbl(txtTSWk2Tuesday.Text) + CDbl(txtTSWk2Wednesday.Text) + CDbl(txtTSWk2Thursday.Text) + CDbl(txtTSWk2Friday.Text) + CDbl(txtTSWk2Saturday.Text) + CDbl(txtTSWk2Sunday.Text))
            txtTotalRegularTimeWeek2.Text = FormatNumber(wk2MondaySummary.Item1 + wk2TuesdaySummary.Item1 + wk2WednesdaySummary.Item1 + wk2ThursdaySummary.Item1 + wk2FridaySummary.Item1 + wk2SaturdaySummary.Item1 + wk2SundaySummary.Item1)
            txtTotalOvertimeWeek2.Text = FormatNumber(wk2MondaySummary.Item2 + wk2TuesdaySummary.Item2 + wk2WednesdaySummary.Item2 + wk2ThursdaySummary.Item2 + wk2FridaySummary.Item2 + wk2SaturdaySummary.Item2 + wk2SundaySummary.Item2)
            txtTotalRegularPayWeek2.Text = FormatNumber(wk2MondaySummary.Item3 + wk2TuesdaySummary.Item3 + wk2WednesdaySummary.Item3 + wk2ThursdaySummary.Item3 + wk2FridaySummary.Item3 + wk2SaturdaySummary.Item3 + wk2SundaySummary.Item3)
            txtTotalOvertimePayWeek2.Text = FormatNumber(wk2MondaySummary.Item4 + wk2TuesdaySummary.Item4 + wk2WednesdaySummary.Item4 + wk2ThursdaySummary.Item4 + wk2FridaySummary.Item4 + wk2SaturdaySummary.Item4 + wk2SundaySummary.Item4)
    
            Dim totalRegularTime = wk1MondaySummary.Item1 + wk1TuesdaySummary.Item1 + wk1WednesdaySummary.Item1 + wk1ThursdaySummary.Item1 + wk1FridaySummary.Item1 + wk1SaturdaySummary.Item1 + wk1SundaySummary.Item1 + wk2MondaySummary.Item1 + wk2TuesdaySummary.Item1 + wk2WednesdaySummary.Item1 + wk2ThursdaySummary.Item1 + wk2FridaySummary.Item1 + wk2SaturdaySummary.Item1 + wk2SundaySummary.Item1
            Dim totalOvertime = wk1MondaySummary.Item2 + wk1TuesdaySummary.Item2 + wk1WednesdaySummary.Item2 + wk1ThursdaySummary.Item2 + wk1FridaySummary.Item2 + wk1SaturdaySummary.Item2 + wk1SundaySummary.Item2 + wk2MondaySummary.Item2 + wk2TuesdaySummary.Item2 + wk2WednesdaySummary.Item2 + wk2ThursdaySummary.Item2 + wk2FridaySummary.Item2 + wk2SaturdaySummary.Item2 + wk2SundaySummary.Item2
            Dim totalRegularPay = wk1MondaySummary.Item3 + wk1TuesdaySummary.Item3 + wk1WednesdaySummary.Item3 + wk1ThursdaySummary.Item3 + wk1FridaySummary.Item3 + wk1SaturdaySummary.Item3 + wk1SundaySummary.Item3 + wk2MondaySummary.Item3 + wk2TuesdaySummary.Item3 + wk2WednesdaySummary.Item3 + wk2ThursdaySummary.Item3 + wk2FridaySummary.Item3 + wk2SaturdaySummary.Item3 + wk2SundaySummary.Item3
            Dim totalOvertimePay = wk1MondaySummary.Item4 + wk1TuesdaySummary.Item4 + wk1WednesdaySummary.Item4 + wk1ThursdaySummary.Item4 + wk1FridaySummary.Item4 + wk1SaturdaySummary.Item4 + wk1SundaySummary.Item4 + wk2MondaySummary.Item4 + wk2TuesdaySummary.Item4 + wk2WednesdaySummary.Item4 + wk2ThursdaySummary.Item4 + wk2FridaySummary.Item4 + wk2SaturdaySummary.Item4 + wk2SundaySummary.Item4
    
            txtSmrWk1MonRegularTime.Text = FormatNumber(wk1MondaySummary.Item1)
            txtSmrWk1MonOvertime.Text = FormatNumber(wk1MondaySummary.Item2)
            txtSmrWk1MonRegularPay.Text = FormatNumber(wk1MondaySummary.Item3)
            txtSmrWk1MonOvertimePay.Text = FormatNumber(wk1MondaySummary.Item4)
    
            txtSmrWk1TueRegularTime.Text = FormatNumber(wk1TuesdaySummary.Item1)
            txtSmrWk1TueOvertime.Text = FormatNumber(wk1TuesdaySummary.Item2)
            txtSmrWk1TueRegularPay.Text = FormatNumber(wk1TuesdaySummary.Item3)
            txtSmrWk1TueOvertimePay.Text = FormatNumber(wk1TuesdaySummary.Item4)
    
            txtSmrWk1WedRegularTime.Text = FormatNumber(wk1WednesdaySummary.Item1)
            txtSmrWk1WedOvertime.Text = FormatNumber(wk1WednesdaySummary.Item2)
            txtSmrWk1WedRegularPay.Text = FormatNumber(wk1WednesdaySummary.Item3)
            txtSmrWk1WedOvertimePay.Text = FormatNumber(wk1WednesdaySummary.Item4)
    
            txtSmrWk1ThuRegularTime.Text = FormatNumber(wk1ThursdaySummary.Item1)
            txtSmrWk1ThuOvertime.Text = FormatNumber(wk1ThursdaySummary.Item2)
            txtSmrWk1ThuRegularPay.Text = FormatNumber(wk1ThursdaySummary.Item3)
            txtSmrWk1ThuOvertimePay.Text = FormatNumber(wk1ThursdaySummary.Item4)
    
            txtSmrWk1FriRegularTime.Text = FormatNumber(wk1FridaySummary.Item1)
            txtSmrWk1FriOvertime.Text = FormatNumber(wk1FridaySummary.Item2)
            txtSmrWk1FriRegularPay.Text = FormatNumber(wk1FridaySummary.Item3)
            txtSmrWk1FriOvertimePay.Text = FormatNumber(wk1FridaySummary.Item4)
    
            txtSmrWk1SatRegularTime.Text = FormatNumber(wk1SaturdaySummary.Item1)
            txtSmrWk1SatOvertime.Text = FormatNumber(wk1SaturdaySummary.Item2)
            txtSmrWk1SatRegularPay.Text = FormatNumber(wk1SaturdaySummary.Item3)
            txtSmrWk1SatOvertimePay.Text = FormatNumber(wk1SaturdaySummary.Item4)
    
            txtSmrWk1SunRegularTime.Text = FormatNumber(wk1SundaySummary.Item1)
            txtSmrWk1SunOvertime.Text = FormatNumber(wk1SundaySummary.Item2)
            txtSmrWk1SunRegularPay.Text = FormatNumber(wk1SundaySummary.Item3)
            txtSmrWk1SunOvertimePay.Text = FormatNumber(wk1SundaySummary.Item4)
    
            txtSmrWk2MonRegularTime.Text = FormatNumber(wk2MondaySummary.Item1)
            txtSmrWk2MonOvertime.Text = FormatNumber(wk2MondaySummary.Item2)
            txtSmrWk2MonRegularPay.Text = FormatNumber(wk2MondaySummary.Item3)
            txtSmrWk2MonOvertimePay.Text = FormatNumber(wk2MondaySummary.Item4)
    
            txtSmrWk2TueRegularTime.Text = FormatNumber(wk2TuesdaySummary.Item1)
            txtSmrWk2TueOvertime.Text = FormatNumber(wk2TuesdaySummary.Item2)
            txtSmrWk2TueRegularPay.Text = FormatNumber(wk2TuesdaySummary.Item3)
            txtSmrWk2TueOvertimePay.Text = FormatNumber(wk2TuesdaySummary.Item4)
    
            txtSmrWk2WedRegularTime.Text = FormatNumber(wk2WednesdaySummary.Item1)
            txtSmrWk2WedOvertime.Text = FormatNumber(wk2WednesdaySummary.Item2)
            txtSmrWk2WedRegularPay.Text = FormatNumber(wk2WednesdaySummary.Item3)
            txtSmrWk2WedOvertimePay.Text = FormatNumber(wk2WednesdaySummary.Item4)
    
            txtSmrWk2ThuRegularTime.Text = FormatNumber(wk2ThursdaySummary.Item1)
            txtSmrWk2ThuOvertime.Text = FormatNumber(wk2ThursdaySummary.Item2)
            txtSmrWk2ThuRegularPay.Text = FormatNumber(wk2ThursdaySummary.Item3)
            txtSmrWk2ThuOvertimePay.Text = FormatNumber(wk2ThursdaySummary.Item4)
    
            txtSmrWk2FriRegularTime.Text = FormatNumber(wk2FridaySummary.Item1)
            txtSmrWk2FriOvertime.Text = FormatNumber(wk2FridaySummary.Item2)
            txtSmrWk2FriRegularPay.Text = FormatNumber(wk2FridaySummary.Item3)
            txtSmrWk2FriOvertimePay.Text = FormatNumber(wk2FridaySummary.Item4)
    
            txtSmrWk2SatRegularTime.Text = FormatNumber(wk2SaturdaySummary.Item1)
            txtSmrWk2SatOvertime.Text = FormatNumber(wk2SaturdaySummary.Item2)
            txtSmrWk2SatRegularPay.Text = FormatNumber(wk2SaturdaySummary.Item3)
            txtSmrWk2SatOvertimePay.Text = FormatNumber(wk2SaturdaySummary.Item4)
    
            txtSmrWk2SunRegularTime.Text = FormatNumber(wk2SundaySummary.Item1)
            txtSmrWk2SunOvertime.Text = FormatNumber(wk2SundaySummary.Item2)
            txtSmrWk2SunRegularPay.Text = FormatNumber(wk2SundaySummary.Item3)
            txtSmrWk2SunOvertimePay.Text = FormatNumber(wk2SundaySummary.Item4)
    
            Dim totalTimeWorked = CDbl(txtTSWk1Monday.Text) + CDbl(txtTSWk1Tuesday.Text) + CDbl(txtTSWk1Wednesday.Text) + CDbl(txtTSWk1Thursday.Text) + CDbl(txtTSWk1Friday.Text) + CDbl(txtTSWk1Saturday.Text) + CDbl(txtTSWk1Sunday.Text) + CDbl(txtTSWk2Monday.Text) + CDbl(txtTSWk2Tuesday.Text) + CDbl(txtTSWk2Wednesday.Text) + CDbl(txtTSWk2Thursday.Text) + CDbl(txtTSWk2Friday.Text) + CDbl(txtTSWk2Saturday.Text) + CDbl(txtTSWk2Sunday.Text)
            Dim grossSalary = wk1MondaySummary.Item3 + wk1MondaySummary.Item4 + wk1TuesdaySummary.Item3 + wk1TuesdaySummary.Item4 + wk1WednesdaySummary.Item3 + wk1WednesdaySummary.Item4 + wk1ThursdaySummary.Item3 + wk1ThursdaySummary.Item4 + wk1FridaySummary.Item3 + wk1FridaySummary.Item4 + wk1SaturdaySummary.Item3 + wk1SaturdaySummary.Item4 + wk1SundaySummary.Item3 + wk1SundaySummary.Item4 + wk2MondaySummary.Item3 + wk2MondaySummary.Item4 + wk2TuesdaySummary.Item3 + wk2TuesdaySummary.Item4 + wk2WednesdaySummary.Item3 + wk2WednesdaySummary.Item4 + wk2ThursdaySummary.Item3 + wk2ThursdaySummary.Item4 + wk2FridaySummary.Item3 + wk2FridaySummary.Item4 + wk2SaturdaySummary.Item3 + wk2SaturdaySummary.Item4 + wk2SundaySummary.Item3 + wk2SundaySummary.Item4
    
            txtRegularTime.Text = FormatNumber(totalRegularTime)
            txtOvertime.Text = FormatNumber(totalOvertime)
            txtRegularPay.Text = FormatNumber(totalRegularPay)
            txtOvertimePay.Text = FormatNumber(totalOvertimePay)
            txtGrossSalary.Text = FormatNumber(grossSalary)
        End Sub
    
        Private Sub btnCloseClick(ByVal sender As Object, ByVal e As EventArgs) Handles btnclose.Click
            Close()
        End Sub
    
    End Class
  2. On the main menu, click File -> New
  3. When asked whether you want to save, click Save (or Yes)
  4. Set the Save As Type to All Files
  5. Set the File Name to PayrollEvaluation2.vb and press Enter
  6. In the empty document, type:
    Imports System
    Imports System.IO
    Imports System.Xml
    Imports System.Drawing
    Imports System.Windows.Forms
    
    Public Class PayrollSystem
        Inherits Form
    
        Private WithEvents btnEmployeesTimeSheet As Button
        Private WithEvents btnPayrollSummary1 As Button
        Private WithEvents btnPayrollSummary2 As Button
        Private WithEvents btnEmployees As Button
        Private WithEvents btnClose As Button
    
        Public Sub New()
            InitializeComponent()
        End Sub
    
        Private Sub InitializeComponent()
            REM Button: Employees Time Sheet
            btnEmployeesTimeSheet = New Button()
            btnEmployeesTimeSheet.Font = New System.Drawing.Font("Palatino Linotype", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0)
            btnEmployeesTimeSheet.Location = New System.Drawing.Point(23, 27)
            btnEmployeesTimeSheet.Size = New System.Drawing.Size(817, 67)
            btnEmployeesTimeSheet.Text = "Employees Time Sheet ..."
            Controls.Add(btnEmployeesTimeSheet)
    
            REM Button: Payroll Summary 1
            btnPayrollSummary1 = New Button()
            btnPayrollSummary1.Font = New System.Drawing.Font("Palatino Linotype", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0)
            btnPayrollSummary1.Location = New System.Drawing.Point(23, 114)
            btnPayrollSummary1.Size = New System.Drawing.Size(400, 67)
            btnPayrollSummary1.TabIndex = 9
            btnPayrollSummary1.Text = "Payroll System 1 ..."
            Controls.Add(btnPayrollSummary1)
    
            REM Button: Employees
            btnEmployees = New Button()
            btnEmployees.Font = New System.Drawing.Font("Palatino Linotype", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0)
            btnEmployees.Location = New System.Drawing.Point(23, 204)
            btnEmployees.Size = New System.Drawing.Size(400, 67)
            btnEmployees.TabIndex = 10
            btnEmployees.Text = "Employees ..."
            Controls.Add(btnEmployees)
    
            REM Button: PayrollSummary2
            btnPayrollSummary2 = New Button()
            btnPayrollSummary2.Font = New System.Drawing.Font("Palatino Linotype", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0)
            btnPayrollSummary2.Location = New System.Drawing.Point(440, 114)
            btnPayrollSummary2.Size = New System.Drawing.Size(400, 67)
            btnPayrollSummary2.TabIndex = 12
            btnPayrollSummary2.Text = "Payroll System 2 ..."
            Controls.Add(btnPayrollSummary2)
    
            REM Button: Close
            btnClose = New Button()
            btnClose.Font = New System.Drawing.Font("Palatino Linotype", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0)
            btnClose.Location = New System.Drawing.Point(440, 204)
            btnClose.Size = New System.Drawing.Size(400, 67)
            btnClose.Text = "Close"
            Controls.Add(btnClose)
    
            REM Form: Payroll System
            ClientSize = New System.Drawing.Size(863, 298)
            MaximizeBox = False
            StartPosition = FormStartPosition.CenterScreen
            Text = "Fun Department Store - Payroll System"
        End Sub
    
        Private Sub PayrollSystemLoad(ByVal sender As Object, ByVal e As EventArgs) Handles me.load
            Directory.CreateDirectory("C:\Fun Department Store - Payroll")
        End Sub
    
        Private Sub btnEmployeesTimeSheetClick(ByVal sender As Object, ByVal e As EventArgs) Handles btnEmployeesTimeSheet.Click
            Dim ts As TimeSheet = New TimeSheet()
            ts.ShowDialog()
        End Sub
    
        Private Sub btnPayrollSummary1Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnPayrollSummary1.Click
            Dim ps As PayrollSummary1 = New PayrollSummary1()
            ps.Show()
        End Sub
    
        Private Sub btnPayrollSummary2Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnPayrollSummary2.Click
            Dim ps As PayrollSummary2 = New PayrollSummary2()
            ps.Show()
        End Sub
    
        Private Sub btnEmployeesClick(ByVal sender As Object, ByVal e As EventArgs) Handles btnEmployees.Click
            Dim clerks As Employees = New Employees()
            clerks.Show()
        End Sub
    
        Private Sub btnCloseClick(ByVal sender As Object, ByVal e As EventArgs) Handles btnclose.Click
            Close()
        End Sub
    
        <STAThread>
        Public Shared Function Main() As Integer
            Application.EnableVisualStyles()
            Application.SetCompatibleTextRenderingDefault(False)
            Application.Run(New PayrollSystem())
    
            Return 0
        End Function
    
    End Class
  7. On the main menu, click File -> New
  8. When asked whether you want to save, click Save (or Yes)
  9. Set the Save As Type to All Files
  10. Set the File Name to TimeSheetCalculations.cs and press Enter
  11. If you want to build the application, start the Command Prompt (Start -> (All) Programs -> Accessories -> Command Prompt)
  12. Type CD\ and press Enter
  13. Type CD TimeSheetCalculations and press Enter
  14. Type C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc /t:winexe TimeSheetCaculations.cs Employee.cs Employees.cs TimeSheet.cs PayrollSummary1.cs PayrollSummary2.cs and press Enter
  15. If you want to execute the application, type PayrollSystem and press Enter
 
 
   
 

Home Copyright © 2014-2016, FunctionX  

  1.  

    Fun Department Store - Payroll System

  2. If you want to test the application, click the Employees button to open its form
  3. Click the New Employee button:

    Fun Department Store - New Employee

  4. Create a few employees records as follows:

    Employee # First Name Last Name Hourly Salary
    283749 Catherine Watts 38.85
    837405 Herbert Mann 14.75
    428041 Jeanine Hewsen 34.05
    952748 David Evans 17.25
    606384 Robert Gibson 22.25
    172847 Carl Lowry 26.85

    Fun Department Store - Employees

  5. Close the Employees
  6. Open the TimeSheet form:

    Fun Department Store - Employee Time Sheet

  7. Close the Employees form
  8. Click the Employees Time Sheet
  9. Create a few time sheet records as follows and click Submit every time you have completed a record:

    Employee # Start Date Wk 1 Mon Wk 1 Tue Wk 1 Wed Wk 1 Thu Wk 1 Fri Wk 1 Sat Wk 1 Sun Wk 2 Mon Wk 2 Tue Wk 2 Wed Wk 2 Thu Wk 2 Fri Wk 2 Sat Wk 2 Sun
    606384 06/01/2015 0 0 0 0 0 8 8 0 0 0 0 0 8 8
    952748 06/01/2015 8 8 8 8 8 0 0 8 8 8 8 8 0 0
    606384 06/15/2015 0 0 0 0 4 6 8 0 0 0 0 6 6 6
    283749 06/15/2015 8 8 8 8 0 8 8 6 6 8 6 0 7 0
  10. Close the Time Sheet form
  11. Click the Payroll System 1 button to open its form
  12. Set the Start Date as June 1, 2015
  13. Enter the Employee # as 952748
  14. Click Find:

    Fun Department Store - Payroll Evaluation

  15. Change the Start Date to June 15, 2015
  16. Change the Employee # as 283749
  17. Click Find:

    Fun Department Store - Payroll Evaluation

  18. Close the PayrollEvaluation1 form
  19. Open the PayrollEvaluation2 form
  20. Set the Start Date as June 1, 2015
  21. Enter the Employee # as 952748
  22. Click Find:

    Fun Department Store - Payroll Evaluation

  23. Change the Start Date to June 15, 2015
  24. Change the Employee # as 283749
  25. Click Find:

    Fun Department Store - Payroll Evaluation

  26. Close the forms

Home Copyright © 2015-2016, FunctionX, Inc. Home