23 lines
696 B
VB.net
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
|