Public Class frmReportListOfEmployees
    Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
        Me.Close()
    End Sub
    Private Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles btnSubmit.Click
        If rbAllEmployees.Checked = True Then
            ErrorProvider1.Clear()
            PrintListOfEmployee(" SELECT   EMPLOYEE_ID, EMP_CODE, EmployeesName, FathersName, Address, PhoneNumber, MobileNumber, DateOfBirth, PassportNo, Gender, MaritalStatus, JobTitle, DateOfCommencement, PHOTO_FILE_NAME, BasicSalary  FROM    Employee_Information ")
        ElseIf rbDepartment.Checked = True Then
            If cmbDepartment.SelectedValue Is Nothing Or cmbDepartment.SelectedIndex = -1 Then
                ErrorProvider1.SetError(cmbDepartment, "Mandatory field.")
            Else
                ErrorProvider1.Clear()
                PrintListOfEmployee(" SELECT   EMPLOYEE_ID, EMP_CODE, EmployeesName, FathersName, Address, PhoneNumber, MobileNumber, DateOfBirth, PassportNo, Gender, MaritalStatus, JobTitle, DateOfCommencement, PHOTO_FILE_NAME, BasicSalary  FROM    Employee_Information  WHERE   (DEP_ID = " & num_fltr(cmbDepartment.SelectedValue) & ") ")
            End If
        ElseIf rbShift.Checked = True Then
            If cmbShift.SelectedValue Is Nothing Or cmbShift.SelectedIndex = -1 Then
                ErrorProvider1.SetError(cmbShift, "Mandatory field.")
            Else
                ErrorProvider1.Clear()
                PrintListOfEmployee(" SELECT   EMPLOYEE_ID, EMP_CODE, EmployeesName, FathersName, Address, PhoneNumber, MobileNumber, DateOfBirth, PassportNo, Gender, MaritalStatus, JobTitle, DateOfCommencement, PHOTO_FILE_NAME, BasicSalary  FROM    Employee_Information  WHERE    (ShiftID = " & num_fltr(cmbShift.SelectedValue) & ") ")
            End If
        End If
    End Sub
    Private Sub frmReportListOfEmployees_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        FillDataComboBox("SELECT  DEP_ID, DepartmentName FROM Department", "DEP_ID", "DepartmentName", cmbDepartment)
        FillDataComboBox("SELECT  ShiftID, ShiftName FROM WorkingHours", "ShiftID", "ShiftName", cmbShift)
    End Sub
End Class