Namespace: Consultingwerk.SmartComponents.Implementation
Class 
SmartDatasetChildAdapter Copy to Clipboard
Parent classes:
Inherits: Consultingwerk.SmartComponents.Base.SmartDatasetAdapter
Implements: Consultingwerk.SmartComponents.Interfaces.Design.IDesignDataSource, Consultingwerk.SmartComponents.Interfaces.Design.IDesignDataTarget, ICustomTypeDescriptor, Consultingwerk.SmartComponents.Implementation.IDatasetControllerConsumer, Consultingwerk.SmartComponents.Interfaces.Design.IDesignGroupCreateSource, IHasDesignerVerbs, Consultingwerk.SmartComponents.Interfaces.IProvidesRecordKey, Consultingwerk.SmartComponents.Implementation.ISmartBusinessEntityAdapter, Consultingwerk.SmartComponents.Implementation.ISmartBusinessEntityAdapterEvents, Consultingwerk.SmartComponents.Interfaces.ISmartDataSource, Consultingwerk.SmartComponents.Interfaces.ISmartDataSourceWithDataset, Consultingwerk.SmartComponents.Interfaces.ISmartDataTarget, Consultingwerk.SmartComponents.Interfaces.ISmartFilterTarget, Consultingwerk.SmartComponents.Interfaces.ISmartGroupCreateSource, Consultingwerk.SmartComponents.Interfaces.ISmartGroupCreateTarget, Consultingwerk.SmartComponents.Interfaces.ISmartNavigationTarget, Consultingwerk.SmartComponents.Interfaces.ISortableDataSource, Consultingwerk.SmartComponents.Interfaces.IStoresCopiedFrom, Consultingwerk.SmartComponents.Interfaces.ISupportsRefreshData, Consultingwerk.SmartComponents.Interfaces.ISupportsReposition, Consultingwerk.SmartComponents.Interfaces.ISupportsSubmitChanges, System.ComponentModel.ISupportInitialize

File:SmartDatasetChildTableAdapter
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Thu Jul 23 21:28:56 CEST 2009



Top Method Summary
Options Name Purpose
AttachQueryToBindingSource () Attaches the Query to the BindingSource
BeginTransactionState () Begins a transaction when starting update
CancelCreateByGroupCreateSource (ISmartGroupCreateSource) Cancels the creation of a new record in the ISmartGroupCreateTarget
CloseQuery () Reopen Query so that it does not return any data.
CreateRecord () Creates a new record
DataSourceDatasetControllerChangedHandler (Object, EventArgs) Event Handler for the DatasetControllerChanged event of the SmartDataSource
F DeregisterWithDatasetController () Deregisters from the Dataset Controller
EndInit () Signals the object that initialization is complete.
CHARACTER EnsureCompleteQueryString (character) Ensures that the provided Query String contains a criteria for each query buffer
CHARACTER EvaluateParentQueryAfterUpdate () Evaluates the QueryString based on the Parent Filter Fields after UpdateRow
Consultingwerk.SmartComponents.Implementation.SmartBusinessEntityAdapter FindDataSourceSmartBusinessEntityAdapter () Returns the reference to the SmartBusinessEntityAdapter which is the data-source
InitializeAdapter () Initializes the SmartBusinessEntityAdapter
InitializeAdapter (logical) Initializes the SmartBusinessEntityAdapter
Progress.Lang.Object InvokeMethod (character, dataset-handle, ISerializable) Invokes a method in the backend OERA business entity
Progress.Lang.Object InvokeMethod2 (character, dataset-handle, Object) Invokes a method in the backend OERA business entity
CHARACTER MergeQueryStrings (character, ListQueryExpressionByTable) Merges two Query Strings
OnSmartGroupCreateSourceChanged (EventArgs) Raises the SmartGroupCreateSourceChanged event
OnVerbClicked (character) Event Handler method for Designer Verbs
PrepareDataBinding () Method used to prepare the BindingSource:Handle object (QUERY).
RefetchCurrentRow (character) Refetches the current row from the backend and merges it with the frontend dataset
RefreshData () Refreshes the current data
F RegisterWithDatasetController () Registers this instance of the SmartDatasetChildAdapter with the DatasetController
LOGICAL RetrieveData () RetrieveData reads Data from a Datasource and links the DataHandle with a BindingSource inside the Instance of SmartBusinessEntityAdapter.
SetDesignerProperties () Sets Visual Designer related properties
SetQuerySort (character) Overridable Setter for QuerySort property
SetSavingData (logical) Assigns the internal flag that data is being saved
SetSmartDataSource (ISmartDataSource) SetSmartDataSource sets the SmartDataSource of the current instance of the SmartDataAdapter.
ShowTablePickerDialog () Invokes the Table Picker Dialog and sets properties of the SmartBusinessEntityAdapter during Design Time
UpdateRow (logical) UpdateRow submits the changes to a buffer into the Database. Called by SmartViewerControl, SmartUpdatableBrowser Data is updated into the Dataset from the BindingSource. After this the Datasets changes are submitted to the OERA Backend, merged into the Dataset and the BindingSource gets refreshed.

