954,141 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Week Scheduler in C#..

Hi all,
I am fed up of doing this week scheduler for my project...i am trying and trying but seems to go nowhere..I thought of asking u people for any ideas...(windows application)

My project is online ticket booking and i have a admin screen where he can schedule movies for a particular day and for that week....The problem i am facing is that i want to display the Date and Day of that week in Seven labels..If the user clicks on label Friday 11/1/08.He should see the movies scheduled for friday and he can edit the movie ,timing,etc.....

Iam not able to get the day and date into the labels.
Consider my first label is Friday.The label should have Friday along with date.I did it using date time picker and put it in that label.But the problem is i am not able to increment the day and date for the next day and it should be continous.......
Please forgive me if u dont understand what i said,please refer to a online ticket booking site if u want a clear idea.......

Give me some ideas on how to do this.

bharathi_n_r
Light Poster
25 posts since Jan 2008
Reputation Points: 10
Solved Threads: 0
 

Guess you need something like BindingContext
http://www.csharphelp.com/archives3/archive577.html

rayben
Newbie Poster
4 posts since Dec 2007
Reputation Points: 10
Solved Threads: 0
 

u can use the datetime picker to handel that, this control is a built in control within the tool bar or u can instantiate one
DateTimePicker oDateTimePicker = new DateTimePicker();
DateTime oDate = oDateTimePicker.Value.Date;//Get the date from the date time picker control
Get the day from the date time picker control using this fra
oDateTimePicker.Value.Day;

Jugortha
Junior Poster
172 posts since Oct 2007
Reputation Points: 11
Solved Threads: 16
 

They are other porperties that I guess that they could be interessant for you good luck

Jugortha
Junior Poster
172 posts since Oct 2007
Reputation Points: 11
Solved Threads: 16
 

Thanks fellows,
I got the day in to label by using this...

label3.Text = dateTimePicker1.Value.DayOfWeek.ToString();


This returned me the current day.No problem
But how to increment the next label say the first label returned Monday and the next label should return tuesday and so on....How to perform this.

bharathi_n_r
Light Poster
25 posts since Jan 2008
Reputation Points: 10
Solved Threads: 0
 

Use something like this:
Convert.ToDateTime(dateTimePicker1.Value).AddDays(1)

Shyam

a_shym41
Newbie Poster
7 posts since Jan 2008
Reputation Points: 10
Solved Threads: 0
 

Thanks man,It is getting incremented but the problem is when i log in tomorrow,the value in the first label and the preceeding labels gets incremented by one day...I dont want that to happen...This is what i have

Label1
Label2
Label3
Label4
Label5
Label6
Label7
Each label should hold a day and that date..I am getting perfectly if i give the code as u said,but if i come tomorrow all the days are changed like the first label changes to tuesday and the next label to Wednesday..Any solution.......

bharathi_n_r
Light Poster
25 posts since Jan 2008
Reputation Points: 10
Solved Threads: 0
 

Hi,
I think there is basic problem with your logic in coding.
Please check if the following link helps you:
http://www.basicdatepicker.com/documentation/BasicFrame.WebControls.BasicDatePicker.FirstDayOfWeek.html

Thanks,
Shyam

a_shym41
Newbie Poster
7 posts since Jan 2008
Reputation Points: 10
Solved Threads: 0
 

Hi shyam,
The link u gave is for web application.There is no c# code but only html code.I am developing a windows application..The logic is to get the weeks date in to the labels i have in my form...Check this site for your clarification..www.thecinema.in.You will see the movies scheduled for the week..I want it in that way dude....any solution....

bharathi_n_r
Light Poster
25 posts since Jan 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You