Namespace: Consultingwerk.SmartComponents.Implementation
Class 
SmartBusinessEntityLookup Copy to Clipboard
Parent classes:
Inherits: Consultingwerk.SmartComponents.Base.SmartBusinessEntityLookupDesign
Implements: Consultingwerk.SmartComponents.ILookupKeyValue, ICustomTypeDescriptor, Consultingwerk.SmartComponents.Interfaces.IEmbeddedSmartEditor, IHasDesignerVerbs, Consultingwerk.SmartComponents.Interfaces.ISmartBusinessEntityLookupDesign, Consultingwerk.SmartComponents.Implementation.ISmartDataFieldForeignFieldsClient, Consultingwerk.SmartComponents.Interfaces.ISupportsPerformLookupIfActive, System.ComponentModel.ISupportInitialize
Inherited by: Consultingwerk.Windows.Util.ComplexInputPrompt.ComplexInputSmartBusinessEntityLookupControl Consultingwerk.SmartComponents.Implementation.SmartMultiSelectionBusinessEntityLookup Consultingwerk.SmartComponents.Implementation.SmartBusinessEntityPopupLookup

File:SmartBusinessEntityLookup
Purpose:Lookup implementation with Support for OERA Business Entities
Description:Allows record selection using lookup field search and
a lookup dialog
Author(s):Marko Rueterbories / Consultingwerk Ltd.
Created:Tue Apr 07 08:29:30 CEST 2009
Notes:The SmartBusinessEntityLookup can be used as an embedded
Editor for an UltraGrid Control's column. When doing so,
the OwningGrid property of the SmartLookup property
needs to by set to the reference of the UltraGrid.



Top Method Summary
Options Name Purpose
AfterInitializeBusinessEntityAdapterHandler (Object, AfterInitializeBusinessEntityAdapterEventArgs) Handles the AfterInitializeBusinessEntityAdapter event of the Lookup Dialog
AssignValue (Control, character, logical) Assigns the Buffer Field Value to the associated Control
BeginInit () Invoked at the beginning of a Containers InitializeComponents method
DisplayValue (SmartBusinessEntityAdapter, character, logical) Displays the Values of the retrieved record after performing the lookup on the associated components.
EndInit () Invoked at the end of a Containers InitializeComponents method
FetchDataFromKeyValue () Fetches data based on the current Lookup Key Value
CHARACTER GetLookupRegistryKey () This Method returns a Registry Key where the Lookup size and position is stored for each Lookup.
HandleForeignFieldValueChanged () Reopens the query of the Smart data field after a foreign field value has changed
HandleLookupDialogResult (ISmartBusinessEntityLookupDialog) Handles OK event of the Lookup Dialog
InitializeTimer3 () Initializes the third Timer Component
Consultingwerk.SmartComponents.Implementation.SmartBusinessEntityAdapter LaunchBusinessEntityAdapter () Launches the SmartBusinessEntityAdapter instance
LookupBrowserInitializeLayoutHandler (Object, InitializeLayoutEventArgs) Handles the InitializeLayout event of the Lookup Browser
LookupDialogFormClosedHandler (Object, FormClosedEventArgs) Event handler for the FormClosed event of the Lookup Dialog
LookupDialogFormClosingHandler (Object, FormClosingEventArgs) Event handler for the FormClosing event of the Lookup Dialog
LookupDialogShownHandler (Object, EventArgs) Event handler for the Shown event of the Lookup Dialog
LookupTimer3Tick (Object, EventArgs) Event Handler for the Tick event of the third Lookup Timer Component
OnAfterInitializeBusinessEntityAdapter (AfterInitializeBusinessEntityAdapterEventArgs) Raises the AfterInitializeBusinessEntityAdapter event
OnBeforeLookupDialogShown (BeforeLookupDialogShownEventArgs) Raises the BeforeLookupDialogShown event
OnKeyDown (KeyEventArgs) Raises the OnKeyDown event
OnLookupDialogFormClosing (LookupDialogFormClosingEventArgs) Raises the LookupDialogShown event
OnLookupDialogShown (LookupDialogShownEventArgs) Raises the LookupDialogShown event
OnLookupKeyValueChanged (EventArgs) Raises the KeyValueChanged event
OnProvideForeignFieldValue (ProvideForeignFieldValueEventArgs) Raises the ProvideForeignFieldValue
PerformLookup () Performs the lookup functionality, performs a call to the data source to retrieve the record based on the field value the user entered in the lookup control
PerformLookup (logical) Performs lookup when user presses a key in the lookup field
PopulateAdditionalFieldDictionary (ILookupFieldSource) Populates the dictionary with the additional lookup field values
PopulateAdditionalFieldDictionary (SmartBusinessEntityAdapter) Populates the dictionary with the additional lookup field values
ProvideForeignFieldValue (ProvideForeignFieldValueEventArgs) Callback method to provide values for a foreign field
ShowLookupDialog () A LookupDialog is shown with the Data Information specified with the Properties LookupEntityName, LookupEntityTable and LookupEntityView.
ShutdownBusinessEntityAdapter () Shuts down (deletes) the SmartBusinessEntityAdapter instance

