Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

Editing appointment series - how to retain the exceptions

$
0
0

This sample project addresses a typical problem that occurs when the end-user modifies a pattern used to create a chain of recurring appointments. What to do with modified occurrences also called exceptions? The default decision is straightforward – they are deleted. The current project explores another possibility, which is to retain exceptions and bind them to the modified pattern.
This example uses a customized AppointmentFormController class. On applying changes, it creates the ExceptionHelper class instance.
The ExceptionHelper class provides the AssignRecurrenceProperties method, which decides whether exceptions should be retained or deleted. The current implementation deletes all exceptions if new and old recurrence patterns do not match, since it's difficult to determine, say, the relation of a weekly appointment to a daily one. If recurrence patterns are the same, then exceptions should be treated with care, and the ExceptionPropertiesManager class instance is created. The ExceptionPropertiesManager implements the logic, which decides how the properties of the exception appointment are merged with pattern appointment properties.
Currently if an exception's property has the same value as that of the pattern, it follows the changes of the corresponding pattern's property.

Question Comments

Added By: Roman Shelomanov at: 9/16/2013 10:25:48 AM    

Hi,
Whether there is an example of the solution of the same problem for eXpressApp Framework?

Added By: Dennis (DevExpress Support) at: 9/16/2013 11:33:39 PM    

@Roman: We do not have a ready example dedicated to this scenario. You may find the following product documentation helpful to implement this yourself:
1. http://documentation.devexpress.com/#Xaf/CustomDocument2814
2. http://documentation.devexpress.com/Xaf/CustomDocument2659.aspx
Feel free to contact us in case of any difficulties.

Added By: Anatol (DevExpress Support) at: 4/23/2015 2:00:11 AM    For more details about a solution for XAF, refer to the How to prevent the deletion of exceptional occurrences after changing a recurring event's pattern ticket.

Viewing all articles
Browse latest Browse all 7205

Trending Articles