/// <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(Library.Resources.Messages.GENERIC_VALIDATION_ERROR);
            }

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

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

            MarkOld();
        }
        public virtual void CopyValues(InterestRateRecord source)
        {
            if (source == null)
            {
                return;
            }

            Oid            = source.Oid;
            _oid_prestamo  = source.OidPrestamo;
            _tipo_interes  = source.TipoInteres;
            _fecha_inicio  = source.FechaInicio;
            _fecha_fin     = source.FechaFin;
            _importe_cuota = source.ImporteCuota;
        }
        /// <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(Library.Resources.Messages.GENERIC_VALIDATION_ERROR);
            }

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

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

            MarkOld();
        }