0

i want to create calender scheduler in c# i which i can insert,edit,update meeting,birthdays,holidays informations . Does any one knows how to solve it?

3
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by BlackSun
0

i didn`t try it but there is event monthCalendar1_DateSelected so u can know the selected date so use buttone or any control will help to send ur data nd date to ur database so by this event u can chech for the certain date arrgument "e.start.date" to yr colomn date for ur data base i have example but i save data i array ex:

namespace caleder
{
    public partial class Form1 : Form
    {
        string date;
        int counter = 0;
        string[] save = new string[5];
        string[] save2 = new string[5];
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            date = monthCalendar1.TodayDate.ToString();
        }

        private void monthCalendar1_DateSelected(object sender, DateRangeEventArgs e)
        {
            date = e.Start.Date.ToString();
                    for (int x = 0; x < counter; x++)
                    {
                        if (save[x] == e.Start.Date.ToString())
                        {
                            textBox2.Text = save2[x];
                            break;
                        }
                        else
                            textBox2.Text = "no data found";
                    } 
        }

        private void button1_Click(object sender, EventArgs e)
        {
            save[counter] = date;
            save2[counter] = textBox1.Text;
            counter++;
            textBox1.Clear();
            textBox2.Clear();
        }
    }
}

Edited by Dani: Formatting fixed

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.