Imports System.ComponentModel
Imports System.Windows.Forms
Public Class frmMDIParent1
    Private m_ChildFormNumber As Integer
    Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs)
        Dim ChildForm As New System.Windows.Forms.Form
        ChildForm.MdiParent = Me
        m_ChildFormNumber += 1
        ChildForm.Text = "Window " & m_ChildFormNumber
        ChildForm.Show()
    End Sub
    Private Sub CloseAllToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CloseAllToolStripMenuItem.Click
        For Each ChildForm As Form In Me.MdiChildren
            ChildForm.Close()
        Next
    End Sub
    Private Sub btnEmployee_Click(sender As Object, e As EventArgs) Handles btnEmployee.Click
        frmEmployeeDetails.MdiParent = Me
        frmEmployeeDetails.Show()
    End Sub
    Private Sub frmMDIParent_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        InitializeDatabaseConnection()
    End Sub
    Private Sub btnShift_Click(sender As Object, e As EventArgs) Handles btnShift.Click
        frmWorkingHours.MdiParent = Me
        frmWorkingHours.Show()
    End Sub
    Private Sub btnList_Click(sender As Object, e As EventArgs) Handles btnList.Click
        frmEmployeeList.MdiParent = Me
        frmEmployeeList.Show()
    End Sub
    Private Sub btnCompany_Click(sender As Object, e As EventArgs) Handles btnCompany.Click
        frmCompanyProfile.MdiParent = Me
        frmCompanyProfile.Show()
    End Sub
    Private Sub btnOvertime_Click(sender As Object, e As EventArgs) Handles btnOvertime.Click
        frmOvertime.MdiParent = Me
        frmOvertime.Show()
    End Sub
    Private Sub btnDeduction_Click(sender As Object, e As EventArgs) Handles btnDeduction.Click
        frmDeductions.MdiParent = Me
        frmDeductions.Show()
    End Sub
    Private Sub btnAllowances_Click(sender As Object, e As EventArgs) Handles btnAllowances.Click
        frmAllowance.MdiParent = Me
        frmAllowance.Show()
    End Sub
    Private Sub btnCash_Click(sender As Object, e As EventArgs) Handles btnCash.Click
        frmCash.MdiParent = Me
        frmCash.Show()
    End Sub
    Private Sub btnLeave_Click(sender As Object, e As EventArgs) Handles btnLeave.Click
        frmLeave1.MdiParent = Me
        frmLeave1.Show()
    End Sub
    Private Sub CompanyDetailsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CompanyDetailsToolStripMenuItem.Click
        frmCompanyProfile.MdiParent = Me
        frmCompanyProfile.Show()
    End Sub
    Private Sub ShiftManagementToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ShiftManagementToolStripMenuItem.Click
        frmWorkingHours.MdiParent = Me
        frmWorkingHours.Show()
    End Sub
    Private Sub DepartmentInformationToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DepartmentInformationToolStripMenuItem.Click
        frmDepartment.MdiParent = Me
        frmDepartment.Show()
    End Sub
    Private Sub DesignationToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DesignationToolStripMenuItem.Click
        frmDesignation.MdiParent = Me
        frmDesignation.Show()
    End Sub
    Private Sub EmployeeDetailsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles EmployeeDetailsToolStripMenuItem.Click
        frmEmployeeDetails.MdiParent = Me
        frmEmployeeDetails.Show()
    End Sub
    Private Sub EmployeeListToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles EmployeeListToolStripMenuItem.Click
        frmEmployeeList.MdiParent = Me
        frmEmployeeList.Show()
    End Sub
    Private Sub LeaveManagementToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles LeaveManagementToolStripMenuItem.Click
        frmLeave1.MdiParent = Me
        frmLeave1.Show()
    End Sub
    Private Sub OvertimeEarningsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles OvertimeEarningsToolStripMenuItem.Click
        frmOvertime.MdiParent = Me
        frmOvertime.Show()
    End Sub
    Private Sub AllowancesToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AllowancesToolStripMenuItem.Click
        frmAllowance.MdiParent = Me
        frmAllowance.Show()
    End Sub
    Private Sub DeductionsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DeductionsToolStripMenuItem.Click
        frmDeductions.MdiParent = Me
        frmDeductions.Show()
    End Sub
    Private Sub CashAdvanceToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CashAdvanceToolStripMenuItem.Click
        frmCash.MdiParent = Me
        frmCash.Show()
    End Sub
    Private Sub OptionsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles OptionsToolStripMenuItem.Click
        frmApplicationUser.MdiParent = Me
        frmApplicationUser.Show()
    End Sub
    Private Sub AboutToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AboutToolStripMenuItem.Click
        frmAboutPayrollSystem.ShowDialog()
    End Sub
    Private Sub ListOfAvailedLeaveToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ListOfAvailedLeaveToolStripMenuItem.Click
        frmListOfAvailedLeave1.MdiParent = Me
        frmListOfAvailedLeave1.Show()
    End Sub
    Private Sub ListOfAllowancesToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ListOfAllowancesToolStripMenuItem.Click
        frmListOfAllowances.MdiParent = Me
        frmListOfAllowances.Show()
    End Sub
    Private Sub ListOfDeductionsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ListOfDeductionsToolStripMenuItem.Click
        frmListOfDeductions.MdiParent = Me
        frmListOfDeductions.Show()
    End Sub
    Private Sub frmMDIParent_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
        frmLogIn.Show()
        Me.Visible = False
    End Sub
    Private Sub PrintSetupToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PrintSetupToolStripMenuItem.Click
        Me.Close()
    End Sub
    Private Sub ListOfOvertimeEarningsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ListOfOvertimeEarningsToolStripMenuItem.Click
        frmListOfOvertimeEarnings.MdiParent = Me
        frmListOfOvertimeEarnings.Show()
    End Sub
    Private Sub ListOfAllowancesToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles ListOfAllowancesToolStripMenuItem1.Click
        frmListOfCashAdvance.MdiParent = Me
        frmListOfCashAdvance.Show()
    End Sub
    Private Sub FingerprintToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles FingerprintToolStripMenuItem.Click
        frmFingerprintRegistration.MdiParent = Me
        frmFingerprintRegistration.Show()
    End Sub
    Private Sub AttendanceCardToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AttendanceCardToolStripMenuItem.Click
        frmAttendanceCard.MdiParent = Me
        frmAttendanceCard.Show()
    End Sub
    Private Sub AttendanceToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AttendanceToolStripMenuItem.Click
        frmManualAttendance.MdiParent = Me
        frmManualAttendance.Show()
    End Sub
    Private Sub AttendanceListToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AttendanceListToolStripMenuItem.Click
        frmAttendanceList.MdiParent = Me
        frmAttendanceList.Show()
    End Sub
    Private Sub btnAttendance_Click(sender As Object, e As EventArgs) Handles btnAttendance.Click
        frmManualAttendance.MdiParent = Me
        frmManualAttendance.Show()
    End Sub

    Private Sub ListOfEmployeesToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ListOfEmployeesToolStripMenuItem.Click
        frmReportListOfEmployees.MdiParent = Me
        frmReportListOfEmployees.Show()
    End Sub

    Private Sub AttendanceToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles AttendanceToolStripMenuItem1.Click
        frmReportAttendance.MdiParent = Me
        frmReportAttendance.Show()
    End Sub

    Private Sub AllowanceToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AllowanceToolStripMenuItem.Click
        frmReportAllowances.MdiParent = Me
        frmReportAllowances.Show()
    End Sub

    Private Sub OvertimeToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles OvertimeToolStripMenuItem.Click
        frmReportOvertime.MdiParent = Me
        frmReportOvertime.Show()
    End Sub

    Private Sub btnPayroll_Click(sender As Object, e As EventArgs) Handles btnPayroll.Click
        frmPayroll.MdiParent = Me
        frmPayroll.Show()
    End Sub

    Private Sub btnPayslip_Click(sender As Object, e As EventArgs) Handles btnPayslip.Click
        frmPayslip.MdiParent = Me
        frmPayslip.Show()
    End Sub

    Private Sub ChangePasswordToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ChangePasswordToolStripMenuItem.Click
        frmChangePassword.MdiParent = Me
        frmChangePassword.Show()
    End Sub

    Private Sub ViewMenu_Click(sender As Object, e As EventArgs) Handles ViewMenu.Click

    End Sub
End Class
