Imports System
Imports System.Collections.Generic
Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Kpi
Imports System.Reflection
Imports DevExpress.Persistent.BaseImpl
Imports Microsoft.VisualBasic
Imports DevExpress.ExpressApp.Model
Imports DevExpress.ExpressApp.Model.Core

Partial Public NotInheritable Class [SISBusinessModule]
    Inherits ModuleBase
    Public Sub New()
        InitializeComponent()
        Person.SetFullNameFormat("{LastName} {FirstName} {MiddleName}", "concat(FirstName, MiddleName, LastName)")
        DateRangeRepository.RegisterRange(New DateRange("Rolling 1995", New RangePoint(New DateTime(1995, 1, 1), 0, TimeIntervalType.Day), New RangePoint(New DateTime(1995, 1, 1), DateTime.Today.DayOfYear, TimeIntervalType.Day)))
        DateRangeRepository.RegisterRange(New DateRange("Rolling 1996", New RangePoint(New DateTime(1996, 1, 1), 0, TimeIntervalType.Day), New RangePoint(New DateTime(1996, 1, 1), DateTime.Today.DayOfYear, TimeIntervalType.Day)))
        ' Address.SetFullAddressFormat("{Country} {ZipPostal} {City} {Street}", "concat(Country, ZipPostal, City, Street)")
    End Sub
    Public Overloads Overrides Sub Setup(ByVal application As XafApplication)
        MyBase.Setup(application)
        AddHandler application.CreateCustomCollectionSource, AddressOf LinqCollectionSourceHelper.CreateCustomCollectionSource
    End Sub
    Public Overrides Sub ExtendModelInterfaces(ByVal extenders As ModelInterfaceExtenders)
        MyBase.ExtendModelInterfaces(extenders)
        extenders.Add(Of IModelListView, IModelListViewExtender)()
        extenders.Add(Of IModelColumn, IModelColumnExtender)()
        extenders.Add(Of IModelClass, IModelClassAllowSort)()
        extenders.Add(Of IModelMember, IModelMemberAllowSort)()
        extenders.Add(Of IModelListView, IModelListViewAllowSort)()
        extenders.Add(Of IModelColumn, IModelColumnAllowSort)()
        extenders.Add(Of IModelAction, IModelActionExtender)()
        extenders.Add(Of IModelListView, IModelListViewLinq)()
        extenders.Add(Of IModelOptions, IModelOptionsExtender)()
        extenders.Add(Of IModelDetailView, IModelDetailViewExtender)()
    End Sub
    Public Overrides Sub AddGeneratorUpdaters(ByVal updaters As ModelNodesGeneratorUpdaters)
        MyBase.AddGeneratorUpdaters(updaters)
        updaters.Add(New ModelListViewLinqNodesGeneratorUpdater())
        updaters.Add(New ModelListViewLinqColumnsNodesGeneratorUpdater())
    End Sub
    Public Overrides Function GetStartupActions() As IList(Of Actions.PopupWindowShowAction)
        Return MyBase.GetStartupActions()
    End Function
End Class
