Quantcast
Channel: eXpandFramework RSS
Viewing all articles
Browse latest Browse all 861

BLOG by Konstantin B (DevExpress)Merge Changes when Two Users Edit the Same Record Simultaneously

$
0
0

In multi-user data-aware applications it often occurs when a user modifies and saves a record that was edited by someone else. It is also possible that changes made by users do not intercept, e.g. one user modifies the task description, and another attaches a file to the same task. Now, WinForms XAF applications can correctly handle such a situation and merge changes made by different users in case they do not conflict. The video below demonstrates it in action.

To try the described functionality in the upcoming 13.1 version of XAF, add the following code to your Program.cs file.

staticvoid Main() {
DevExpress.Xpo.XpoDefault.TrackPropertiesModifications = true;
// ...
}
 
ASP.NET applications are not supported, but only because the user interaction dialogs are currently implemented for WinForms only. The core helper classes are located in the DevExpless.ExpressApp.Xpo assembly and thus the ASP.NET support can be potentially added in the future.

Important note:

It is required that the SetPropertyValue or OnChanged method taking both the old and new values is invoked in a persistent property setter to provide the correct tracking. If you use the Data Model Designer or Business Object Designer, then your properties are already implemented in the proper manner. If you implement your business objects in code, then follow XPO best practices - use one of the following invocations in setters:

SetPropertyValue("PropertyName", ref propertyValueHolder, value);
 
OnChanged("PropertyName", propertyValueHolder, value)



See also: Core - Support the Session.TrackPropertiesModifications option to allow data collisions resolving


Viewing all articles
Browse latest Browse all 861

Trending Articles