<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Multiple Schedules &amp; Resources</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : Multiple Schedules &amp; Resources]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 28 May 2026 09:38:26 +0000</pubDate>
  <lastBuildDate>Tue, 16 Feb 2010 14:30:43 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=16100</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Multiple Schedules &amp; Resources : OK.. got it working.  Now I am...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16100&amp;PID=56833&amp;title=multiple-schedules-resources#56833</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5804">djldc</a><br /><strong>Subject:</strong> 16100<br /><strong>Posted:</strong> 16 February 2010 at 2:30pm<br /><br />OK.. got it working.  Now I am trying to get the schedule ID of the resource/column I click on.  That is, when I click to create an event I would like to get the id of the schedule I clicked on.  Is that possible?  Thank you.<br /><br />Don]]>
   </description>
   <pubDate>Tue, 16 Feb 2010 14:30:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16100&amp;PID=56833&amp;title=multiple-schedules-resources#56833</guid>
  </item> 
  <item>
   <title><![CDATA[Multiple Schedules &amp; Resources : Great example!  Thank you.  Now...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16100&amp;PID=56450&amp;title=multiple-schedules-resources#56450</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5804">djldc</a><br /><strong>Subject:</strong> 16100<br /><strong>Posted:</strong> 29 January 2010 at 6:37am<br /><br />Great example!  Thank you.  Now I just need to figure out how to translate some of this into AlphaSoftware language.]]>
   </description>
   <pubDate>Fri, 29 Jan 2010 06:37:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16100&amp;PID=56450&amp;title=multiple-schedules-resources#56450</guid>
  </item> 
  <item>
   <title><![CDATA[Multiple Schedules &amp; Resources :    FYI, in PowerBuilder, the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16100&amp;PID=56434&amp;title=multiple-schedules-resources#56434</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 16100<br /><strong>Posted:</strong> 28 January 2010 at 4:13pm<br /><br />FYI, in PowerBuilder, the "default" property for an object is not referenced the same as in VB6, for example:<br><br>PowerBuilder:<br><br> <font face="Times New Roman, Times, serif" size="3">// 'Add Dr. Oleg's resource to the data provider<br>	&nbsp;&nbsp;&nbsp;&nbsp;pRCDesc = OleCalendarResourceManager.Resource(2)<br>	&nbsp;&nbsp;&nbsp;&nbsp;pRCDesc.Resource.SetDataProvider(pData, False)<br>	&nbsp;&nbsp;&nbsp;&nbsp;pRCDesc.Resource.ScheduleIDs.Add(<font color="#ff0000"><b>pSchedules.Item(2).Id</b></font>)<br>	&nbsp;&nbsp;&nbsp;&nbsp;pRCDesc.GenerateName = True<br><br>VB6<br></font><pre><font face="Times New Roman, Times, serif" size="3">'Add Dr. Oleg's resource to the data provider<br>        Set pRCDesc = CollegeDataResourcesManager.Resource(2)<br>        pRCDesc.Resource.SetDataProvider pData, False<br>        pRCDesc.Resource.ScheduleIDs.Add <b><font color="#ff0000">pSchedules(2).Id</font><br></b>        pRCDesc.GenerateName = True</font></pre><br><br>]]>
   </description>
   <pubDate>Thu, 28 Jan 2010 16:13:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16100&amp;PID=56434&amp;title=multiple-schedules-resources#56434</guid>
  </item> 
  <item>
   <title><![CDATA[Multiple Schedules &amp; Resources :  Here is something I threw together...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16100&amp;PID=56433&amp;title=multiple-schedules-resources#56433</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 16100<br /><strong>Posted:</strong> 28 January 2010 at 4:10pm<br /><br />Here is something I threw together for another user trying to convert to a different language:<br><br>OK, I'll try to put this to an analogy to better understand.<br><br>A College has a calendar.&nbsp;Now this school has askedCodejock to help them keep track of their Professors schedules,ClassRooms, and what Course will occur in each room for any given day.<br><br>There are different ways to approach this, but I'll try to show you 2 different ways.<br><br>Firstwe have our College Calendar.&nbsp;In this calendar we can display multipleresources\schedules.&nbsp;This calendar will display at least 2 columns ofdata per day.&nbsp;The data first column(s) will be professor schedules, thesecond\last column will be ClassRoom Activities.<br><br>For this setuplets say we have 10 professors and 5 classrooms (small college).&nbsp;Herewe will give each professor his own calendar.&nbsp;With this setup we wantto actually see each Professor's schedule in a column for any givenday.&nbsp;To do this he must have his own RESOURCE.&nbsp;Inside this RESOURCE youcan add his SCHEDULE.<br><br>Now the last column for a day will be usedto display the current schedule for the rooms in the College.&nbsp;Here I'llshow how to add multiple schedules to a single resource.&nbsp;We ONLY wantto see ONE column for ALL rooms for any given day.&nbsp;With this setup wecan use the Pre_Polulate event to filter un-wanted rooms.&nbsp;To do this weadd a single RESOURCE.&nbsp;Inside this RESOURCE you can add a SCHEDULE forEACH room.<br><br>Let's put this to use.<br><br>Below is a fully functional example for VB6.&nbsp;Note I could have used aloop to add the Professor's resources, but I did them separate to makesure you can see what is happening.<br><br>Professor's<br>Dr. Tom<br>Dr. Bob<br>Dr. Oleg<br>Dr. Mark<br>Dr. Mike<br>Dr. Tony<br>Dr. Green<br>Dr. Brown<br>Dr. Black<br>Dr. Smith<br><br>Rooms:<br>MSB 101<br>MSB 102<br>MSB 103<br>MSB 104<br>MSB 105<br><br><pre>'Add this to global variables section<br>Public CollegeDataResourcesManager As New CalendarResourcesManager<br><br>Private Sub mnuMultiSchedulesExtended_Click()<br>    <br>    '// Prepare resource manager<br>    Dim strCfgFile As String<br>    strCfgFile = App.Path &amp; "\" &amp; "CodejockCollegeSample.xml"<br>    <br>    ' try to load previously saved configuration<br>    CollegeDataResourcesManager.LoadCfg strCfgFile<br>        <br>    '// Setup sample configuration<br>    '// ** data provider<br>    'Open\create new file for the calendar.  It will create the file if it does not exist<br>    Dim strConnectionString As String<br>    strConnectionString = "Provider=XML;Data Source=" &amp; App.Path &amp; "\" &amp; "CodejockCollegeCalendar.xtp_cal"<br>    <br>    Dim bResult As Boolean<br>    bResult = CollegeDataResourcesManager.AddDataProvider( _<br>            strConnectionString, xtpCalendarDPF_CreateIfNotExists + _<br>            xtpCalendarDPF_SaveOnDestroy + xtpCalendarDPF_CloseOnDestroy)<br>    <br>    'Make sure the provider could be created and opened<br>    If Not bResult Then<br>        Exit Sub<br>    End If<br>        <br>    'Get access to the data provider<br>    Dim pData As CalendarDataProvider<br>    Set pData = CollegeDataResourcesManager.DataProvider(0)<br>    <br>    'Get access to the schedules for the data provider<br>    Dim pSchedules As CalendarSchedules<br>    Set pSchedules = pData.Schedules<br>    <br>    'Check that you can access the schedules<br>    If pSchedules Is Nothing Then<br>        Exit Sub<br>    End If<br>    <br>    'Create a collection of schedules, all schedules will be creates here<br>    If pSchedules.Count &lt; 1 Then<br>        pSchedules.AddNewSchedule "Dr. Tom"<br>        pSchedules.AddNewSchedule "Dr. Bob"<br>        pSchedules.AddNewSchedule "Dr. Oleg"<br>        pSchedules.AddNewSchedule "Dr. Mark"<br>        pSchedules.AddNewSchedule "Dr. Mike"<br>        pSchedules.AddNewSchedule "Dr. Tony"<br>        pSchedules.AddNewSchedule "Dr. Green"<br>        pSchedules.AddNewSchedule "Dr. Brown"<br>        pSchedules.AddNewSchedule "Dr. Black"<br>        pSchedules.AddNewSchedule "Dr. Smith"<br>        <br>        pSchedules.AddNewSchedule "MSB 101"<br>        pSchedules.AddNewSchedule "MSB 102"<br>        pSchedules.AddNewSchedule "MSB 103"<br>        pSchedules.AddNewSchedule "MSB 104"<br>        pSchedules.AddNewSchedule "MSB 105"<br>        <br>        'Save the new schedules to the provider<br>        pData.Save<br>    End If<br>    <br>    'Add the resources for the Professor's and Classroom<br>    'Only those with their own resource will get their own column<br>    If CollegeDataResourcesManager.ResourcesCount = 0 Then<br>    <br>        'Add a resource for EACH professor.  This will allow them to have<br>        'their own column to display their schedule(s)<br>        CollegeDataResourcesManager.AddResource "Dr. Tom", True<br>        CollegeDataResourcesManager.AddResource "Dr. Bob", True<br>        CollegeDataResourcesManager.AddResource "Dr. Oleg", True<br>        CollegeDataResourcesManager.AddResource "Dr. Mark", True<br>        CollegeDataResourcesManager.AddResource "Dr. Mike", True<br>        CollegeDataResourcesManager.AddResource "Dr. Tony", True<br>        CollegeDataResourcesManager.AddResource "Dr. Green", True<br>        CollegeDataResourcesManager.AddResource "Dr. Brown", True<br>        CollegeDataResourcesManager.AddResource "Dr. Black", True<br>        CollegeDataResourcesManager.AddResource "Dr. Smith", True<br>        <br>        'Add a resource for ALL classrooms.  This will be used to display the<br>        'schedule for all 5 classrooms in a single column.<br>        CollegeDataResourcesManager.AddResource "Class Rooms", True<br><br>        'Create a description object so we can add details for each resource<br>        Dim pRCDesc As CalendarResourceDescription<br><br>        'Add Dr. Tom's resource to the data provider<br>        Set pRCDesc = CollegeDataResourcesManager.Resource(0)<br>        pRCDesc.Resource.SetDataProvider pData, False<br>        pRCDesc.Resource.ScheduleIDs.Add pSchedules(0).Id<br>        pRCDesc.GenerateName = True<br><br>        'Add Dr. Bob's resource to the data provider<br>        Set pRCDesc = CollegeDataResourcesManager.Resource(1)<br>        pRCDesc.Resource.SetDataProvider pData, False<br>        pRCDesc.Resource.ScheduleIDs.Add pSchedules(1).Id<br>        pRCDesc.GenerateName = True<br>        <br>        'Add Dr. Oleg's resource to the data provider<br>        Set pRCDesc = CollegeDataResourcesManager.Resource(2)<br>        pRCDesc.Resource.SetDataProvider pData, False<br>        pRCDesc.Resource.ScheduleIDs.Add pSchedules(2).Id<br>        pRCDesc.GenerateName = True<br>        <br>        'Add Dr. Mark's resource to the data provider<br>        Set pRCDesc = CollegeDataResourcesManager.Resource(3)<br>        pRCDesc.Resource.SetDataProvider pData, False<br>        pRCDesc.Resource.ScheduleIDs.Add pSchedules(3).Id<br>        pRCDesc.GenerateName = True<br>        <br>        'Add Dr. Mike's resource to the data provider<br>        Set pRCDesc = CollegeDataResourcesManager.Resource(4)<br>        pRCDesc.Resource.SetDataProvider pData, False<br>        pRCDesc.Resource.ScheduleIDs.Add pSchedules(4).Id<br>        pRCDesc.GenerateName = True<br>        <br>        'Add Dr. Tony's resource to the data provider<br>        Set pRCDesc = CollegeDataResourcesManager.Resource(5)<br>        pRCDesc.Resource.SetDataProvider pData, False<br>        pRCDesc.Resource.ScheduleIDs.Add pSchedules(5).Id<br>        pRCDesc.GenerateName = True<br>        <br>        'Add Dr. Green's resource to the data provider<br>        Set pRCDesc = CollegeDataResourcesManager.Resource(6)<br>        pRCDesc.Resource.SetDataProvider pData, False<br>        pRCDesc.Resource.ScheduleIDs.Add pSchedules(6).Id<br>        pRCDesc.GenerateName = True<br>        <br>        'Add Dr. Brown's resource to the data provider<br>        Set pRCDesc = CollegeDataResourcesManager.Resource(7)<br>        pRCDesc.Resource.SetDataProvider pData, False<br>        pRCDesc.Resource.ScheduleIDs.Add pSchedules(7).Id<br>        pRCDesc.GenerateName = True<br>        <br>        'Add Dr. Black's resource to the data provider<br>        Set pRCDesc = CollegeDataResourcesManager.Resource(8)<br>        pRCDesc.Resource.SetDataProvider pData, False<br>        pRCDesc.Resource.ScheduleIDs.Add pSchedules(8).Id<br>        pRCDesc.GenerateName = True<br><br>        'Add Dr. Smith's resource to the data provider<br>        Set pRCDesc = CollegeDataResourcesManager.Resource(9)<br>        pRCDesc.Resource.SetDataProvider pData, False<br>        pRCDesc.Resource.ScheduleIDs.Add pSchedules(9).Id<br>        pRCDesc.GenerateName = True<br>        <br>        Set pRCDesc = CollegeDataResourcesManager.Resource(10)<br>        pRCDesc.Resource.SetDataProvider pData, False<br>        pRCDesc.Resource.ScheduleIDs.Add pSchedules(10).Id<br>        pRCDesc.Resource.ScheduleIDs.Add pSchedules(11).Id<br>        pRCDesc.Resource.ScheduleIDs.Add pSchedules(12).Id<br>        pRCDesc.Resource.ScheduleIDs.Add pSchedules(13).Id<br>        pRCDesc.Resource.ScheduleIDs.Add pSchedules(14).Id<br>        pRCDesc.GenerateName = False<br><br>        '// Save changed resources configuration<br>        CollegeDataResourcesManager.SaveCfg strCfgFile<br>    End If<br>    <br>    '// Apply resources configuration<br>    CollegeDataResourcesManager.ApplyToCalendar CalendarControl<br>    <br>    CalendarControl.Populate<br>    CalendarControl.RedrawControl<br>End Sub</pre><img src="uploads/20100128_161046_schedules.png" height="846" width="1233" border="0"><br>]]>
   </description>
   <pubDate>Thu, 28 Jan 2010 16:10:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16100&amp;PID=56433&amp;title=multiple-schedules-resources#56433</guid>
  </item> 
  <item>
   <title><![CDATA[Multiple Schedules &amp; Resources : I am trying to translate the code...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16100&amp;PID=56431&amp;title=multiple-schedules-resources#56431</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5804">djldc</a><br /><strong>Subject:</strong> 16100<br /><strong>Posted:</strong> 28 January 2010 at 3:16pm<br /><br />I am trying to translate the code I have found on the message boards and I am having a very hard time.  Would someone be able to tell me in english (followed by a snippet of sample code) how I would set up my calendar with multiple schedules.  So far, it sounds like I need to create a dataprovider for each schedule, get the schedules, and then add the schedules to the resources.  Am I on the right track?  Thank you,<br />  fyi, I am translating over to AlphaSoftware code (xbasic).<br />Don]]>
   </description>
   <pubDate>Thu, 28 Jan 2010 15:16:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16100&amp;PID=56431&amp;title=multiple-schedules-resources#56431</guid>
  </item> 
 </channel>
</rss>