
Best viewed with
|
|
Unit: cwMan
Represents a Calendar Works event (Appointment, Holiday etc)
Properties
Data,
EntityID,
EventTypeID,
FromDateTime,
ID,
ResourceID,
SiteID,
ToDateTime,
Methods
Create,
Delete,
Save,
LoadFromStream,
SaveToStream,
 |
|
Data
|
|
|
Data : string;
|
|
|
Description
|
Data associated with the event.
This data is formatted and displayed in the day, week and month view components.
To format this data yourself use the OnShowEvent event of the TcwManager component.
|
|
|
See also
|
TcwManager
|
 |
|
EntityID
|
|
|
EntityID : string;
|
|
|
Description
|
The identifer of the entity (eg Customer, Patient,
Client etc) associated with this event.
If there is no entity associated with this event set
EntityID to '' (empty string)
|
 |
|
EventTypeID
|
|
|
EventTypeID : string;
|
|
|
Description
|
The identifer of the event type associated with this event.
If there is event type associated with this event set
EventTypeID to '' (empty string)
|
 |
|
FromDateTime
|
|
|
FromDateTime : TDateTime;
|
|
|
Description
|
The starting date and time of the event.
|
 |
|
ID
|
|
|
ID : string;
|
|
|
Description
|
A unique identifier for the event.
|
 |
|
ResourceID
|
|
|
ResourceID : string;
|
|
|
Description
|
The identifer of the resource associated with this event.
If there is resource associated with this event set
ResourceID to '' (empty string)
|
 |
|
SiteID
|
|
|
SiteID : string;
|
|
|
Description
|
The identifer of the site associated with this event.
If there is no site associated with this event set
SiteID to '' (empty string)
|
 |
|
ToDateTime
|
|
|
ToDateTime : TDateTime;
|
|
|
Description
|
The ending date and time of the event.
|
 |
|
Create
|
|
|
constructor Create(AEvents : TcwEvents)
|
|
|
Description
|
Event constructor
|
|
|
Use the CreateEvent method of TcwEvents to create a new event
|
|
|
See also
|
TcwEvents
|
|
|
|
Create and save a new event
var
Event : TcwEvent;
begin
Event := cwManager1.Events.CreateEvent;
with Event do begin
FromDateTime := Now;
ToDateTime := FromDateTime;
Data := 'My sample event';
Save; // Save it
Free; // and free memory
end;
end;
|
 |
|
Delete
|
|
|
procedure Delete
|
|
|
Description
|
Use Delete to delete the event.
|
|
|
|
Delete event whose ID is 3
var
Event : TcwEvent;
begin
Event := cwManager1.Events.Get(3);
if Event <> nil then begin
Event.Delete; // Delete it
Event.Free; // and free memory
end;
end;
|
 |
|
Save
|
|
|
procedure Save
|
|
|
Description
|
Use Save to save the event.
|
 |
|
LoadFromStream
|
|
|
protected procedure LoadFromStream(Stream : TStream); virtual
|
|
|
Description
|
Use LoadFromStream to load the event from a stream.
|
|
|
If you are deriving your own event class from TcwEvent you must
implement LoadFromStream and SaveToStream in your class
|
 |
|
SaveToStream
|
|
|
protected procedure SaveToStream(Stream : TStream); virtual
|
|
|
Description
|
Use SaveToStream to save the event to a stream.
|
|
|
If you are deriving your own event class from TcwEvent you must
implement LoadFromStream and SaveToStream in your class
|
|
Copyright © 1998-2007 Innova Software ALL RIGHTS RESERVED
All trademarks are the property of their respective owners.
Webmaster webmaster@innovasoftware.com
|