C# Класс Habanero.BO.DataSetProvider

Provides a super-class for data-set providers for business objects
Наследование: IDataSetProvider
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
_boAddedHandler EventHandler
_collection IBusinessObjectCollection
_propUpdatedEventHandler EventHandler
_removedHandler EventHandler
_table System.Data.DataTable
_uiGridProperties ICollection
_updatedHandler EventHandler

Открытые методы

Метод Описание
Find ( System.Guid objectID ) : IBusinessObject

Returns a business object that matches the ID provided

FindRow ( IBusinessObject bo ) : int

Finds the row number in which a specified business object resides

GetDataView ( IUIGrid uiGrid ) : IBindingListView

Returns a data view for the UIGridDef provided

InitialiseLocalData ( ) : void

Initialises the local data

RegisterForEvents ( ) : void

Adds handlers to be called when updates occur

UpdateBusinessObjectRowValues ( IBusinessObject businessObject ) : void

Updates the row values for the specified IBusinessObject.

Защищенные методы

Метод Описание
BOAddedHandler ( object sender, Habanero.Base.BOEventArgs e ) : void

Handles the event of a business object being added. Adds a new data row containing the object.

DataSetProvider ( IBusinessObjectCollection collection ) : System

Constructor to initialise a provider with a specified business object collection

DeregisterForBOEvents ( ) : void

Derigisters the Data Set Provider from all events raised by the BO collection.

DeregisterForTableEvents ( ) : void

Deregisters for all events to the _table

GetValues ( IBusinessObject businessObject ) : object[]

Gets a list of the property values to display to the user

RegisterForBOEvents ( ) : void

Registers for all events from the _collection

RegisterForTableEvents ( ) : void

Registers for all events to the _table

RemovedHandler ( object sender, Habanero.Base.BOEventArgs e ) : void

Handles the event of a business object being removed. Removes the data row that contains the object.

Приватные методы

Метод Описание
AddColumn ( IUIGridColumn uiProperty, IClassDef classDef ) : void
Find ( DataRow row ) : IBusinessObject
Find ( int rowNum ) : IBusinessObject
GetDataTable ( IUIGrid uiGrid ) : DataTable
GetPropertyType ( IClassDef classDef, string propertyName ) : Type
IDUpdatedHandler ( object sender, Habanero.Base.BOEventArgs e ) : void

Updates the grid ID column when the Business's ID is changed.

LoadBusinessObject ( IBusinessObject businessObject ) : void

Adds the Business Object to the DataTable

PropertyUpdatedHandler ( object sender, Habanero.Base.BOPropUpdatedEventArgs propEventArgs ) : void
UpdatedHandler ( object sender, Habanero.Base.BOEventArgs e ) : void

Handles the event of a IBusinessObject being updated

Описание методов

BOAddedHandler() защищенный Метод

Handles the event of a business object being added. Adds a new data row containing the object.
protected BOAddedHandler ( object sender, Habanero.Base.BOEventArgs e ) : void
sender object The object that notified of the event
e Habanero.Base.BOEventArgs Attached arguments regarding the event
Результат void

DataSetProvider() защищенный Метод

Constructor to initialise a provider with a specified business object collection
protected DataSetProvider ( IBusinessObjectCollection collection ) : System
collection IBusinessObjectCollection The business object collection
Результат System

DeregisterForBOEvents() защищенный Метод

Derigisters the Data Set Provider from all events raised by the BO collection.
protected DeregisterForBOEvents ( ) : void
Результат void

DeregisterForTableEvents() защищенный Метод

Deregisters for all events to the _table
protected DeregisterForTableEvents ( ) : void
Результат void

Find() публичный Метод

Returns a business object that matches the ID provided
public Find ( System.Guid objectID ) : IBusinessObject
objectID System.Guid The ID
Результат IBusinessObject

FindRow() публичный Метод

Finds the row number in which a specified business object resides
public FindRow ( IBusinessObject bo ) : int
bo IBusinessObject The business object to search for
Результат int

GetDataView() публичный Метод

Returns a data view for the UIGridDef provided
public GetDataView ( IUIGrid uiGrid ) : IBindingListView
uiGrid IUIGrid The UIGridDef
Результат IBindingListView

GetValues() защищенный Метод

Gets a list of the property values to display to the user
protected GetValues ( IBusinessObject businessObject ) : object[]
businessObject IBusinessObject The business object whose /// properties are to be displayed
Результат object[]

InitialiseLocalData() публичный абстрактный Метод

Initialises the local data
public abstract InitialiseLocalData ( ) : void
Результат void

RegisterForBOEvents() защищенный Метод

Registers for all events from the _collection
protected RegisterForBOEvents ( ) : void
Результат void

RegisterForEvents() публичный Метод

Adds handlers to be called when updates occur
public RegisterForEvents ( ) : void
Результат void

RegisterForTableEvents() защищенный Метод

Registers for all events to the _table
protected RegisterForTableEvents ( ) : void
Результат void

RemovedHandler() защищенный Метод

Handles the event of a business object being removed. Removes the data row that contains the object.
protected RemovedHandler ( object sender, Habanero.Base.BOEventArgs e ) : void
sender object The object that notified of the event
e Habanero.Base.BOEventArgs Attached arguments regarding the event
Результат void

UpdateBusinessObjectRowValues() публичный Метод

Updates the row values for the specified IBusinessObject.
public UpdateBusinessObjectRowValues ( IBusinessObject businessObject ) : void
businessObject IBusinessObject The for which the row values need to updated.
Результат void

Описание свойств

_boAddedHandler защищенное свойство

A handler for the IBusinessObject has been added to the _collection.
protected EventHandler _boAddedHandler
Результат EventHandler

_collection защищенное свойство

The IBusinessObjectCollection of IBusinessObjects that are being mapped in this DataSetProvider (i.e. are being copied to the DataTable.
protected IBusinessObjectCollection _collection
Результат IBusinessObjectCollection

_propUpdatedEventHandler защищенное свойство

A handler for the IBusinessObject has had one of its properties updated
protected EventHandler _propUpdatedEventHandler
Результат EventHandler

_removedHandler защищенное свойство

A handler for the IBusinessObject has been removed from the _collection.
protected EventHandler _removedHandler
Результат EventHandler

_table защищенное свойство

The DataTable that is set up to represent the items in this collection.
protected DataTable,System.Data _table
Результат System.Data.DataTable

_uiGridProperties защищенное свойство

The collection of UIGridColumns that are being shown in this DataTable.
protected ICollection _uiGridProperties
Результат ICollection

_updatedHandler защищенное свойство

A handler for the IBusinessObject has been persisted.
protected EventHandler _updatedHandler
Результат EventHandler