Ejemplo n.º 1
0
        private void CalendarDayButton_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            System.Windows.Controls.Primitives.CalendarDayButton button = sender as System.Windows.Controls.Primitives.CalendarDayButton;
            Event    objEvent    = new Event();
            DateTime clickedDate = (DateTime)button.DataContext;

            if (_eventDAL.GetEventList(clickedDate).Count > 0)
            {
                if (clickedDate != null)
                {
                    _winService.ShowView(ViewKeys.EventList, "Event List");
                    _eventAggregator.GetEvent <AddEventClickedDate>().Publish(clickedDate.ToString());
                }
            }
            else
            {
                if (clickedDate.Date > DateTime.Now.Date)
                {
                    clickedDate = DateTime.Now;
                }
                NavigationParameters param = new NavigationParameters();
                param.Add("clickedDate", clickedDate);
                _winService.ShowView(ViewKeys.AddEvent, "Edit Event", param);
                //JCHMessageBox.Show("No Event added");
            }
        }
Ejemplo n.º 2
0
        public void LoadEvents(string clickeddate)
        {
            Events      = new ObservableCollection <Event>(_eventDAL.GetEventList(Convert.ToDateTime(clickeddate)));
            Currentdate = Convert.ToDateTime(clickeddate);

            //EditEventClick();
        }