//------------------------------------------------ #region ** Overrides protected override void OnKeyDown(KeyEventArgs e) { if (e.Key == Key.Delete && SelectedAppointments.Count > 0) { C1Scheduler.DeleteAppointmentCommand.Execute(SelectedAppointments.ToList <Appointment>(), Scheduler); e.Handled = true; } base.OnKeyDown(e); }
void SelectAppointments() { SelectedAppointments.Clear(); foreach (IHP_HARMONOGRAM_DZIENNY modelApt in SelectedModelAppointments) { Appointment apt = Scheduler.Storage.AppointmentStorage.GetAppointmentById(modelApt.ID_IHP_HARMONOGRAM_DZIENNY); if (apt != null) { SelectedAppointments.Add(apt); } } }
void SelectAppointments() { SelectedAppointments.Clear(); foreach (ModelAppointment modelApt in SelectedModelAppointments) { Appointment apt = Scheduler.Storage.AppointmentStorage.GetAppointmentById(modelApt.Id); if (apt != null) { SelectedAppointments.Add(apt); } } }
private void ShowSelectedAppointment() { if (SelectedAppointments != null && SelectedAppointments.Any()) { SetAppointment(SelectedAppointments.First()); } else { Subject = null; Location = null; LabelId = 0; StatusId = 0; AllDayEvent = false; Description = null; //Resolve date time to format that is used on view StartDate = DateTime.ParseExact(SelectedStartDateTime.ToString("MM-dd-yyyy HH:mm:ss"), "MM-dd-yyyy HH:mm:ss", CultureInfo.InvariantCulture).Date; EndDate = DateTime.ParseExact(SelectedStartDateTime.ToString("MM-dd-yyyy HH:mm:ss"), "MM-dd-yyyy HH:mm:ss", CultureInfo.InvariantCulture).Date; StartTime = SelectedStartDateTime.TimeOfDay.ToString(); EndTime = SelectedStartDateTime.TimeOfDay.ToString(); SelectedReminder = ReminderCollection[0]; CurrentAppointmentId = null; } }