JOHN JOHNNNY

JOHN JOHNNNY

  • NA
  • 190
  • 135.2k

Scheduling/Event app

Feb 4 2015 11:42 AM
Hi

I will like to develop a scheduling/events application  i.e users will know the event available for each day of the month through
the year. I have prepared 365 events in text format located in my folder, i have also prepared the the date picker code already.
how can i bind each text file event for each day to the date picker. When the user picks date it will display the event available for each day.
see datepicker code below
xaml.cs
public partial class MainPage : PhoneApplicationPage
    {
        Appointments appointments = new Appointments(); 
        
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            appointments.SearchCompleted += new EventHandler<AppointmentsSearchEventArgs>(appointments_SearchCompleted);
            SearchCalendar(); 

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }

        private void SearchCalendar()
        {
            appointments.SearchAsync(DateBox.Value.Value, DateBox.Value.Value.AddDays(1), null);
        }

        private void DateBox_ValueChanged(object sender, DateTimeValueChangedEventArgs e)
        {
            SearchCalendar();
        }

        void appointments_SearchCompleted(object sender, AppointmentsSearchEventArgs e)
        {
            if (e.Results.Count() == 0)
            {
                MessageText.Text = "no events for the selected day";
            }
            else
            {
                MessageText.Text = e.Results.Count() + " events found";
                DateList.ItemsSource = e.Results;
            }
        } 
Kindly help