Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Multiple Resources/Schedules With SQL Server
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Multiple Resources/Schedules With SQL Server

 Post Reply Post Reply
Author
Message
hildegoat View Drop Down
Newbie
Newbie


Joined: 30 November 2006
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote hildegoat Quote  Post ReplyReply Direct Link To This Post Topic: Multiple Resources/Schedules With SQL Server
    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
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
 
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
Back to Top
hildegoat View Drop Down
Newbie
Newbie


Joined: 30 November 2006
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote hildegoat Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.