static void SessionObjectLoaded(object sender, ObjectManipulationEventArgs e) { if (e != null && e.Object != null) { Console.WriteLine("SessionObjectLoaded: {0}", e.Object); } }
void session_ObjectLoaded(object sender, ObjectManipulationEventArgs e) { if (e == null) { return; } }
/// <summary> /// Handles the ObjectLoaded event of the session control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DevExpress.Xpo.ObjectManipulationEventArgs"/> instance containing the event data.</param> private void session_ObjectLoaded(object sender, ObjectManipulationEventArgs e) { if (isMaintenanceObject(e.Object)) { return; } trackedObjects.Refresh(e.Object); }
/// <summary> /// Handles the ObjectDeleting event of the session control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DevExpress.Xpo.ObjectManipulationEventArgs"/> instance containing the event data.</param> private void session_ObjectDeleting(object sender, ObjectManipulationEventArgs e) { if (isDcManyToManyLinkObject(e.Object)) { var propMember = Session.GetClassInfo(e.Object).ObjectProperties.Cast <XPMemberInfo>() .Where(x => x.Name.EndsWith(SpecificWords.LinkedPostfix)).FirstOrDefault(); if (propMember != null) { registerDcManyToManyChange(e.Object, propMember, propMember.GetValue(e.Object), ProtocolEventType.RemovedFromCollection, false); } } }
/// <summary> /// Handles the ObjectDeleted event of the session control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DevExpress.Xpo.ObjectManipulationEventArgs"/> instance containing the event data.</param> private void session_ObjectDeleted(object sender, ObjectManipulationEventArgs e) { if (isMaintenanceObject(e.Object)) { return; } if (!isDcManyToManyLinkObject(e.Object)) { RegisterProtocolEvent(new ProtocolEvent { Target = e.Object, ProtocolEventType = ProtocolEventType.ObjectDeleted, ReplicationKey = ExtensionsHelper.GetReplicationKey(e.Object) }); } trackedObjects.Remove(e.Object); }
private void session_ObjectSaving(object sender, ObjectManipulationEventArgs e) { }
/// <summary> /// Handles the ObjectDeleting event of the session control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DevExpress.Xpo.ObjectManipulationEventArgs"/> instance containing the event data.</param> private void session_ObjectDeleting(object sender, ObjectManipulationEventArgs e) { if (isDcManyToManyLinkObject(e.Object)) { var propMember = Session.GetClassInfo(e.Object).ObjectProperties.Cast<XPMemberInfo>() .Where(x => x.Name.EndsWith(SpecificWords.LinkedPostfix)).FirstOrDefault(); if (propMember != null) registerDcManyToManyChange(e.Object, propMember, propMember.GetValue(e.Object), ProtocolEventType.RemovedFromCollection, false); } }
private void UnitOfWork_ObjectSaving(object sender, ObjectManipulationEventArgs e) { }
private void UnitOfWork_ObjectSaved(object sender, ObjectManipulationEventArgs e) { //System.Diagnostics.Debugger.Break(); //TODO: Perform Log Actions with "e.Object"! //if (CommitOnChange) UnitOfWork.CommitChanges(); }
static void UnitOfWorkObjectSaved(object sender, ObjectManipulationEventArgs e) { var testDE = e.Object as TestDE; System.Diagnostics.Debug.WriteLine(string.Format("UnitOfWorkObjectSaved({0})", testDE != null ? testDE.ToString() : "null")); }
static void UnitOfWorkObjectLoaded(object sender, ObjectManipulationEventArgs e) { System.Diagnostics.Debug.WriteLine("UnitOfWorkObjectLoaded()"); }
private void Session_OnObjectDeleting(object sender, ObjectManipulationEventArgs e) { var xpBaseObject = (XPBaseObject) e.Object; foreach (XPMemberInfo memberInfo in xpBaseObject.ClassInfo.ObjectProperties) { object value = memberInfo.GetValue(xpBaseObject); if (value != null) xpBaseObject.SetMemberValue("Deleted" + memberInfo.Name, memberInfo.ReferenceType.KeyProperty.GetValue( value)); } }
/// <summary> /// Handles the ObjectLoaded event of the session control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DevExpress.Xpo.ObjectManipulationEventArgs"/> instance containing the event data.</param> private void session_ObjectLoaded(object sender, ObjectManipulationEventArgs e) { if (isMaintenanceObject(e.Object)) return; trackedObjects.Refresh(e.Object); }
private void Session_ObjectSaved(object sender, ObjectManipulationEventArgs e) { }
public void ObjectManipulationHandler(object sender, ObjectManipulationEventArgs e) { EvalTransactionState(); }
/// <summary> /// Handles the ObjectDeleted event of the session control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DevExpress.Xpo.ObjectManipulationEventArgs"/> instance containing the event data.</param> private void session_ObjectDeleted(object sender, ObjectManipulationEventArgs e) { if (isMaintenanceObject(e.Object)) return; if (!isDcManyToManyLinkObject(e.Object)) { RegisterProtocolEvent(new ProtocolEvent { Target = e.Object, ProtocolEventType = ProtocolEventType.ObjectDeleted, ReplicationKey = ExtensionsHelper.GetReplicationKey(e.Object) }); } trackedObjects.Remove(e.Object); }