protected override void OnActivated()
 {
     base.OnActivated();
     if (!IsAdmininstator(SecuritySystem.CurrentUserId))
     {
         if (View.IsRoot)
         {
             FilterActivities(CriteriaOperator.Parse("Employees[Oid = ?]", SecuritySystem.CurrentUserId));
         }
     }
     if (!View.IsRoot)
     {
         PropertyCollectionSource propertyCollectionSource = View.CollectionSource as PropertyCollectionSource;
         if (propertyCollectionSource != null)
         {
             propertyCollectionSource.MasterObjectChanged += propertyCollectionSource_MasterObjectChanged;
             UpdateMasterDetailViewEmployee(propertyCollectionSource);
         }
     }
     schedulerListEditorCore = ((ListView)View).Editor as SchedulerListEditorBase;
     if (schedulerListEditorCore != null)
     {
         schedulerListEditorCore.ResourceDataSourceCreated += schedulerListEditorCore_ResourceDataSourceCreated;
     }
 }
 protected override void OnActivated()
 {
     base.OnActivated();
     // Perform various tasks depending on the target View.
     schedulerEditor = ((ListView)View).Editor as SchedulerListEditorBase;
     if (schedulerEditor != null)
     {
         schedulerEditor.ExceptionEventCreated +=
             new EventHandler <ExceptionEventCreatedEventArgs>(
                 schedulerEditor_ExceptionEventCreated);
     }
 }