Print Page | Close Window

Multiple Resources/Schedules With SQL Server

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=5799
Printed Date: 23 November 2024 at 12:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Multiple Resources/Schedules With SQL Server
Posted By: hildegoat
Subject: Multiple Resources/Schedules With SQL Server
Date Posted: 14 December 2006 at 2:50pm
Hi,
 
I've got my calendar working in VB.NET 2005 with a SQL Server 2000 back-end. The next step is to move the multiple resources/schedules to SQL Server, so that I can keep it all (events and schedules) in one database.
 
After looking through the sample code, I still can't define what a Resource and a Schedule is. If I just want to show multiple calendars at once, would I make one resource and multiple schedules?
 
Is there also an easy way to convert those XML files into corresponding SQL Server tables? Do I just need to make a Schedules table (ScheduleID, Name) or do I need to make a Resources table as well?
 
Finally, what's the easiest way to connect to the newly made SQL Server tables? The same way I connected the calendars?
 
-Matt



Replies:
Posted By: sserge
Date Posted: 17 December 2006 at 2:52pm
Data provider has Schedules collection. It contains pairs {ScheduleID, ScheduleName}.
This collection defines Name for each schedule ID.
You have to create such table (or may be use some existing table like Employees or Rooms)
 
CalendarResource defines data group to be displayed in a separate column on a day view.
It has a reference to a data provider and a collection of schedules.
In a simple configuration all resources have reference to the same dada provider and one shedule ID in collection.
 
When you opening custom data provider, firstly add your persons to data provider shedules collection.
 
Then confgure resources to display schedules. For the simple case this just a set of visible schedule IDs. May be stored as additional field like 'IsVisible' in Schedules DB table.
 
Calendar resource filters events by its ScheduleID property.
 
Try to look at the logic in our sample (mnuMultiSchedulesSimple_Click).
 
See also:
 
http://forum.codejock.com/forum_posts.asp?TID=4921 - http://forum.codejock.com/forum_posts.asp?TID=4921
 
Main Resorce configuration (which stored in XML) contains following information:
    DataProvider    - as connection string.
    Schedule IDs   - as array of IDs
    Enabled          - as boolean (means is visible)
       ..
Look at the configuration XML file for more details. It is quite easy.
 
But you have to save only properties which you need.

--
WBR,
Serge


Posted By: hildegoat
Date Posted: 18 December 2006 at 12:27pm
Thanks for the thorough explanation. After re-looking at some other threads, I think I have it mostly figured out.



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