TTMSFNCGanttChartDatabaseAdapter
The TMS FNC Gantt Chart
supports databinding through a non-visual component called TTMSFNCGanttChartDatabaseAdapter. It is a simple as connecting the adapter to the planner, filling in the database fields and set the Active property to True.
The Gantt Chart Database Adapter should be assigned as the Adapter
property of the TMS FNC Gantt Chart
.
The WBS (Work Breakdown Structure e.g. 2.1.3) is the important value to that is used to build the Gantt Chart.
There are two different ways available to store the data in the database.
You can work with the end time of a task and set the Planned End field or you can work with the Duration field.
It is possible to change this with the EndTimeType
property, by the default the planned end is used.
For a more optimized functioning, we advise to use the Duration as this doesn't use the WorkTime calculations. The Duration is by default stored as a string e.g. "1d4h", but an event is available to manipulate this to your preferences.
Properties
Property name | Description |
---|---|
EndTimeType | Indicates wether the tasks are stored with the planned end time or with the duration value. (By default set to aetPlannedEnd.) |
Item |
The Item that defines the different fields to set up the data link. |
ManualSaveToDatabase | If enabled the automatic save of the tasks after the project was changed is not done, and SaveTasks should be called programmatically. (By default this is set to 'False'.) |
Methods
Method name | Description |
---|---|
DeleteTask(ATask: TMSFNCGanttTask ) |
Delete a task in the database. |
GetTasks | Get the tasks in the database. |
InsertTask(ATask: TMSFNCGanttTask ) |
Insert a task in the database. |
LoadTasks | Clear all existing tasks and get the tasks. |
ReadTask(ATask: TMSFNCGanttTask ) |
Reads a task from the database. |
SaveTasks | Saves all the tasks to the database. |
SelectTask(ATask: TMSFNCGanttTask ) |
Select a task in the database. |
UpdateTask | Updates the task in the database. |
Events
Event name | Description |
---|---|
OnFieldsToTask | Gives the option to manually read the task properties from the database. |
OnSetFieldFromTaskDependencies | Gives the option to manipulate the dependencies data that is stored in the Dependencies field. (By default a string based text is used e.g. 1.1FS) |
OnSetFieldFromTaskDuration | Gives the option to manipulate the duration data that is stored in the Duration field. (By default a string based text is used e.g. 2d,1h or 4m12's.) |
OnSetFieldFromTaskPlannedEnd | Gives the option to manipulate the data that is stored in the Planned End field. (By default a datetime field is used.) |
OnSetFieldFromTaskPlannedStart | Gives the option to manipulate the data that is stored in the Planned Start field. (By default a datetime field is used.) |
OnSetFieldFromTaskWBS | Event that is triggered when a task is stored to the databse. (By default a string based text is used e.g. '3.1.2'.) |
OnSetTaskDependenciesFromField | Gives the option to manipulate the dependencies data that is retrieved from the Dependencies field. (By default a string based text is used e.g. 1.1FS) |
OnSetTaskDurationFromField | Gives the option to manipulate the duration data that is retrieved from the Duration field. (By default a string based text is used e.g. 2d,1h or 4m12's.) |
OnSetTaskPlannedEndFromField | Gives the option to manipulate the data that is retrieved from the Planned End field. (By default a datetime field is used.) |
OnSetTaskPlannedStartFromField | Gives the option to manipulate the data that is retrieved from the Planned Start field. (By default a datetime field is used.) |
OnSetWBSFromFields | Gives the option to manipulate the data that is retrieved from the WBS field. (By default a numeric string with '.' seperator is used.) |
OnTaskCreateDBKey | Event to choose the DBKey that will be used on a task creation, by default a GUID will be created. |
OnTaskInserted | Event that is triggered after a task was inserted in the database. |
OnTasksLoaded | Event that is triggered at the end of a GetTasks method. |
OnTaskLocate | Event to intervene with retrieving the item from the database, by default the DBKey will be used. |
OnTaskToFields | Gives the option to manually write the task properties to the database. |
OnTaskRead | Event that is triggered after a task was read from the database. |
OnTaskUpdated | Event that is triggered after a task was updated in the database. |
TTMSFNCGanttChartDatabaseAdapterItemSource
The Item that defines the different fields to set up the data link.
Properties
Property name | Description |
---|---|
DataSource | The DataSource of the database. |
WBS | The name of the field that is used for the WBS value. (Text) |
TaskName | The name of the field that is used for the TaskName value.(Text) |
PlannedStart | The name of the field that is used for the PlannedStart value. (DateTime) |
PlannedEnd | The name of the field that is used for the PlannedEnd value. (DateTime) |
Duration | The name of the field that is used for the Duration value. (Text) |
DBKey | The name of the field that is used for the DBKey value. |
Dependencies | The name of the field that is used for the Dependencies value. (Text) |
Progress | The name of the field that is used for the Progress value. (Integer) |
StateName | The name of the field that is used for the StateName value. (Text) |
Description | The name of the field that is used for the Description value. (Text) |
AutoIncrementDBKey | Indicates wether to auto increment the DB key, when adding new entries. (By default set to true.) |