![]() Gravitybox WebSchedule.NET
1998-2005 Gravitybox Software LLC
Page 59 of 65
If Schedule1.NoDropAreaCollection.ToList.IsOverlap(#1/1/2004#, _
#10:00:00 AM#, 60) Then
'Do Something...
End If
How do I get a list of conflicts for an appointment?
The schedules AppointmentCollection can be converted to an AppointmentList and
searched for a list of conflicts. Given a specific appointment, the lists GetConflicts
method returns another AppointmentList of appointments that conflict with it. If there are
no conflicts, the returned list has no objects in it.
Dim al As AppointmentList
al = Schedule1.AppointmentCollection.ToList.GetConflicts(appointment)
How do I determine if two appointments conflict?
The AppointmentCollection object can be used to determine if a specific appointment
conflicts with any other appointment in the collection. The code snippet below
demonstrates this.
Dim appointment As Appointment
'Add some appointments...
If Schedule1.AppointmentCollection.IsConflict(appointment) Then
'Do Something...
End If
If you wish to only check conflicts between two appointments and not the whole
collection, you may use the IsConflict method of an appointment object.
Dim appointment1 As Appointment
Dim appointment2 As Appointment
'Add some appointments...
If appointment1.IsConflict(appointment2) Then
'Do Something...
End If
How do I attach additional, custom information to an object (appointment,
category, etc.)?
Most objects in the WebSchedule.NET framework have a child object:
PropertyCollection. This is a collection of name/value pairs. You may store any number
of values with a key, name, and value. These are all string values. You may reference
the collection by key, name, or index [0..N-1]. This collection is very useful if you have
custom information that you need to associate with an object.
|