C# Class Habanero.Faces.Base.GridBaseManager

This manager groups common logic for IEditableGridControl objects. Do not use this object in working code.
显示文件 Open project: Chillisoft/habanero.faces Class Usage Examples

Protected Properties

Property Type Description
_boCol IBusinessObjectCollection
_fireBusinessObjectSelectedEvent bool
_gridBase IGridBase
_gridBaseOnSelectionChangedHandler EventHandler

Public Methods

Method Description
ApplyFilter ( IFilterClause filterClause ) : void

See IGridBase.ApplyFilter

ApplySearch ( IFilterClause searchClause, string orderBy ) : void

Applies a search clause to the underlying collection and reloads the grid. The search allows you to determine which objects to display using some criteria. This is typically generated by the an IFilterControl.

ApplySearch ( string searchClause, string orderBy ) : void

Applies a search clause to the underlying collection and reloads the grid. The search allows you to determine which objects to display using some criteria. This is typically generated by the an IFilterControl.

Clear ( ) : void

See IBOColSelectorControl.Clear

DefaultGridLoader ( IGridBase gridBase, IBusinessObjectCollection boCol ) : void

Sets the default grid loader which is used as the default for the GridLoader delegate. If you want to load in any other way then please set the GridLoader delegate to load your business objects as you require.

GetBusinessObjectAtRow ( int rowIndex ) : IBusinessObject

See IBOColSelectorControl.GetBusinessObjectAtRow

GetBusinessObjectCollection ( ) : IBusinessObjectCollection

See IBOColSelectorControl.BusinessObjectCollection

GetBusinessObjectRow ( IBusinessObject businessObject ) : IDataGridViewRow

See IGridBase.GetBusinessObjectRow

GetRowObjectIDValue ( IDataGridViewRow row ) : System.Guid

Gets the Object ID for a given row. This assumes that the row has a column IDColumnName.

GridBaseManager ( IGridBase gridBase ) : System

Constructor

GridBaseManager ( IGridBase gridBase, string uiDefName ) : System

Constructor

RefreshBusinessObjectRow ( IBusinessObject businessObject ) : void

Refreshes the row values for the specified IBusinessObject.

RefreshGrid ( ) : void

See IGridBase.RefreshGrid. This actually just Cancels all edits and reloads the current BusinessObjectCollection into the grid after the grid has been cleared. This thus only really usefull if the grid has gotten out of sync with it collection in some way.

SetBusinessObjectCollection ( IBusinessObjectCollection col ) : void

See IGridBase.IBusinessObjectCollection

Protected Methods

Method Description
ClearAllSelectedRows ( IDataGridViewRowCollection gridRows ) : void
FireBusinessObjectSelected ( ) : void
GetBindingListView ( IBusinessObjectCollection boCol ) : IBindingListView

Returns a DataView based on the IBusinessObjectCollection defined by boCol. The Columns in the DataView will be the collumns defined in the Grids UiDefName

Private Methods

Method Description
ClearItems ( ) : void
ConvertToGuid ( object idValue ) : System.Guid
FireCollectionChanged ( ) : void
GetDataRowView ( int rowIndex ) : DataRowView
GetGridRow ( int rowIndex ) : IDataGridViewRow
GetRowObjectIDValue ( DataRowView dataRowView ) : System.Guid
GridBase_OnSelectionChanged ( object sender, EventArgs e ) : void
HasObjectIDColumn ( IDataGridViewRow findRow ) : bool
IsFirstRowSelected ( ) : bool
LoadBusinessObject ( System.Guid value ) : IBusinessObject
SelectFirstRow ( ) : void

Method Details

ApplyFilter() public method

See IGridBase.ApplyFilter
public ApplyFilter ( IFilterClause filterClause ) : void
filterClause IFilterClause
return void

ApplySearch() public method

Applies a search clause to the underlying collection and reloads the grid. The search allows you to determine which objects to display using some criteria. This is typically generated by the an IFilterControl.
public ApplySearch ( IFilterClause searchClause, string orderBy ) : void
searchClause IFilterClause The search clause
orderBy string
return void

