I have been playing around with the calendarControl for a few days now.
This is what I have learnt.
you can connect in 2 ways:
single user: single CalendarResource
you just connect the CalendarControl.SetDataProvider directly to your data provider.
Multiple User:
Create CalendarResource per Resource (ViewingGroup)
each Resource needs it's own dataprovider
each Resource has ShechduleIDs collection which shows to whom Events can be scheduled to and is connected to multiple CalendarSchedule objects.
each DataProvider has a collection called Schedules [kinda like different calendars]
The Schedules collection shows what the DataProvider is to filter and read from it's datawarehouse to find events
The Schedules collection is connected to multiple CalendarSchedules.
The difference between Schedules and ScheduleIDs is purely functional, they have pretty much the same objectives: to hold a collection of CalendarSchedule objects, and there only difference is in their respective utlity members for locating, adding and removing individual CalendarSchedule items to them.
-----------
To move from multiple back to singular without breaking your model you do the following:
Dim c As CalendarResource CalendarControl.MultipleResources.RemoveAll ' Remove all the multiple resources 'add resources to resource collection
arResources.Add pRes0 ' the resource you want as singular CalendarControl.SetMultipleResources arResources
'clear the names and ScheduleIDs from the Calendarcontrol
For Each c In CalendarControl.MultipleResources c.Name = "" c.ScheduleIDs.RemoveAll Next
|
*** This will automaticaly be done for you if you use the SetDataProvider function.
this is incase you do not wish to use it.
-------------
Mickey Perlstein
Development Manager
|