Top Constructor Summary
Options Name Purpose
SmartDatasetChildAdapter () Constructor for the SmartDatasetChildAdapter class
SmartDatasetChildAdapter (IContainer) Constructor for the SmartDatasetChildAdapter class

Top Event Summary
Options Name Purpose
SmartGroupCreateSourceChanged DELEGATE System.EventHandler Event raised whenever the SmartGroupCreateSource property is changed

Top Property Summary
Options Name Purpose
LOGICAL AutoPopulateForeignFields
CHARACTER BindTo
LOGICAL CreateDistinctBuffer
HANDLE DataSet
Consultingwerk.SmartComponents.Interfaces.IDatasetController DatasetController
CHARACTER EntityJoin
CHARACTER EntityName
CHARACTER EntityTable
CHARACTER EntityView
Consultingwerk.SmartComponents.Interfaces.Design.IDesignGroupCreateSource LinkGroupCreateSource
CHARACTER QueryString
LOGICAL RetrieveDataOnChangeSortOrder
Consultingwerk.SmartComponents.Interfaces.ISmartGroupCreateSource SmartGroupCreateSource


Method Detail
Top

AttachQueryToBindingSource ()

Purpose: Attaches the Query to the BindingSource
Notes:

Top

BeginTransactionState ()

Purpose: Begins a transaction when starting update
Notes: Allows SmartDatasetChildAdapter to initiate TransactionState in a
parent SmartBusinessEntityAdapter

Top

CancelCreateByGroupCreateSource (ISmartGroupCreateSource)

Purpose: Cancels the creation of a new record in the ISmartGroupCreateTarget
Notes: Typically invoked when the ISmartGroupCreateSource also cancels the
creation of a new record

Parameters:
poSource Consultingwerk.SmartComponents.Interfaces.ISmartGroupCreateSource
The ISmartgroupCreateSource that caused cancelling the creation of a new row
Top

CloseQuery ()

Purpose: Reopen Query so that it does not return any data.
Notes: SUPER:CloseQuery does not have to be invoked because it is an
abstract METHOD.

Top

CreateRecord ()

Purpose: Creates a new record
Notes: When using a SmartGroupCreateSource ensure that a record in the
SmartGroupCreateSource is created before creating a new record
here.

Top

DataSourceDatasetControllerChangedHandler (Object, EventArgs)

Purpose: Event Handler for the DatasetControllerChanged event of the
SmartDataSource
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

DeregisterWithDatasetController ()

Purpose: Deregisters from the Dataset Controller
Notes:

Top

EndInit ()

Purpose: Signals the object that initialization is complete.
Notes: Makes sure that the BindingSource of the SmartDatasetChildAdapter
is always valid.

Top

CHARACTER EnsureCompleteQueryString (character)

Purpose: Ensures that the provided Query String contains a criteria for each
query buffer
Notes:

Parameters:
pcQueryString CHARACTER
The base query string
Returns CHARACTER
The extended query string
Top

CHARACTER EvaluateParentQueryAfterUpdate ()

Purpose: Evaluates the QueryString based on the Parent Filter Fields after
UpdateRow
Notes: The SmartDatasetChildAdapter and the SmartBusinessEntityAdapter
require a different implementation here

Returns CHARACTER
The parent filter query string
Top

Consultingwerk.SmartComponents.Implementation.SmartBusinessEntityAdapter FindDataSourceSmartBusinessEntityAdapter ()