Top Constructor Summary
Options Name Purpose
SmartBusinessEntityLookup () Constructor of the SmartBusinessEntityLookup control

Top Event Summary
Options Name Purpose
AfterInitializeBusinessEntityAdapter (Object, AfterInitializeBusinessEntityAdapterEventArgs) Event raised when the lookups SmartBusinessEntityAdapter is initialized
BeforeLookupDialogShown (Object, BeforeLookupDialogShownEventArgs) Raised before the Lookup Dialog is shown
LookupDialogFormClosing (Object, LookupDialogFormClosingEventArgs) Raised when the Lookup Dialog is closing
LookupDialogShown (Object, LookupDialogShownEventArgs) Raised when the Lookup Dialog is shown
ProvideForeignFieldValue DELEGATE System.EventHandler Raised to request a ForeignFieldValue

Top Property Summary
Options Name Purpose
System.Windows.Forms.Timer LookupTimer3
Consultingwerk.SmartComponents.Implementation.SmartBusinessEntityAdapter SmartBusinessEntityAdapter


Method Detail
Top

AfterInitializeBusinessEntityAdapterHandler (Object, AfterInitializeBusinessEntityAdapterEventArgs)

Purpose: Handles the AfterInitializeBusinessEntityAdapter event of the
Lookup Dialog
Notes: Forwards the event

Parameters:
sender System.Object
The reference to the object that raised the event
e Consultingwerk.SmartComponents.Implementation.AfterInitializeBusinessEntityAdapterEventArgs
The AfterInitializeBusinessEntityAdapterEventArgs with the data for this event
Top

AssignValue (Control, character, logical)

Purpose: Assigns the Buffer Field Value to the associated Control
Notes:

Parameters:
poControl System.Windows.Forms.Control
The Object reference to the Control
pcValue CHARACTER
The Buffer Field Value
plAvailable LOGICAL
Indicator whether a record is available
Top

BeginInit ()

Purpose: Invoked at the beginning of a Containers InitializeComponents
method
Notes: Enforced by System.ComponentModel.ISupportInitialize
http://msdn.microsoft.com/de-de/library/system.componentmodel.isupportinitialize.begininit(VS.80).aspx

Top

DisplayValue (SmartBusinessEntityAdapter, character, logical)

Purpose: Displays the Values of the retrieved record after performing the lookup on the associated components.
Notes:

Parameters:
poAdapter Consultingwerk.SmartComponents.Implementation.SmartBusinessEntityAdapter
Object reference to the SmartBusinessEntityAdapter
pcValue CHARACTER
The Value of control performing the Lookup
plLostFocus LOGICAL
Logical value indicating if the Lookup is performed due to losing the focus
Top

EndInit ()

Purpose: Invoked at the end of a Containers InitializeComponents method
Notes: Enforced by System.ComponentModel.ISupportInitialize
http://msdn.microsoft.com/de-de/library/system.componentmodel.isupportinitialize.endinit(VS.80).aspx

Top

FetchDataFromKeyValue ()

Purpose: Fetches data based on the current Lookup Key Value
Notes: Builds query string for Lookup Business Entity based on
LookupEntityTable and LookupKeyValueColumn attributes

Top

CHARACTER GetLookupRegistryKey ()

Purpose: This Method returns a Registry Key where the Lookup size and position
is stored for each Lookup.
Notes: The Name of the Key is individual buildable

Returns CHARACTER
The registry key used by the Lookup
Top

HandleForeignFieldValueChanged ()

