Esempio n. 1
0
        /// <summary>
        /// Actualiza un registro en la base de datos
        /// </summary>
        /// <param name="parent">Objeto padre</param>
        internal void Update(Loan parent)
        {
            // if we're not dirty then don't update the database
            if (!this.IsDirty)
            {
                return;
            }

            //Debe obtener la sesion del padre pq el objeto es padre a su vez
            SessionCode = parent.SessionCode;

            OidPrestamo = parent.Oid;

            ValidationRules.CheckRules();

            if (!IsValid)
            {
                throw new iQValidationException(moleQule.Resources.Messages.GENERIC_VALIDATION_ERROR);
            }

            InterestRateRecord obj = parent.Session().Get <InterestRateRecord>(Oid);

            obj.CopyValues(Base.Record);
            parent.Session().Update(obj);

            MarkOld();
        }
Esempio n. 2
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(InterestRates parent)
        {
            // if we're not dirty then don't update the database
            if (!this.IsDirty)
            {
                return;
            }

            ValidationRules.CheckRules();

            if (!IsValid)
            {
                throw new iQValidationException(moleQule.Resources.Messages.GENERIC_VALIDATION_ERROR);
            }

            SessionCode = parent.SessionCode;
            InterestRateRecord obj = Session().Get <InterestRateRecord>(Oid);

            obj.CopyValues(Base.Record);
            Session().Update(obj);

            MarkOld();
        }