<?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 : DoRetrieveDayEvents - How to know about Resouce</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : DoRetrieveDayEvents - How to know about Resouce]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 30 May 2026 01:08:54 +0000</pubDate>
  <lastBuildDate>Sun, 27 Apr 2008 21:52:01 +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=10375</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[DoRetrieveDayEvents - How to know about Resouce : Hello Everybody First timer on...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10375&amp;PID=34277&amp;title=doretrievedayevents-how-to-know-about-resouce#34277</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4125">pritpal</a><br /><strong>Subject:</strong> 10375<br /><strong>Posted:</strong> 27 April 2008 at 9:52pm<br /><br /><P>Hello Everybody</P><DIV>First timer on board. Just 14 days old in XtreamCalendar space.</DIV><DIV>&nbsp;</DIV><DIV>I am populating calendar with a single "custom" DataProvider with multiple resources, as</DIV><DIV>//----------------------------------------------------------------------//<BR>CLASS V32Calendar</DIV><DIV>..</DIV><DIV>..</DIV><DIV>ENDCLASS</DIV><DIV>//----------------------------------------------------------------------//<BR>METHOD AddSchedules() CLASS V32Calendar<BR>&nbsp;&nbsp; Local i</DIV><DIV>&nbsp;&nbsp; // aSchedules := { { 'SUPER', 1 }, { 'MIDDLE', 2 } }</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp; for i := 1 to len( ::aSchedules )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ::oResources:Add( CreateResource( self, ::aSchedules&#091; i,1 &#093;, ::aSchedules&#091; i,2 &#093; ) )<BR>&nbsp;&nbsp; next<BR>&nbsp;&nbsp; ::oCal:SetMultipleResources( ::oResources )</DIV><DIV>&nbsp;&nbsp; RETURN nil<BR>//----------------------------------------------------------------------//<BR>Static Function CreateResource( oV32Cal, cName, nScheduleID )<BR>&nbsp;&nbsp; Local oResource := CreateObject( oV32Cal:ClsResource )</DIV><DIV>&nbsp;&nbsp; WITH OBJECT oResource<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :Name := cName<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :ScheduleIDs:Add( nScheduleID )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :SetDataProvider2( "Provider=custom", .f. )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //:DataProvider:CacheMode := xtpCalendarDPCacheModeOff<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :DataProvider:Create()<BR>&nbsp;&nbsp; END<BR>&nbsp;&nbsp; Return oResource<BR>//----------------------------------------------------------------------//<BR>METHOD OnDoRetrieveEvents( dtDay, oEvents )</DIV><DIV>&nbsp;&nbsp; //&nbsp; Here I populate the events based on my own tables</DIV><DIV>&nbsp;&nbsp; //&nbsp; </DIV><DIV>&nbsp;&nbsp; Return NIL</DIV><DIV>//----------------------------------------------------------------------//</DIV><DIV>&nbsp;</DIV><DIV>Everything goes well. Calendar is populted properly. The problem is performance issue. As DoRetrieveDayEvents is fired for every resource for a single day, I have no clue&nbsp;how to filter&nbsp;database for events which belong to schedules contained in that resource. I have to pull all events to that day and&nbsp;set ScheduleID member.</DIV><DIV>&nbsp;</DIV><DIV>This is double work on database engine. Not double, but as many times as many resources are set for the calendar. </DIV><DIV>&nbsp;</DIV><DIV>Anybody with any idea how to&nbsp;determine to which resource&nbsp;oEvents&nbsp;belongs to?</DIV><DIV>&nbsp;</DIV><DIV>Regards&nbsp;</DIV>]]>
   </description>
   <pubDate>Sun, 27 Apr 2008 21:52:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10375&amp;PID=34277&amp;title=doretrievedayevents-how-to-know-about-resouce#34277</guid>
  </item> 
 </channel>
</rss>