Scenario:
It is necessary to use Security System users as Scheduler resources and filter Scheduler events by these users using a SingleChoiceAction.
Steps to Implement:
1. Create a custom use class (MyUser) inherited from the SecuritySystemUser class to establish association between users and events (see How to: Implement Custom Security Objects (Users, Roles, Operation Permissions)).
2. Create a custom event class (MyEvent) implementing the IRecurrentEvent interface. You cannot use an Event's descendant here, because the built-in Event class is already associated with resources.
3. Establish a many-to-many association between the MyEvent and MyUser classes.
4. Implement the IEvent.ResourceId property in the MyEvent class to build IDs based on the associated users collection. Pay special attention to implementing the UpdateResources method.
5. Create a controller (FilterResourcesController) with a SingleChoiceAction whose items are populated based on the existing MyUser objects.
6. Filter data source from the SchedulerListEditor.ResourcesDataSource property when the SingleChoiceAction is executed based on the selected action item.
↧
How to use SingleChoiceAction to show a certain resource in Scheduler
↧