Imports System
Imports System.ComponentModel
Imports System.Collections.Generic
Imports System.Diagnostics
Imports System.Text

Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Actions
Imports DevExpress.Persistent.Base

Public Class HRPerson_LookupListView
	Inherits DevExpress.ExpressApp.ViewController

	Public Sub New()
		MyBase.New()
        InitializeComponent()
		RegisterActions(components) 
    End Sub

    Protected Overrides Sub OnActivated()
        MyBase.OnActivated()
        If View.Id = "HRPerson_LookupListView" Then
            Dim _HRPerson_LookupListView As ListView = TryCast(View, ListView)

            Dim _HRPerson_LookupListView_CollectionSourece As CollectionSource = _HRPerson_LookupListView.CollectionSource

            _HRPerson_LookupListView_CollectionSourece.BeginUpdateCriteria()
            _HRPerson_LookupListView_CollectionSourece.Criteria.Clear()
            _HRPerson_LookupListView_CollectionSourece.Criteria.Add("ActiveHRPerson", DevExpress.Data.Filtering.CriteriaOperator.Parse("User.IsActive=True"))
            _HRPerson_LookupListView_CollectionSourece.EndUpdateCriteria()

        End If
    End Sub
End Class