Purpose: Reopens the query of the Smart data field after a foreign field value has changed
Notes:

Top

HandleLookupDialogResult (ISmartBusinessEntityLookupDialog)

Purpose: Handles OK event of the Lookup Dialog
Notes: Supports implementation in a derived class, no functionality here

Parameters:
poLookupDialog Consultingwerk.SmartComponents.Interfaces.ISmartBusinessEntityLookupDialog
The reference to the Lookup Dialog
Top

InitializeTimer3 ()

Purpose: Initializes the third Timer Component
Notes:

Top

Consultingwerk.SmartComponents.Implementation.SmartBusinessEntityAdapter LaunchBusinessEntityAdapter ()

Purpose: Launches the SmartBusinessEntityAdapter instance
Notes:

Returns Consultingwerk.SmartComponents.Implementation.SmartBusinessEntityAdapter
The reference to the launched SmartBusinessEntityAdapter instance
Top

LookupBrowserInitializeLayoutHandler (Object, InitializeLayoutEventArgs)

Purpose: Handles the InitializeLayout event of the Lookup Browser
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs
The InitializeLayoutEventArgs with the data for this event
Top

LookupDialogFormClosedHandler (Object, FormClosedEventArgs)

Purpose: Event handler for the FormClosed event of the Lookup Dialog
Notes: Stores value from the lookup in the oLookupDialogValueDictionary
dictionary so that the values are available even after the Lookup
Dialog was disposed (after closing)

Parameters:
sender System.Object
The reference to the object that raised the event
e System.Windows.Forms.FormClosedEventArgs
The FormClosedEventArgs with the data for this event
Top

LookupDialogFormClosingHandler (Object, FormClosingEventArgs)

Purpose: Event handler for the FormClosing event of the Lookup Dialog
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e System.Windows.Forms.FormClosingEventArgs
The FormClosingEventArgs with the data for this event
Top

LookupDialogShownHandler (Object, EventArgs)

Purpose: Event handler for the Shown event of the Lookup Dialog
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e System.EventArgs
The System.EventArgs with the data for this event
Top

LookupTimer3Tick (Object, EventArgs)

Purpose: Event Handler for the Tick event of the third Lookup Timer Component
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e System.EventArgs
The System.EventArgs with the data for this event
Top

OnAfterInitializeBusinessEntityAdapter (AfterInitializeBusinessEntityAdapterEventArgs)

Purpose: Raises the AfterInitializeBusinessEntityAdapter event
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.AfterInitializeBusinessEntityAdapterEventArgs
The AfterInitializeBusinessEntityAdapterEventArgs with the data for this event
Top

OnBeforeLookupDialogShown (BeforeLookupDialogShownEventArgs)

Purpose: Raises the BeforeLookupDialogShown event
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.BeforeLookupDialogShownEventArgs
The BeforeLookupDialogShownEventArgs with the data for the event
Top

OnKeyDown (KeyEventArgs)

Purpose: Raises the OnKeyDown event
Notes:

Parameters:
e System.Windows.Forms.KeyEventArgs
The KeyEventArgs with the data for the event
Top

OnLookupDialogFormClosing (LookupDialogFormClosingEventArgs)

Purpose: Raises the LookupDialogShown event
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.LookupDialogFormClosingEventArgs
The LookupDialogShownEventArgs with the data for the event
Top

OnLookupDialogShown (LookupDialogShownEventArgs)

Purpose: Raises the LookupDialogShown event
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.LookupDialogShownEventArgs
The LookupDialogShownEventArgs with the data for the event
Top

OnLookupKeyValueChanged (EventArgs)

Purpose: Raises the KeyValueChanged event
Notes:

Parameters:
e System.EventArgs
The System.EventArgs with the data for this event
Top

OnProvideForeignFieldValue (ProvideForeignFieldValueEventArgs)

Purpose: Raises the ProvideForeignFieldValue
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.ProvideForeignFieldValueEventArgs
The ProvideForeignFieldValueEventArgs with the data for the event
Top

PerformLookup ()

Purpose: Performs the lookup functionality, performs a call to the data source
to retrieve the record based on the field value the user entered
in the lookup control
Notes: Abstract method that needs to be overridden in a more specialized
Lookup class, public method, that always assumes that the lookup has
no longer focus. Calls into PerformLookup (TRUE).

Top

PerformLookup (logical)

