Interface IDataHandler
The DataHandlers must implement this interface.
Namespace: SuperOffice.Data
Assembly: SuperOffice.DCF.dll
Syntax
public interface IDataHandler
Properties
CurrentHistoryItem
The HistoryItem of the PrimaryCurrent.
Declaration
HistoryItem CurrentHistoryItem { get; set; }
Property Value
| Type | Description |
|---|---|
| HistoryItem |
DataCarriers
The data carrier object.
Declaration
Dictionary<string, object> DataCarriers { get; }
Property Value
| Type | Description |
|---|---|
| Dictionary<String, Object> |
DataCarriersToExpose
Return a list of datacarriers to expose. The bool value indicates if the carrier is readonly from javascript.
Declaration
Dictionary<string, SoStateObjectInfo> DataCarriersToExpose { get; set; }
Property Value
| Type | Description |
|---|---|
| Dictionary<String, SoStateObjectInfo> |
ExposeToClient
True if the datahandler data should be serialized to the client
Declaration
bool ExposeToClient { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
HasLoaded
True if the Load method has been called by the DataDispatcher.
Declaration
bool HasLoaded { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Id
DataHandler id.
Declaration
string Id { get; }
Property Value
| Type | Description |
|---|---|
| String |
IsNew
True if the New method has been called by the DataDispatcher.
Declaration
bool IsNew { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
PrimaryCurrent
The name of the datahandlers primary current.
Declaration
string PrimaryCurrent { get; }
Property Value
| Type | Description |
|---|---|
| String |
Methods
CheckMandatoryData(out String)
Checks if carriers marked as mandatory can be populated.
Declaration
bool CheckMandatoryData(out string reason)
Parameters
| Type | Name | Description |
|---|---|---|
| String | reason | The reason the mandatory carrier is empty |
Returns
| Type | Description |
|---|---|
| Boolean | False if there i uninitialized mandatory datahandlers |
Clear()
Resets data
Declaration
void Clear()
Delete()
Delete data carrier
Declaration
void Delete()
Initialize(XmlNode, String)
DataHandlers is configurable.
Declaration
void Initialize(XmlNode config, string id)
Parameters
| Type | Name | Description |
|---|---|---|
| XmlNode | config | |
| String | id |
Load(String)
Fetch data
Declaration
void Load(string carrierId)
Parameters
| Type | Name | Description |
|---|---|---|
| String | carrierId | The carrier id |
New()
Create new carriers with default data
Declaration
void New()
New(String)
Create new carrier with default data
Declaration
void New(string carrierId)
Parameters
| Type | Name | Description |
|---|---|---|
| String | carrierId | The carrier id |
OnBeforeDataBind()
OnBeforeDataBind is called after UpdateDatasource and before Databind. Used for calculations and data processing.
Declaration
void OnBeforeDataBind()
OnBeforeValidate()
OnBeforeValidate is called after posted form data has been processed, but before validation functions are called on individual controls.
Declaration
void OnBeforeValidate()
Save()
Save data
Declaration
object Save()
Returns
| Type | Description |
|---|---|
| Object |