Datasheet

The following table explains these methods in detail:
Method Return Type Description
Save() None Saves a fully populated
DiaryEvent object. If it’s
a new entry,
Save() calls
InsertNew DiaryEvent
sub and the details are
inserted into the data-
base. The new
EventId
is returned from the
database and entered
in to
mEventId.
If the entry already
exists in the database,
Save() calls
UpdateDiaryEvent,
which updates the
database values with
those in the
DiaryEvent
object.
GetDaysInMonthWithEvents(ByVal Boolean Array Shared method that
DiaryId As Integer, ByVal returns a Boolean array
Month As Integer, ByVal Year detailing which days
As Integer) have events associated
with them. The array
index matches with the
day of the month (1 is the
first of the month, 2 the
second, and so on).
GetDiaryEventsByDate(ByVal DiaryId SqlDataReader Shared method
As Integer, ByVal FromDate As Date, that returns a
ByVal ToDate As Date) SqlDataReader object
populated with rows
from the database detail-
ing diary events between
the
FromDate and
ToDate arguments.
GetDiaryEventsByDateAsCollection(ByVal DiaryEventCollection Creates a new Diary
DiaryId As Integer, ByVal FromDate As EventCollection
Date, ByVal ToDate As Date)
object and populates it
with
DiaryEvent objects
whose
EntryDate is
between the
FromDate
and ToDate arguments.
Table continued on following page
15
The Online Diary and Organizer
04_749516 ch01.qxp 2/10/06 9:11 PM Page 15