Namespace: Consultingwerk.Util
Class 
BindingSourceHelper Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:BindingSourceHelper
Syntax:Static methods only, private constructor to disallow
instance creation
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Wed Sep 15 11:51:26 CEST 2010
Notes:This file is intended for GUI for .NET only



Top Method Summary
Options Name Purpose
+ AssignBindingSourceColumn (BindingSource, character, Object, Control) Assigns a value to a BindingSource column
+ AssignFromBindingSource (handle, BindingSource) Assigns values from the ProBindingSource:InputValue dictionary to the fields in the buffer
+ AssignFromBindingSource (handle, BindingSource, character, character, character) Assigns values from the ProBindingSource:InputValue dictionary to the fields in the buffer
+ CHARACTER BindingBufferFieldName (handle, character, character) Returns the Buffer Field Name for a BindingSource field
+ CHARACTER BindingBufferFieldName (BindingSource, character) Returns the Buffer Field Name for a BindingSource field
+ CHARACTER BindingColumnName (BindingSource, character) Returns the name of the BindingSource column for a Buffer Field
+ CHARACTER BindingDataType (Control) Returns the ABL data-type the Control is bound to
+ CHARACTER BindingFieldName (Control) Returns the field name(s) the Control is bound to
+ CHARACTER BindingSourceLargeColumns (BindingSource) Returns a comma-delimited list of BLOBs and CLOBs in Returns a comma-delimited list of BLOBs and CLOBs in the Progress.Data.TableDesc schema of the ProBindingSource
+ CHARACTER BindingSourceLargeColumns (TableDesc) Returns a comma-delimited list of BLOBs and CLOBs in the Progress.Data.TableDesc schema
+ CHARACTER ColumnDataType (BindingSource, character) Returns the data-type of a column in the BindingSource's root table
+ CHARACTER ColumnDataType (TableDesc, character) Returns the data-type of a column in the Progress.Data.TableDesc schema
+ CHARACTER ConvertDataType (DataType) Converts a Progress.Data.DataType Enum member to the corresponding ABL DataType in a Character representation
+ Progress.Data.ColumnPropDesc FindColumnPropDesc (TableDesc, character) Returns the Progress.Data.ColumnPropDesc of a TableDesc for the column with the given name
+ Progress.Data.TableDesc FindTableDesc (BindingSource, character) Returns the TableDesc of the BindingSource with the given name
# Progress.Data.TableDesc FindTableDesc (TableDesc, character) Returns the TableDesc of the child of the given TableDesc referecne with the given name
+ Progress.Data.TableDesc GetTableSchema (handle) Returns a TableSchema for a Buffer
+ LOGICAL HasColumn (BindingSource, character) Returns logical value indicating if the ProBindingSource has a column with the given name
+ LOGICAL IsBindingChangingValue () Returns based on the .NET Stacktrace if currently values on the screen are modified due to Data Binding
+ LOGICAL UseFullFieldNames (BindingSource) Returns if the ProBindingSource is using the UseFullFieldNames setting

Top Constructor Summary
Options Name Purpose
# BindingSourceHelper () Protected default constructor.


Method Detail
Top

PUBLIC AssignBindingSourceColumn (BindingSource, character, Object, Control)

Purpose: Assigns a value to a BindingSource column
Notes: As it is not directly possible to modify the BindingSource values,
it is required to use a data bound Control. For this purpose the
reference to a (loaded) Control needs to provided. The Tag property
of this Control will be used to Write the value to the BindingSource

Parameters:
poBindingSource Progress.Data.BindingSource
The reference to the BindingSource
pcColumnName CHARACTER
The name of the BindingSource Column to assign to
poValue System.Object
The value to assign to the column
poControl System.Windows.Forms.Control
The reference to the Control to use the Tag property for Binding to
Top

PUBLIC AssignFromBindingSource (handle, BindingSource)

Purpose: Assigns values from the ProBindingSource:InputValue dictionary to
the fields in the buffer
Notes: Code might need adjustment in 10.2B05 when the UseFullFieldNames
propertiy is implemented

Parameters:
phBuffer HANDLE
The Buffer handle to assign to
poBindingSource Progress.Data.BindingSource
The ProBindingSource to assign from
Top

PUBLIC AssignFromBindingSource (handle, BindingSource, character, character, character)

