<?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 : Problem adding events with multiple resources</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : Problem adding events with multiple resources]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 07:56:29 +0000</pubDate>
  <lastBuildDate>Tue, 22 Aug 2006 14:57:58 +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=4847</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[Problem adding events with multiple resources : Doh! (hand smacking forhead)  Now...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4847&amp;PID=15108&amp;title=problem-adding-events-with-multiple-resources#15108</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2269">zeko78</a><br /><strong>Subject:</strong> 4847<br /><strong>Posted:</strong> 22 August 2006 at 2:57pm<br /><br />Doh!&nbsp; (hand smacking forhead)<DIV>&nbsp;</DIV><DIV>Now it works!! Thank you very much Serge..</DIV><DIV>&nbsp;</DIV><DIV>Best regards,</DIV><DIV>Gøran</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 22 Aug 2006 14:57:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4847&amp;PID=15108&amp;title=problem-adding-events-with-multiple-resources#15108</guid>
  </item> 
  <item>
   <title><![CDATA[Problem adding events with multiple resources :   Hi ,   You forgot to open/create...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4847&amp;PID=15106&amp;title=problem-adding-events-with-multiple-resources#15106</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 4847<br /><strong>Posted:</strong> 22 August 2006 at 2:38pm<br /><br />Hi ,<br><br><div><div><span style="font-family: 'Courier New'; font-size: 12px; color: rgb(0, 0, 0);">You forgot to open/create data provider:</span></div><div><span style="font-family: 'Courier New'; font-size: 12px; color: rgb(0, 0, 0);"> </span></div></div><br><table width="99%"><tr><td><pre class="BBcode"><br>.....<br>res0.SetDataProvider2(strConnectionString, true);<br>&nbsp;<br>if (res0.DataProvider == null) <br>{<br>&nbsp;&nbsp;&nbsp; return;<br>}<br>if (!res0.DataProvider.Open())<br>{<br>&nbsp;&nbsp;&nbsp; if (!res0.DataProvider.Create()) <br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>&nbsp;&nbsp;&nbsp; }<br>}<br>&nbsp;<br>.....<br></pre></td></tr></table><br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Tue, 22 Aug 2006 14:38:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4847&amp;PID=15106&amp;title=problem-adding-events-with-multiple-resources#15106</guid>
  </item> 
  <item>
   <title><![CDATA[Problem adding events with multiple resources : Hi all, I&amp;#039;m new to this...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4847&amp;PID=15088&amp;title=problem-adding-events-with-multiple-resources#15088</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2269">zeko78</a><br /><strong>Subject:</strong> 4847<br /><strong>Posted:</strong> 22 August 2006 at 4:10am<br /><br /><P>Hi all,</P><DIV>I'm new to this control, and I'm trying to understand the MultipleResources stuff. I'm able to set up the calendar with multiple resources (thanks to some posts on the forum), but I'm not able to add events.</DIV><DIV>&nbsp;</DIV><DIV>I'm using C# with the following code:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String strConnectionString = @"Provider=XML;Data Source=c:\CalendarMultipleSchedulesSample.xtp_cal";</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CalendarResources resoures = new CalendarResources();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CalendarResource res0 = new CalendarResource();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CalendarResource res1 = new CalendarResource();</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; res0.SetDataProvider2(strConnectionString, true);</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CalendarSchedules schedules = res0.DataProvider.Schedules;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (schedules.Count &lt; 1) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; schedules.AddNewSchedule("John");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; schedules.AddNewSchedule("Jane");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; res0.DataProvider.Save();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; schedules&#091;0&#093;.Id = 100;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; res0.Name = schedules&#091;0&#093;.Name;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; res0.ScheduleIDs.Add(schedules&#091;0&#093;.Id);</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; schedules&#091;1&#093;.Id = 101;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; res1.SetDataProvider(res0.DataProvider, false);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; res1.Name = schedules&#091;1&#093;.Name;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; res1.ScheduleIDs.Add(schedules&#091;1&#093;.Id);</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resoures.Add(res0);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resoures.Add(res1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wndCalendarControl.SetMultipleResources(resoures);</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wndCalendarControl.Populate();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wndCalendarControl.RedrawControl();</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Add test event<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DateTime fromTime = DateTime.Now;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DateTime toTime = new DateTime(2006, 8, 22, 11, 11, 11);</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CalendarEvent calEvent = res0.DataProvider.CreateEvent();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; calEvent.StartTime&nbsp; = fromTime;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; calEvent.EndTime&nbsp;&nbsp;&nbsp; = toTime;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; calEvent.Subject&nbsp;&nbsp;&nbsp; = "Hallo";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; calEvent.ScheduleID = schedules&#091;0&#093;.Id;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; res0.DataProvider.AddEvent(calEvent);</DIV><DIV><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wndCalendarControl.ActiveView.SetSelection(DateTime.Now, toTime, false);</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wndCalendarControl.Populate();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wndCalendarControl.RedrawControl();</DIV><DIV>&nbsp;</DIV><DIV>The code I'm struggeling with is the part after //Add test event</DIV><DIV>The event simply never appears in the calendar...</DIV><DIV>&nbsp;</DIV><DIV>Could someone please point me in the right direction??</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Best regards,</DIV><DIV>Gøran</DIV>]]>
   </description>
   <pubDate>Tue, 22 Aug 2006 04:10:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4847&amp;PID=15088&amp;title=problem-adding-events-with-multiple-resources#15088</guid>
  </item> 
 </channel>
</rss>