Table of Contents

TTMSFNCPlannerDatabaseAdapter Class

Connects a TDataSource to the planner, loading appointments from a dataset and persisting inserts, updates, and deletes back to it.

API unit family: TMSFNCPlannerDatabaseAdapter Inherits from: TTMSFNCPlannerAdapter

Syntax

TTMSFNCPlannerDatabaseAdapter = class(TTMSFNCPlannerAdapter)

Properties

Name Description
Item Field-name mapping that defines which dataset fields correspond to each planner item property.
Version Version number of this database adapter component.

Methods

Name Description
AfterUpdateItem Called after an item update completes; performs any post-update housekeeping on the datasource.
DeleteItem Deletes the dataset record corresponding to AItem.
GetItems Queries the datasource for appointments in the given period and adds them to the planner.
InsertItem Inserts a new dataset record for AItem.
LoadItems Reloads all items from the datasource for the planner's current visible period.
ReadItem Reads the dataset record for AItem and updates the item's properties from the mapped fields.
SelectItem Scrolls the datasource to the record for AItem.
UpdateItem Updates the dataset record for AItem with its current property values.

Events

Name Description
OnFieldsToItem Fires when reading a record from the dataset; use this to populate AItem from custom fields not covered by the standard mapping.
OnFieldsToResource Fires when reading the resource position from the dataset; use this to convert a non-integer resource field to a zero-based position index.
OnItemCreateDBKey Fires when the adapter needs to create a unique DBKey for a new item; override when AutoIncrementDBKey does not fit your key strategy.
OnItemInserted Fires after a new item has been inserted into the dataset; use this for post-insert processing.
OnItemLocate Fires when the adapter needs to locate a specific item record in the dataset; override default key-based lookup when using a calculated key field.
OnItemRead Fires after a dataset record has been read into a planner item.
OnItemToFields Fires when writing a planner item back to the dataset; use this to populate additional custom fields from AItem.
OnItemUpdated Fires after an existing item has been updated in the dataset.
OnItemsLoaded Fires after all items for the current period have been loaded from the dataset.
OnResourceToFields Fires when writing the resource position of an item back to the dataset; use this when the resource field requires a non-integer value.

Used by