Public Class SearchFilter Public Shared Property DefaultFilters As New List(Of FilterTimeframe) From { New FilterTimeframe() With {.Name = "Kein", .DisableFilter = True, .[To] = Nothing}, New FilterTimeframe() With {.Name = "Eigener", .CustomFilter = True, .[To] = Date.Now, .From = Date.Now}, New FilterTimeframe() With { .Name = "letzte 7 Tage", .From = Date.Now.Subtract(TimeSpan.FromDays(7)) }, New FilterTimeframe() With { .Name = "letzte 14 Tage", .From = Date.Now.Subtract(TimeSpan.FromDays(14)) }, New FilterTimeframe() With { .Name = "letzte 30 Tage", .From = Date.Now.Subtract(TimeSpan.FromDays(30)) }, New FilterTimeframe() With { .Name = "aktueller Monat", .From = New Date(Now.Year, Now.Month, 1) } } Public Class FilterTimeframe Public Property Name As String Public Property From As Date Public Property [To] As Date = Date.Now Public Property DisableFilter As Boolean = False Public Property CustomFilter As Boolean = False Public Overrides Function ToString() As String Return Name.ToString End Function End Class End Class