Imports EDSL.Entities
Imports EDSL.DAL

Partial Public Class latestJobs
    Inherits System.Web.UI.UserControl

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim hotJobs As New List(Of entMainProduct)
        Dim srvJobs As New dbMainProduct
        hotJobs = srvJobs.GetLatestJobs()
        Dim func As New miscFunctions
        For Each job As entMainProduct In hotJobs
            With job
                divHotJobs.InnerHtml &= "<div style=""background: #fffdcc;""><h3><a href=""Job-" + func.CleanUrlString(.ProductName) + "-" + .ProductID.ToString() + """>" + .ProductName + "</a></h3><p class=""datatable ""><span>Location: </span><strong>" + .Location + "</strong>"
                If .ShowSalaryOnWebsite = 1 Then
                    divHotJobs.InnerHtml &= "<br /><span>Salary: </span><strong>" + .SalaryText + "</strong>"
                End If

                divHotJobs.InnerHtml &= "<br /><a href=""Job-" + func.CleanUrlString(.ProductName) + "-" + .ProductID.ToString() + """>View Details</a>"
                divHotJobs.InnerHtml &= "</p></div>""
            End With

        Next




    End Sub



End Class