Purpose: Assigns values from the ProBindingSource:InputValue dictionary to
the fields in the buffer
Notes: Code might need adjustment in 10.2B05 when the UseFullFieldNames
propertiy is implemented

Parameters:
phBuffer HANDLE
The Buffer handle to assign to
poBindingSource Progress.Data.BindingSource
The ProBindingSource to assign from
pcNonUpdatableColumns CHARACTER
The list of unupdatable columns form the Buffer
pcIncludeFields CHARACTER
The BindingSource's include field list
pcExcludeFields CHARACTER
The BindingSource'S exclude field list
Top

PUBLIC CHARACTER BindingBufferFieldName (handle, character, character)

Purpose: Returns the Buffer Field Name for a BindingSource field
Notes: Optional support for UseFullFieldNames (10.2B05+)
This implementation of the method is based on a ProDataset handle together
with the list of tables in question (e.g. the EntityTable,EntityView of
a SmartBusinessEntityAdapter)

Parameters:
phDataset HANDLE
The handle of the Dataset that is used as the Handle of the ProBindingSource
pcColumnName CHARACTER
The BindingSource column name
pcBindingTables CHARACTER
The comma delimited list of tables in the Binding Query (e.g. the EntityTable,EntityView of a SmartBusinessEntityAdapter)
Returns CHARACTER
The name of the bound buffer field
Top

PUBLIC CHARACTER BindingBufferFieldName (BindingSource, character)

Purpose: Returns the Buffer Field Name for a BindingSource field
Notes: Optional support for UseFullFieldNames (10.2B05+)

Parameters:
poBindingSource Progress.Data.BindingSource
The BindingSource that contains the column
pcColumnName CHARACTER
The BindingSource column name
Returns CHARACTER
The name of the bound buffer field
Top

PUBLIC CHARACTER BindingColumnName (BindingSource, character)

Purpose: Returns the name of the BindingSource column for a Buffer Field
Notes: Optional support for UseFullFieldNames (10.2B05+)
Does not support BindingSources that are bound to a ProDataset directly
Supports BindingSources bound to a QUERY and a BUFFER

Parameters:
poBindingSource Progress.Data.BindingSource
The BindingSource that contains the field
pcFieldName CHARACTER
The fully qualified buffer field
Returns CHARACTER
The name of the binding source column or ? when the column cannot be found
Top

PUBLIC CHARACTER BindingDataType (Control)

Purpose: Returns the ABL data-type the Control is bound to
Notes: Returns the data type of the first binding

Parameters:
poControl System.Windows.Forms.Control
The .NET Control that is bound to a ProBindingSource
Returns CHARACTER
The ABL data-type of the binding source field name the Control is bound to
Top

PUBLIC CHARACTER BindingFieldName (Control)

Purpose: Returns the field name(s) the Control is bound to
Notes: Code might need adjustment in 10.2B05 when the UseFullFieldNames
property is implemented

Parameters:
poControl System.Windows.Forms.Control
The .NET Control that is bound to a ProBindingSource
Returns CHARACTER
The field name the Control is bound to
Top

PUBLIC CHARACTER BindingSourceLargeColumns (BindingSource)

Purpose: Returns a comma-delimited list of BLOBs and CLOBs in Returns a
comma-delimited list of BLOBs and CLOBs in the Progress.Data.TableDesc
schema of the ProBindingSource
Notes:

Parameters:
poBindingSource Progress.Data.BindingSource
The ProBindingSource to return the large columns for
Returns CHARACTER
The comma-delimited list of BLOB's and CLOB's in the Progress.Data.TableDesc
Top

PUBLIC CHARACTER BindingSourceLargeColumns (TableDesc)

Purpose: Returns a comma-delimited list of BLOBs and CLOBs in the
Progress.Data.TableDesc schema
Notes:

Parameters:
poTableDesc Progress.Data.TableDesc
The Progress.Data.TableDesc of the ProBindingSource
Returns CHARACTER
The comma-delimited list of BLOB's and CLOB's in the Progress.Data.TableDesc
Top

PUBLIC CHARACTER ColumnDataType (BindingSource, character)

Purpose: Returns the data-type of a column in the BindingSource's root
table
Notes:

