Beispiel #1
0
        protected override void DataPortal_Update()
        {
            if (!IsDirty)
            {
                return;
            }

            RelationRecord obj = Session().Get <RelationRecord>(Oid);

            obj.CopyValues(Base.Record);
            Session().Update(obj);
            MarkOld();
        }
Beispiel #2
0
        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;
        }
Beispiel #3
0
        /// <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();
        }
Beispiel #4
0
        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();
        }