コード例 #1
0
ファイル: Relation.cs プロジェクト: anastasiaramos/moleQule
        protected override void DataPortal_Update()
        {
            if (!IsDirty)
            {
                return;
            }

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

            obj.CopyValues(Base.Record);
            Session().Update(obj);
            MarkOld();
        }
コード例 #2
0
ファイル: Relation.cs プロジェクト: anastasiaramos/moleQule
        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;
        }
コード例 #3
0
ファイル: Relation.cs プロジェクト: anastasiaramos/moleQule
        /// <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();
        }
コード例 #4
0
ファイル: Relation.cs プロジェクト: anastasiaramos/moleQule
        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();
        }