Purpose: Performs lookup when user presses a key in the lookup field
Notes:

Parameters:
plLostFocus LOGICAL
Logical value indicating if the Lookup is performed due to losing the focus
Top

PopulateAdditionalFieldDictionary (ILookupFieldSource)

Purpose: Populates the dictionary with the additional lookup field values
Notes:

Parameters:
poDialog Consultingwerk.SmartComponents.Interfaces.ILookupFieldSource
The reference to the ISmartBusinessEntityLookupDialog that returns the values
Top

PopulateAdditionalFieldDictionary (SmartBusinessEntityAdapter)

Purpose: Populates the dictionary with the additional lookup field values
Notes:

Parameters:
poAdapter Consultingwerk.SmartComponents.Implementation.SmartBusinessEntityAdapter
The reference to the SmartBusinessEntityAdapter that returns the values
Top

ProvideForeignFieldValue (ProvideForeignFieldValueEventArgs)

Purpose: Callback method to provide values for a foreign field
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.ProvideForeignFieldValueEventArgs
The ProvideForeignFieldValueEventArgs with the data for this event
Top

ShowLookupDialog ()

Purpose: A LookupDialog is shown with the Data Information specified with the
Properties LookupEntityName, LookupEntityTable and LookupEntityView.
Notes: This Method is called from the Base Class if a user presses the
LookupEditorButton in RunTime.
A LookupDialog is set up with a Title and Data from the Backend
defined by the Properties LookupEntityName, LookupEntityTable and
LookupEntityView. The shown Columns of the result set can be limited
by providing a comma delimited list to the Property
LookupBrowserFields. The LookupKeyField is the field used to find
the correct Data Row when coming back from the Dialog. When the
OK Button was selected the related fields are recursively updated.

Top

ShutdownBusinessEntityAdapter ()

Purpose: Shuts down (deletes) the SmartBusinessEntityAdapter instance
Notes:



Constructor Detail
Top

SmartBusinessEntityLookup ()

Purpose: Constructor of the SmartBusinessEntityLookup control
Notes:



Event Detail
Top

AfterInitializeBusinessEntityAdapter (Object, AfterInitializeBusinessEntityAdapterEventArgs)

Purpose: Event raised when the lookups SmartBusinessEntityAdapter is initialized
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e Consultingwerk.SmartComponents.Implementation.AfterInitializeBusinessEntityAdapterEventArgs
The AfterInitializeBusinessEntityAdapterEventArgs with the data for this event
Top

BeforeLookupDialogShown (Object, BeforeLookupDialogShownEventArgs)

Purpose: Raised before the Lookup Dialog is shown
Notes:

Parameters:
sender Progress.Lang.Object
The object that raised the BeforeLookupDialogShown event
e Consultingwerk.SmartComponents.Implementation.BeforeLookupDialogShownEventArgs
The BeforeLookupDialogShownEventArgs with the data for the event
Top

LookupDialogFormClosing (Object, LookupDialogFormClosingEventArgs)

Purpose: Raised when the Lookup Dialog is closing
Notes:

Parameters:
sender Progress.Lang.Object
The object that raised the LookupDialogFormClosing event
e Consultingwerk.SmartComponents.Implementation.LookupDialogFormClosingEventArgs
The LookupDialogFormClosingEventArgs with the data for the event
Top

LookupDialogShown (Object, LookupDialogShownEventArgs)

Purpose: Raised when the Lookup Dialog is shown
Notes:

Parameters:
sender Progress.Lang.Object
The object that raised the LookupDialogShown event
e Consultingwerk.SmartComponents.Implementation.LookupDialogShownEventArgs
The LookupDialogShownEventArgs with the data for the event
Top

ProvideForeignFieldValue DELEGATE System.EventHandler

Purpose: Raised to request a ForeignFieldValue
Notes: The event argument (e) needs to be CASTed to ProvideForeignFieldValueEventArgs
to access the FieldName and Value properties

Delegate: System.EventHandler


Property Detail
Top

System.Windows.Forms.Timer LookupTimer3


Returns System.Windows.Forms.Timer
Top

Consultingwerk.SmartComponents.Implementation.SmartBusinessEntityAdapter SmartBusinessEntityAdapter


Returns Consultingwerk.SmartComponents.Implementation.SmartBusinessEntityAdapter


©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       13.04.2026 10:23:31