… continua
Questa è la funzione di caricamento arricchita delle opzioni di riordinamento.
Public Function GetAllAree(ByVal SortBy As String, ByVal ReverseOrder As Boolean) As IList(Of Area)Dim dc = Factory.GetReadyDataContext()
If ReverseOrder Then
Return (From a In dc.GetTable(Of Area)() Where a.STATUS = 10).OrderBy(SortBy & ” DESC”).ToList
Else
Return (From a In dc.GetTable(Of Area)() Where a.STATUS = 10).OrderBy(SortBy).ToList
End If
End Function