Print Page | Close Window

Multiple vs Singular

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=14390
Printed Date: 28 April 2024 at 11:24pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Multiple vs Singular
Posted By: pitronot
Subject: Multiple vs Singular
Date Posted: 26 May 2009 at 4:24pm

 

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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net