protected override void DataPortal_Update() { if (!IsDirty) { return; } RelationRecord obj = Session().Get <RelationRecord>(Oid); obj.CopyValues(Base.Record); Session().Update(obj); MarkOld(); }
public virtual void CopyValues(RelationRecord source) { if (source == null) { return; } Oid = source.Oid; _oid_parent = source.OidParent; _parent_type = source.ParentType; _oid_child = source.OidChild; _child_type = source.ChildType; }
/// <summary> /// Actualiza el registro en la base de datos /// </summary> /// <param name="parent">Lista padre</param> /// <remarks>La utiliza la BusinessListBaseEx correspondiente para actualizar elementos<remarks/> internal void Update(Relations parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(Library.Resources.Messages.GENERIC_VALIDATION_ERROR); } SessionCode = parent.SessionCode; RelationRecord obj = Session().Get <RelationRecord>(Oid); obj.CopyValues(Base.Record); Session().Update(obj); MarkOld(); }
internal void Update(IEntity parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } OidParent = parent.Oid; try { SessionCode = parent.SessionCode; RelationRecord obj = Session().Get <RelationRecord>(Oid); obj.CopyValues(this._base.Record); Session().Update(obj); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }