コード例 #1
0
        internal void Update(Pregunta parent)
        {
            // if we're not dirty then don't update the database
            if (!this.IsDirty)
            {
                return;
            }

            OidPregunta = parent.Oid;

            try
            {
                ValidationRules.CheckRules();

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

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

            MarkOld();
        }
コード例 #2
0
        public virtual void CopyValues(RespuestaRecord source)
        {
            if (source == null)
            {
                return;
            }

            Oid               = source.Oid;
            _oid_pregunta     = source.OidPregunta;
            _texto            = source.Texto;
            _opcion           = source.Opcion;
            _correcta         = source.Correcta;
            _oid_old          = source.OidOld;
            _serial           = source.Serial;
            _codigo           = source.Codigo;
            _oid_pregunta_old = source.OidPreguntaOld;
        }