예제 #1
0
        internal void Update(Promocion parent)
        {
            // if we're not dirty then don't update the database
            if (!this.IsDirty)
            {
                return;
            }

            OidPromocion = parent.Oid;

            try
            {
                ValidationRules.CheckRules();

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

                AlumnoPromocionRecord obj = parent.Session().Get <AlumnoPromocionRecord>(Oid);
                obj.CopyValues(this.Base.Record);
                parent.Session().Update(obj);
            }
            catch (Exception ex)
            {
                iQExceptionHandler.TreatException(ex);
            }

            MarkOld();
        }
예제 #2
0
        public virtual void CopyValues(AlumnoPromocionRecord source)
        {
            if (source == null)
            {
                return;
            }

            Oid            = source.Oid;
            _oid_promocion = source.OidPromocion;
            _oid_alumno    = source.OidAlumno;
        }