![]() Gravitybox Schedule.NET Users Guide
Page 24
1998-2004 Gravitybox Software LLC
(time_stamp = @Original_time_stamp);
SELECT
provider_guid,
name,
color,
notes,
address,
time_stamp
FROM
PROVIDER
WHERE
(provider_guid = @Original_provider_guid)
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
When the ProviderCollection object of the schedule is loaded, each Provider object still
has the same properties: Key, Name, Color, and Notes. However the new property
Address is added as a PropertyItem to the PropertyItemCollection object of the
Provider object. This allows you to specify any number of extra properties and store
them for access from the GUI.
After these changes have been made the Enterprise Server will load and save the new
schema correctly with no other changes. This makes modifying the Enterprise Server
very easy.
Although the previous example demonstrated how to change the Provider table, this
can easily be extended to modify any of the Enterprise Server table to conform to your
specific needs.
Linking to existing database tables
The above example describes how to modify a database table to include a custom field.
This can be extended to form relationships between your existing tables and the install
Enterprise Server tables. Let us assume that you have an existing Patient table that you
wish to link to the Appointment table because each appointment is for a patient. After
the Appointment table is installed, you will want to add a relation between it and the
patient table that holds your patient records.
Let us assume that the Patient table has a unique key named patient_guid. Following
the example above, you would modify the Appointment table to have a new field named
patient_guid. This would be of the same type as the Patient tables patient_guid field.
You can then add a relationship between the two tables as shown in the image below.
|