Purpose: Returns the reference to the SmartBusinessEntityAdapter which is the data-source
Notes: Return ? when no SmartBusinessEntityAdapter is present as a data-source

Returns Consultingwerk.SmartComponents.Implementation.SmartBusinessEntityAdapter
The reference to the SmartBusinessEntityAdapter with is the data-source
Top

InitializeAdapter ()

Purpose: Initializes the SmartBusinessEntityAdapter
Notes: Useful to initialize the BindingSource and Query before calling
RetrieveData.
It's not recommended to call this method prior to the Form's OnLoad
or OnShown event as the ProBindingSource seems to reset the Handle
Property (Query or Dataset) that was assigned to early during
initialization

Top

InitializeAdapter (logical)

Purpose: Initializes the SmartBusinessEntityAdapter
Notes: Useful to initialize the BindingSource and Query before calling
RetrieveData.
It's not recommended to call this method prior to the Form's OnLoad
or OnShown event as teh ProBindingSource seems to reset the Handle
Property (Query or Dataset) that was assigned to early during
initialization

Parameters:
plEmptyDataset LOGICAL
Not used for SmartDatasetChildAdapter
Top

Progress.Lang.Object InvokeMethod (character, dataset-handle, ISerializable)

Purpose: Invokes a method in the backend OERA business entity
Notes:

Parameters:
pcMethodName CHARACTER
The method to be invoked in the Business Entity
phDataset DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the dataset to be passed to the Business Entity method
poParameter Consultingwerk.ISerializable
The ISerializable parameter object to be passed to the Business Entity method
Returns Progress.Lang.Object
The instance of the parameter object
Top

Progress.Lang.Object InvokeMethod2 (character, dataset-handle, Object)

Purpose: Invokes a method in the backend OERA business entity
Notes: This variant of InvokeMethod2 uses the native ABL-SERIALIZABLE method
for exchanging the parameter object with the backend. It does however
return a different instance of the parameter object, so the unlike in
InvokeMethod() the instance passed in as the poParameter reference is
not updated with data from the backend. Thus we're introducing the
return value to return the updated parameter object from the backend.

Parameters:
pcMethodName CHARACTER
The method to be invoked in the Business Entity
phDataset DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the dataset to be passed to the Business Entity method
poParameter Progress.Lang.Object
The ISerializable parameter object to be passed to the Business Entity method
Returns Progress.Lang.Object
The instance of the parameter object
Top

CHARACTER MergeQueryStrings (character, ListQueryExpressionByTable)

Purpose: Merges two Query Strings
Notes:

Parameters:
pcFetchQueryString CHARACTER
The first QueryString
poQueryExpressions Consultingwerk.ListQueryExpressionByTable
The List of QueryExpressions by Table to be merged with the first QueryString
Returns CHARACTER
The resulting Query String
Top

OnSmartGroupCreateSourceChanged (EventArgs)

Purpose: Raises the SmartGroupCreateSourceChanged event
Notes:

Parameters:
e System.EventArgs
.NET Default Event Argument
Top

OnVerbClicked (character)

Purpose: Event Handler method for Designer Verbs
Notes:

Parameters:
pcVerbText CHARACTER
The text indicating the verb that was clicked
Top

PrepareDataBinding ()

Purpose: Method used to prepare the BindingSource:Handle object (QUERY).
Notes: Implemented in the SmartBusinessEntityAdapter and SmartDatasetChildAdapter
Called from RetrieveData or CreateRecord (when called before RetrieveData)

Top

RefetchCurrentRow (character)

Purpose: Refetches the current row from the backend and merges it with the
frontend dataset
Notes: The pcViewTables parameter is evaluated as the Tables parameter of
the FetchDataRequest class

Parameters:
pcViewTables CHARACTER
The comma delimited list of tables to refetch in addition to the EntityTable
Top

RefreshData ()

Purpose: Refreshes the current data
Notes:

Top

RegisterWithDatasetController ()

Purpose: Registers this instance of the SmartDatasetChildAdapter with the
DatasetController
Notes:

Top

LOGICAL RetrieveData ()

