Files
Nuvolar/Nuvolar.Module/Controllers/Interfaces/ModelClassAllowSortLogic.vb
T
2017-03-08 11:21:27 +01:00

23 lines
696 B
VB.net

Imports DevExpress.ExpressApp.DC
Imports DevExpress.ExpressApp.Model
<DomainLogic(GetType(IModelClassAllowSort))>
Public NotInheritable Class ModelClassAllowSortLogic
Public Shared Function Get_DefaultListViewAllowSort(ByVal modelClass As IModelClass) As Boolean
If modelClass Is Nothing Then
Return True
End If
If modelClass.TypeInfo Is Nothing Then
Return True
End If
Dim attribute As AllowSortAttribute = modelClass.TypeInfo.FindAttribute(Of AllowSortAttribute)()
If attribute IsNot Nothing Then
Return attribute.AllowSort
Else
Return True
End If
End Function
End Class