/// <summary> /// Insert appointment to schedulestorage /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override void OnAppointmentInserted(object sender, PersistentObjectEventArgs e) { var appointment = e.Object as Appointment; try { base.OnAppointmentInserted(sender, e); } catch { } _innerCtrl.ChangedService.MarkChanged(); ControlService.EnableCopyMenu(true); if (appointment.CustomFields == null) { try { _customFields.SetValue(appointment, new CustomFieldCollection()); } catch (Exception ex) { DataGate.Log.Error("SchedulerStorageDecorator Exception:" + ex.Message); } } if (!_innerCtrl.IsOpen) { UndoService.AddAppointmentAddedAction(this, appointment); } }