Protected Sub ldsAlert_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.LinqDataSourceSelectEventArgs) Handles ldsAlert.Selecting
Dim db As New ASCDataContext
Dim query As IQueryable(Of CandidateAlert) = db.CandidateAlerts
query = query.Where(Function(ca As CandidateAlert) ca.Candidate.SpecialtyID <> 364)
query = query.OrderBy(Function(ca As CandidateAlert) ca.CreatedDate)
Dim result As IEnumerable(Of CandidateAlert) = query.Select(Function(ca As CandidateAlert) ca.Candidate.Specialty.Specialty, ca.CandidateID, ca.City, ca.State, ca.Distance, ca.Ties, ca.CreatedDate, ca.Candidate.WorkStatus.StatusName, ca.Candidate.CandidateAlerts.Count, ca.Candidate.Username)
e.Result = result
End Sub
|