Navigation bar
  Home Print document Start Previous page
 51 of 234 
Next page End  

Gravitybox Schedule Primer
Page 49 
1998-2004 Gravitybox Software LLC
Chapter 4
File Maintenance
The schedule has the capability to save its data to a file and
retrieve it later. Although most applications will probably use
a database to save and load information, there may be
times when a database is too much overhead. The added
file functionality will make it very easy to build ”lightweight”
applications. An application may be constructed to allow a user to open and save files,
with the common dialog control or you may wish to handle all of the specifics in the
background.
ImportXML
The ImportXML method will load a saved schedule. It takes a CXMLParameters object
as a parameter. This object will allow the properties that control the load, to be set. This
method will load the ScheduleItems collection previously committed to file. It will also
selectively load other collections: Categories, Providers, Rooms, and NoDropAreas.
These collections may be toggled to load using the following properties of the parameter
object.
Table 4.1
ImportXML / ExportXML Parameters
EmployGMT
When True, this property will save the appointment’s
StartTime property in Greenwich Mean Time (GMT). This
may be used when trading schedules across time zones.
When saved in this format, the schedule file may be loaded
on another machine and the schedule will reflect the
current time zone.
FileName
This is the filename of the saved schedule.
Overwrite
This flag determines if the file is overwritten if it exists.
(ExportXML only)
UseCategories
This Boolean flag determines whether the Categories
collection is loaded and saved.
UseRooms
This Boolean flag determines whether the Rooms
collection is loaded or saved.
UseProviders
This Boolean flag determines whether the Providers
collection is loaded and saved.
UseNoDropAreas
This Boolean flag determines whether the NoDropAreas
collection is loaded and saved.
UseAllCollections
This method takes a Boolean parameter and sets all the
”Use…” properties to the specified value.
Quick Tip
If you need to save a schedule but do
not wish to distribute DAO or ADO
database layers, you may use the
“ImportXML” and “ExportXML”
methods to save/load information.
http://www.purepage.com