Welcome to Dream.In.Code
Become an Expert!

Join 150,072 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,787 people online right now. Registration is fast and FREE... Join Now!




2005 .NET Event Calendar Problem

 
Reply to this topicStart new topic

2005 .NET Event Calendar Problem

cmw2992
19 Feb, 2008 - 08:46 AM
Post #1

New D.I.C Head
*

Joined: 15 Feb, 2008
Posts: 5


My Contributions
I am creating an event calendar populated by two SQL tables where a Stored Procedure (SP for short) is calling all of the information for the calendar to use. I can get the calendar to populate on the start date of the event but not populate on every day that the event occurs. In my SP I did a DateDiff where I calculated the difference in the start and end date for this event. I am sending the "REF_EVENT_ID, EVENT_NAME, EVENT-START_DATE, AND NUM_DAYS" to a "myCollection" in the VB code behind. I cant seem to figure out how to use the "NUM_DAYS" to make the calendar populate a multi day event starting on the "EVENT_START_DATE" and populating each day after until the NUM_DAYS number has been reached. Here is my VB code Please let me know whats the deal, I have been stuck on this for a week:

The code is attached****


Attached File(s)
Attached File  calendar.txt ( 8.59k ) Number of downloads: 67
User is offlineProfile CardPM
+Quote Post

cmw2992
RE: 2005 .NET Event Calendar Problem
20 Feb, 2008 - 07:18 AM
Post #2

New D.I.C Head
*

Joined: 15 Feb, 2008
Posts: 5


My Contributions
Well, I guess nobody knows how to fix this.......Honestly, does anyone know how to even remotely get this to work?
User is offlineProfile CardPM
+Quote Post

Jayman
RE: 2005 .NET Event Calendar Problem
20 Feb, 2008 - 11:11 AM
Post #3

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,319



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
Patience young Padawan, we have lives (work, family, school, etc) and do not spend every waking moment here awaiting your questions. Sometimes it can take a day or two before someone who can answer your question visits the forum.

Think of "NUM_DAYS" as a counter that is going to count backwards when you hit the start day of the event. As you are generating the calender and adding the events to each day, you will only need a simple If statement to determine if "NUM_DAYS" is greater than zero. If it is then put the event on that calendar day and deduct one from "NUM_DAYS".

You don't necessarily have to use "NUM_DAYS" from your structure, you could simply assign its value to another variable that will be the actual counter.

This way as your calendar is being generated forward the counter will be counting down from the start date and adding the event to the calendar.

Does that help?
User is offlineProfile CardPM
+Quote Post

cmw2992
RE: 2005 .NET Event Calendar Problem
20 Feb, 2008 - 12:25 PM
Post #4

New D.I.C Head
*

Joined: 15 Feb, 2008
Posts: 5


My Contributions
Thank you, I realize you have lives. I do to. Sorry for sounding "pressing" on the situation. Im just a little aggravated at this program.

Reguarding what you wrote about "fixing" the problem. That is kind of what I have done....kind of. I'll keep hacking away at it and I will post another response when I get stumped again or get the answer.

Thank you for your response.
User is offlineProfile CardPM
+Quote Post

cmw2992
RE: 2005 .NET Event Calendar Problem
20 Feb, 2008 - 12:31 PM
Post #5

New D.I.C Head
*

Joined: 15 Feb, 2008
Posts: 5


My Contributions
ok, found a question....

Do I need to do all of this on the "dayRender" event or do it in another function and call it in DayRender?
User is offlineProfile CardPM
+Quote Post

Jayman
RE: 2005 .NET Event Calendar Problem
20 Feb, 2008 - 12:42 PM
Post #6

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,319



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
Yes, you will need to do it in the DayRender event, as this is what is actually creating each day in the calendar.

Something I forgot to mention is you will need your counter to be a class level variable, this way the value of the counter will be remembered each time the DayRender event is executed for each day of the month.

User is offlineProfile CardPM
+Quote Post

cmw2992
RE: 2005 .NET Event Calendar Problem
20 Feb, 2008 - 12:51 PM
Post #7

New D.I.C Head
*

Joined: 15 Feb, 2008
Posts: 5


My Contributions
ok. I'm working on it now. I'll keep you informed.

Thank you very much!
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 11:03PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month