Parameters:
poBindingSource Progress.Data.BindingSource
The ProBindingSource
pcColumnName CHARACTER
The name of the ProBindingSource Column
Returns CHARACTER
The ABL corresponding ABL DataType of the ProBindingSource Column
Top

PUBLIC CHARACTER ColumnDataType (TableDesc, character)

Purpose: Returns the data-type of a column in the Progress.Data.TableDesc schema
Notes:

Parameters:
poTableDesc Progress.Data.TableDesc
The Progress.Data.TableDesc of a ProBindingSource
pcColumnName CHARACTER
The name of the ProBindingSource Column
Returns CHARACTER
The ABL corresponding ABL DataType of the ProBindingSource Column
Top

PUBLIC CHARACTER ConvertDataType (DataType)

Purpose: Converts a Progress.Data.DataType Enum member to the corresponding
ABL DataType in a Character representation
Notes: Facade to Consultingwerk.Util.DataTypeHelper:ToABLDataType

Parameters:
poType Progress.Data.DataType
The Progress.Data.DataType to convert into an ABL DataType
Returns CHARACTER
The ABL DataType as a CHARACTER Value
Top

PUBLIC Progress.Data.ColumnPropDesc FindColumnPropDesc (TableDesc, character)

Purpose: Returns the Progress.Data.ColumnPropDesc of a TableDesc for the
column with the given name
Notes:

Parameters:
poTableDesc Progress.Data.TableDesc
The Progress.Data.TableDesc that contains the ColumnPropDesc
pcColumnName CHARACTER
The name of the binding source column
Returns Progress.Data.ColumnPropDesc
The ColumnPropDesc for the given column
Top

PUBLIC Progress.Data.TableDesc FindTableDesc (BindingSource, character)

Purpose: Returns the TableDesc of the BindingSource with the given name
Notes: Recursively iterates the ChildTables

Parameters:
poBindingSource Progress.Data.BindingSource
The reference to the binding source
pcName CHARACTER
The name of the TableSpec to return
Returns Progress.Data.TableDesc
The TableDesc with the specified name or ?
Top

PROTECTED Progress.Data.TableDesc FindTableDesc (TableDesc, character)

Purpose: Returns the TableDesc of the child of the given TableDesc referecne
with the given name
Notes: Recursively iterates the ChildTables

Parameters:
poTableDesc Progress.Data.TableDesc
The reference to the table desc
pcName CHARACTER
The name of the TableSpec to return
Returns Progress.Data.TableDesc
The TableDesc with the specified name or ?
Top

PUBLIC Progress.Data.TableDesc GetTableSchema (handle)

Purpose: Returns a TableSchema for a Buffer
Notes:

Parameters:
phBuffer HANDLE
The Buffer object handle for which the TableSchema is requested
Returns Progress.Data.TableDesc
The Progress.Data.TableDesc reference
Top

PUBLIC LOGICAL HasColumn (BindingSource, character)

Purpose: Returns logical value indicating if the ProBindingSource has a column
with the given name
Notes: Name will be verified case-sensitive

Parameters:
poBindingSource Progress.Data.BindingSource
The reference to the BindingSource
pcColumnName CHARACTER
The name of the BindingSource column to verify
Returns LOGICAL
Logical value indicating if the column name exists in the BindingSource schema
Top

PUBLIC LOGICAL IsBindingChangingValue ()

Purpose: Returns based on the .NET Stacktrace if currently values on the
screen are modified due to Data Binding
Notes:

Returns LOGICAL
Logical value indicating if currently values on the screen are modified due to Data Binding
Top

PUBLIC LOGICAL UseFullFieldNames (BindingSource)

Purpose: Returns if the ProBindingSource is using the UseFullFieldNames setting
Notes: For OpenEdge 10.2B04 and beyond this method does always return FALSE
For OpenEdge 10.2B05 and up this method uses reflection to query the property value

Parameters:
poBindingSource Progress.Data.BindingSource
The BindingSource to test UseFullFieldNames attribute on
Returns LOGICAL
Logical value indicating if the ProBindingSource is using the UseFullFieldNames setting


Constructor Detail
Top

PROTECTED BindingSourceHelper ()

Purpose: Protected default constructor.
Notes: There's no need to create instances of the helper classes



©2006-2019 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.08.2019 23:56:55