Purpose: RetrieveData reads Data from a Datasource and links the DataHandle
with a BindingSource inside the Instance of SmartBusinessEntityAdapter.
Notes: If there is no valid instance of a BindingSource a new one is created.
After that a Dataset is cleared and then filled with the requested
data from the Database. Now a Query is build or reopened and the
Handle to this Query is assigned to the BindingSource:Handle.
Do NOT call SUPER:RetrieveData() in the overriding method.
Remember to test if a BindingSource exists. If not call
CreateBindingSource from the base class.

Returns LOGICAL
Logical value indicating the success of the method
Top

SetDesignerProperties ()

Purpose: Sets Visual Designer related properties
Notes:

Top

SetQuerySort (character)

Purpose: Overridable Setter for QuerySort property
Notes:

Parameters:
arg CHARACTER
The new value for the QuerySort property
Top

SetSavingData (logical)

Purpose: Assigns the internal flag that data is being saved
Notes: Enforced by ISupportsSubmitChanges

Parameters:
plSaving LOGICAL
The new value for the flag that data is being saved
Top

SetSmartDataSource (ISmartDataSource)

Purpose: SetSmartDataSource sets the SmartDataSource of the current instance
of the SmartDataAdapter.
Notes: This Method is called from the Property Setter of SmartDataSource in
the Base Class.
Gets the ForeignFields from the hDataset which if not read before is
fetched from the Backend. Afterwards the backward handshake with the
SmartDataSource is completed and the Handler for the PositionChanged
Event is subscribed to be able to recognize that the Parent Data has
changed.
You do not need to call SetSmartDataSource () in the overriding method.

Parameters:
arg Consultingwerk.SmartComponents.Interfaces.ISmartDataSource
The SmartDataSource for this instance
Top

ShowTablePickerDialog ()

Purpose: Invokes the Table Picker Dialog and sets properties of the
SmartBusinessEntityAdapter during Design Time
Notes: Only intended for DesignTime

Top

UpdateRow (logical)

Purpose: UpdateRow submits the changes to a buffer into the Database.
Called by SmartViewerControl, SmartUpdatableBrowser
Data is updated into the Dataset from the BindingSource. After this
the Datasets changes are submitted to the OERA Backend, merged into
the Dataset and the BindingSource gets refreshed.
Notes: Used for ISmartGroupCreateTarget's to make sure that pending changes
in the SmartGroupCreateSource are save first.

Parameters:
plAssignFromBindingSource LOGICAL
Logical flag indicating of the value from the attached BindingSource should be assigned to the current record


Constructor Detail
Top

SmartDatasetChildAdapter ()

Purpose: Constructor for the SmartDatasetChildAdapter class
Notes:

Top

SmartDatasetChildAdapter (IContainer)

Purpose: Constructor for the SmartDatasetChildAdapter class
Notes:

Parameters:
poContainer System.ComponentModel.IContainer
The System.ComponentModel.IContainer used as the Container for this component


Event Detail
Top

SmartGroupCreateSourceChanged DELEGATE System.EventHandler

Purpose: Event raised whenever the SmartGroupCreateSource property is changed
Notes:

Delegate: System.EventHandler


Property Detail
Top

LOGICAL AutoPopulateForeignFields


Returns LOGICAL
Top

CHARACTER BindTo


Returns CHARACTER
Top

LOGICAL CreateDistinctBuffer


Returns LOGICAL
Top

HANDLE DataSet


Returns HANDLE
Top

Consultingwerk.SmartComponents.Interfaces.IDatasetController DatasetController


Returns Consultingwerk.SmartComponents.Interfaces.IDatasetController
Top

CHARACTER EntityJoin


Returns CHARACTER
Top

CHARACTER EntityName


Returns CHARACTER
Top

CHARACTER EntityTable


Returns CHARACTER
Top

CHARACTER EntityView


Returns CHARACTER
Top

Consultingwerk.SmartComponents.Interfaces.Design.IDesignGroupCreateSource LinkGroupCreateSource


Returns Consultingwerk.SmartComponents.Interfaces.Design.IDesignGroupCreateSource
Top

CHARACTER QueryString


Returns CHARACTER
Top

LOGICAL RetrieveDataOnChangeSortOrder


Returns LOGICAL
Top

Consultingwerk.SmartComponents.Interfaces.ISmartGroupCreateSource SmartGroupCreateSource


Returns Consultingwerk.SmartComponents.Interfaces.ISmartGroupCreateSource


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