
June 17th, 2003, 11:54 AM
|
|
Registered User
|
|
Join Date: Jun 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Help with Calendar code....
I am trying to display a calendar with certain dates marked a different colour. I have a db table and each record includes a start and end date for each event which can span anything from 3 days to 6 weeks.<br><br>I have a class bookings.db which passes the id of the calendar ( there are several on site) into the sproc GetBookings and returns the relevant data from the db, i have included the sproc below.<br><br>I now need to access that data from my page behind and colour all dates that fall between the start and end date of each booking in red.<br><br>This is where I come up short  I have not used the clalendar control before and would appreciate some help in getting this finished.....<br>I have started with, any help would be appreciated.....<br><div class="msgQuoteWrap"><div class="msgCode"><br> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br> 'Set Calendar to todays Date<br> BookingsCalendar.SelectedDate = Now.Date()<br><br> ' Obtain the list of bookings from the Bookings table<br> ' and bind to the Calendar Control<br> Dim bookings As New Site.BookingsDB()<br></div></div><br><br>SPROC:<br><div class="msgQuoteWrap"><div class="msgCode"><br>CREATE PROCEDURE GetBookings<br>(<br> @ModuleID int<br>)<br>AS<br>SELECT<br> ItemID,<br> BookedByUser,<br> CustomerName,<br> CustomerTel,<br> CustomerEmail,<br> StartDate,<br> EndDate,<br> PropertyName<br><br>FROM<br> Bookings<br><br>WHERE<br> ModuleID = @ModuleID<br> AND<br> StartDate >= GetDate()<br>GO<br></div></div><!-- Edit --><p><i>Last Edited : 6/17/2003 8:56:32 AM GMT</i></p>
|