Click here to Skip to main content
15,894,180 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
hello
i have a question
i have a list containing teacher name and teacher course and capacity for teacher class and name of course and sex of course and course group and course unit from all courses in my university.
i have to write program that show to me weekly schedular .
for example a table that containing saturday schedular :

8-10 10-12 12-14 14-16 16-18
301 Math history(mr.babaei) pl(mr.sadeghi) ... ...
302 ... ... ... ... ...
303 ... ... ... ... ...
304 ... ... ... ... ...
305 ... ... ... ... ...

rows=class number columns : time

have you any idea or example for me.
my mail : removed
Posted
Updated 9-Mar-12 1:14am
v2
Comments
[no name] 9-Mar-12 7:14am    
Do not post your email unless you like getting tons of SPAM.
V. 9-Mar-12 9:21am    
What it the exact problem? Where are you stuck? What did you try?

1 solution

Assuming you're writing some system that needs to perform an action at a specific clock time, the following would cover the fundamental task of raising an event.

Create a System.Timer for each event to be scheduled (wrap in an object that contains the parameters for the event). Set the timer by calculating the milliseconds until the event is supposed to happen. EG:

C#
// Set event to occur on October 1st, 2008 at 12:30pm.
DateTime eventStarts = new DateTime(2008,10,1,12,30,00);
Timer timer = new Timer((eventStarts - DateTime.Now).TotalMilliseconds);

Since you didn't go into detail, the rest would be up to you; handle the timer.Elapsed event to do what you want, and write the application as a Windows Service to run in background always.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900