ApplySearch() public method

Applies a search clause to the underlying collection and reloads the grid. The search allows you to determine which objects to display using some criteria. This is typically generated by the an IFilterControl.
public ApplySearch ( string searchClause, string orderBy ) : void
searchClause string The search clause
orderBy string
return void

Clear() public method

See IBOColSelectorControl.Clear
public Clear ( ) : void
return void

ClearAllSelectedRows() protected static method

protected static ClearAllSelectedRows ( IDataGridViewRowCollection gridRows ) : void
gridRows IDataGridViewRowCollection
return void

DefaultGridLoader() public method

Sets the default grid loader which is used as the default for the GridLoader delegate. If you want to load in any other way then please set the GridLoader delegate to load your business objects as you require.
public DefaultGridLoader ( IGridBase gridBase, IBusinessObjectCollection boCol ) : void
gridBase IGridBase
boCol IBusinessObjectCollection
return void

FireBusinessObjectSelected() protected method

protected FireBusinessObjectSelected ( ) : void
return void

GetBindingListView() protected method

Returns a DataView based on the IBusinessObjectCollection defined by boCol. The Columns in the DataView will be the collumns defined in the Grids UiDefName
protected GetBindingListView ( IBusinessObjectCollection boCol ) : IBindingListView
boCol IBusinessObjectCollection The collection that the DataView is based on
return IBindingListView

GetBusinessObjectAtRow() public method

See IBOColSelectorControl.GetBusinessObjectAtRow
public GetBusinessObjectAtRow ( int rowIndex ) : IBusinessObject
rowIndex int
return IBusinessObject

GetBusinessObjectCollection() public method

See IBOColSelectorControl.BusinessObjectCollection
public GetBusinessObjectCollection ( ) : IBusinessObjectCollection
return IBusinessObjectCollection

GetBusinessObjectRow() public method

See IGridBase.GetBusinessObjectRow
public GetBusinessObjectRow ( IBusinessObject businessObject ) : IDataGridViewRow
businessObject IBusinessObject
return IDataGridViewRow

GetRowObjectIDValue() public method

Gets the Object ID for a given row. This assumes that the row has a column IDColumnName.
public GetRowObjectIDValue ( IDataGridViewRow row ) : System.Guid
row IDataGridViewRow
return System.Guid

GridBaseManager() public method

Constructor
public GridBaseManager ( IGridBase gridBase ) : System
gridBase IGridBase
return System

GridBaseManager() public method

Constructor
public GridBaseManager ( IGridBase gridBase, string uiDefName ) : System
gridBase IGridBase
uiDefName string
return System

RefreshBusinessObjectRow() public method

Refreshes the row values for the specified IBusinessObject.
public RefreshBusinessObjectRow ( IBusinessObject businessObject ) : void
businessObject IBusinessObject The for which the row must be refreshed.
return void

RefreshGrid() public method

See IGridBase.RefreshGrid. This actually just Cancels all edits and reloads the current BusinessObjectCollection into the grid after the grid has been cleared. This thus only really usefull if the grid has gotten out of sync with it collection in some way.
public RefreshGrid ( ) : void
return void

SetBusinessObjectCollection() public method

See IGridBase.IBusinessObjectCollection
public SetBusinessObjectCollection ( IBusinessObjectCollection col ) : void
col IBusinessObjectCollection
return void

Property Details

_boCol protected_oe property

protected IBusinessObjectCollection _boCol
return IBusinessObjectCollection

_fireBusinessObjectSelectedEvent protected_oe property

Boolean so that we can switch on and off the firing of certain events e.g during loading. This is required to prevent the Grid or other controls responding to these events innappropriately.
protected bool _fireBusinessObjectSelectedEvent
return bool

_gridBase protected_oe property

protected IGridBase _gridBase
return IGridBase

_gridBaseOnSelectionChangedHandler protected_oe property

protected EventHandler _gridBaseOnSelectionChangedHandler
return EventHandler