TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ta mu
NA
201
81.4k
date time comparasion
Sep 11 2013 4:46 AM
this is code which i am using for reminder option. but it only works when pc remain running how to convert that code if i restart my computer
it starts working agin.
public DateTime mytime;
private void timer1_Tick(object sender, EventArgs e)
{
if (mytime.CompareTo(DateTime.Now) < 0)
{
this.Show();
}
}
private void button1_Click(object sender, EventArgs e)
{
mytime = monthCalendar1.SelectionStart.AddHours(dateTimePicker1.Value.Hour).AddMinutes(dateTimePicker1.Value.Minute).AddSeconds(dateTimePicker1.Value.Second);
if (textBox1.Text!="")
{
SqlCommand cmd = new SqlCommand("INSERT INTO reminder (message,date,time) VALUES ('" + textBox1.Text + "','" + monthCalendar1.SelectionStart + "','" + dateTimePicker1.Value + "')", my);
cmd.ExecuteNonQuery();
this.Hide();
}
else
{
MessageBox.Show("Enter A Messag");
}
Reply
Answers (
7
)
View, Model, and View Model in Sivlerlight 5
Saving Microphone stream to amr format in Windows Phone