protected void Page_PreRender(object sender, EventArgs e)
        {
            // Initialize links for service request tools
            lkbtnAddServiceRequest.Attributes.Add("onclick", string.Format("return LkbtnAddServiceRequestClik();"));

            if (Convert.ToBoolean(Session["sgLFS_FLEETMANAGEMENT_SERVICES_ADMIN"]))
            {
                lkbtnServiceRequestManager.Visible = true;
            }
            else
            {
                lkbtnServiceRequestManager.Visible = false;
            }

            // Initialize reminder links
            int companyId = Int32.Parse(hdfCompanyId.Value);
            int employeeId = Convert.ToInt32(hdfEmployeeId.Value);
            int companyLevelId = Int32.Parse(ddlWorkingLocation.SelectedValue);

            dashboardUnassignedServiceRequestsTDS = (DashboardTDS)HttpContext.Current.Session["dashboardUnassignedServiceRequestsTDS"];
            DashboardUnassignedServiceRequestsGateway dashboardUnassignedServiceRequestsGateway = new DashboardUnassignedServiceRequestsGateway(dashboardUnassignedServiceRequestsTDS);

            if (Convert.ToBoolean(Session["sgLFS_FLEETMANAGEMENT_SERVICES_ADMIN"]))
            {
                if (companyLevelId == 0)
                {
                    if (ddlType.SelectedValue != "(All)")
                    {
                        // ... For unassigned service requests
                        int countUnassignedSR = dashboardUnassignedServiceRequestsGateway.CountUnassignedServiceRequestsByUnitType(companyId, ddlType.SelectedValue);
                        lkbtnUnassignedServiceRequests.Text = countUnassignedSR.ToString() + " Unassigned Services Requests";

                        // ... For rejected service requests
                        int countRejectedSR = dashboardUnassignedServiceRequestsGateway.CountRejectedServiceRequestsByUnitType(companyId, ddlType.SelectedValue);
                        lkbtnRejectedServiceRequests.Text = countRejectedSR.ToString() + " Rejected Services Requests";
                    }
                    else
                    {
                        // ... For unassigned service requests
                        int countUnassignedSR = dashboardUnassignedServiceRequestsGateway.CountUnassignedServiceRequests(companyId);
                        lkbtnUnassignedServiceRequests.Text = countUnassignedSR.ToString() + " Unassigned Services Requests";

                        // ... For rejected service requests
                        int countRejectedSR = dashboardUnassignedServiceRequestsGateway.CountRejectedServiceRequests(companyId);
                        lkbtnRejectedServiceRequests.Text = countRejectedSR.ToString() + " Rejected Services Requests";
                    }
                }
                else
                {
                    if (ddlType.SelectedValue != "(All)")
                    {
                        // ... For unassigned service requests
                        int countUnassignedSR = dashboardUnassignedServiceRequestsGateway.CountUnassignedServiceRequestsByCompanyLevelIdUnitType(companyId, companyLevelId, ddlType.SelectedValue);
                        lkbtnUnassignedServiceRequests.Text = countUnassignedSR.ToString() + " Unassigned Services Requests";

                        // ... For rejected service requests
                        int countRejectedSR = dashboardUnassignedServiceRequestsGateway.CountRejectedServiceRequestsByCompanyLevelIdUnitType(companyId, companyLevelId, ddlType.SelectedValue);
                        lkbtnRejectedServiceRequests.Text = countRejectedSR.ToString() + " Rejected Services Requests";
                    }
                    else
                    {
                        // ... For unassigned service requests
                        int countUnassignedSR = dashboardUnassignedServiceRequestsGateway.CountUnassignedServiceRequestsByCompanyLevelId(companyId, companyLevelId);
                        lkbtnUnassignedServiceRequests.Text = countUnassignedSR.ToString() + " Unassigned Services Requests";

                        // ... For rejected service requests
                        int countRejectedSR = dashboardUnassignedServiceRequestsGateway.CountRejectedServiceRequestsByCompanyLevelId(companyId, companyLevelId);
                        lkbtnRejectedServiceRequests.Text = countRejectedSR.ToString() + " Rejected Services Requests";
                    }
                }
            }
            else
            {
                if (companyLevelId == 0)
                {
                    if (ddlType.SelectedValue != "(All)")
                    {
                        // ... For unassigned service requests
                        int countUnassignedSR = dashboardUnassignedServiceRequestsGateway.CountUnassignedServiceRequestsByAssignTeamMemberIDUnitType(employeeId, companyId, ddlType.SelectedValue);
                        lkbtnUnassignedServiceRequests.Text = countUnassignedSR.ToString() + " Unassigned Services Requests";

                        // ... For rejected service requests
                        int countRejectedSR = dashboardUnassignedServiceRequestsGateway.CountRejectedServiceRequestsByAssignTeamMemberIDUnitType(employeeId, companyId, ddlType.SelectedValue);
                        lkbtnRejectedServiceRequests.Text = countRejectedSR.ToString() + " Rejected Services Requests";
                    }
                    else
                    {
                        // ... For unassigned service requests
                        int countUnassignedSR = dashboardUnassignedServiceRequestsGateway.CountUnassignedServiceRequestsByAssignTeamMemberID(employeeId, companyId);
                        lkbtnUnassignedServiceRequests.Text = countUnassignedSR.ToString() + " Unassigned Services Requests";

                        // ... For rejected service requests
                        int countRejectedSR = dashboardUnassignedServiceRequestsGateway.CountRejectedServiceRequestsByAssignTeamMemberID(employeeId, companyId);
                        lkbtnRejectedServiceRequests.Text = countRejectedSR.ToString() + " Rejected Services Requests";
                    }
                }
                else
                {
                    if (ddlType.SelectedValue != "(All)")
                    {
                        // ... For unassigned service requests
                        int countUnassignedSR = dashboardUnassignedServiceRequestsGateway.CountUnassignedServiceRequestsByAssignTeamMemberIDCompanyLevelIdUnitType(employeeId, companyId, companyLevelId, ddlType.SelectedValue);
                        lkbtnUnassignedServiceRequests.Text = countUnassignedSR.ToString() + " Unassigned Services Requests";

                        // ... For rejected service requests
                        int countRejectedSR = dashboardUnassignedServiceRequestsGateway.CountRejectedServiceRequestsByAssignTeamMemberIDCompanyLevelIdUnitType(employeeId, companyId, companyLevelId, ddlType.SelectedValue);
                        lkbtnRejectedServiceRequests.Text = countRejectedSR.ToString() + " Rejected Services Requests";
                    }
                    else
                    {
                        // ... For unassigned service requests
                        int countUnassignedSR = dashboardUnassignedServiceRequestsGateway.CountUnassignedServiceRequestsByAssignTeamMemberIDCompanyLevelId(employeeId, companyId, companyLevelId);
                        lkbtnUnassignedServiceRequests.Text = countUnassignedSR.ToString() + " Unassigned Services Requests";

                        // ... For rejected service requests
                        int countRejectedSR = dashboardUnassignedServiceRequestsGateway.CountRejectedServiceRequestsByAssignTeamMemberIDCompanyLevelId(employeeId, companyId, companyLevelId);
                        lkbtnRejectedServiceRequests.Text = countRejectedSR.ToString() + " Rejected Services Requests";
                    }
                }
            }
        }
 /// <summary>
 /// LoadAllUnassignedServicesByAssignTeamMemberIDUnitType
 /// </summary>
 /// <param name="assignTeamMemberId">assignTeamMemberId</param>
 /// <param name="companyId">companyId</param>
 /// <param name="unitType">unitType</param>
 public void LoadAllUnassignedServicesByAssignTeamMemberIDUnitType(int assignTeamMemberId, int companyId, string unitType)
 {
     DashboardUnassignedServiceRequestsGateway dashboardUnassignedServiceRequestsGateway = new DashboardUnassignedServiceRequestsGateway(Data);
     dashboardUnassignedServiceRequestsGateway.LoadAllUnassignedServicesByAssignTeamMemberIDUnitType(companyId, assignTeamMemberId, unitType);
 }
 // ////////////////////////////////////////////////////////////////////////
 // PUBLIC METHODS
 //
 /// <summary>
 /// LoadAllUnassignedServices
 /// </summary>
 /// <param name="companyId">companyId</param>
 public void LoadAllUnassignedServices(int companyId)
 {
     DashboardUnassignedServiceRequestsGateway dashboardUnassignedServiceRequestsGateway = new DashboardUnassignedServiceRequestsGateway(Data);
     dashboardUnassignedServiceRequestsGateway.LoadAllUnassignedServices(companyId);
 }
 /// <summary>
 /// LoadAllUnassignedServicesByAssignTeamMemberIDCompanyLevelId
 /// </summary>
 /// <param name="assignTeamMemberId">assignTeamMemberId</param>
 /// <param name="companyId">companyId</param>
 /// <param name="companyLevelId">companyLevelId</param>
 public void LoadAllUnassignedServicesByAssignTeamMemberIDCompanyLevelId(int assignTeamMemberId, int companyId, int companyLevelId)
 {
     DashboardUnassignedServiceRequestsGateway dashboardUnassignedServiceRequestsGateway = new DashboardUnassignedServiceRequestsGateway(Data);
     dashboardUnassignedServiceRequestsGateway.LoadAllUnassignedServicesByAssignTeamMemberIDCompanyLevelId(companyId, assignTeamMemberId, companyLevelId);
 }
 /// <summary>
 /// LoadAllUnassignedServicesByCompanyLevelIdUnitType
 /// </summary>
 /// <param name="companyId">companyId</param>
 /// <param name="companyLevelId">companyLevelId</param>
 /// <param name="unitType">unitType</param>
 public void LoadAllUnassignedServicesByCompanyLevelIdUnitType(int companyId, int companyLevelId, string unitType)
 {
     DashboardUnassignedServiceRequestsGateway dashboardUnassignedServiceRequestsGateway = new DashboardUnassignedServiceRequestsGateway(Data);
     dashboardUnassignedServiceRequestsGateway.LoadAllUnassignedServicesByCompanyLevelIdUnitType(companyId, companyLevelId, unitType);
 }