Example #1
0
        protected override void DataPortal_Update()
        {
            if (!IsDirty)
            {
                return;
            }

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

            obj.CopyValues(this._base.Record);
            Session().Update(obj);
            MarkOld();
        }
Example #2
0
        public virtual void CopyValues(RegistryRecord source)
        {
            if (source == null)
            {
                return;
            }

            Oid               = source.Oid;
            _oid_usuario      = source.OidUsuario;
            _tipo_registro    = source.TipoRegistro;
            _serial           = source.Serial;
            _codigo           = source.Codigo;
            _estado           = source.Estado;
            _nombre           = source.Nombre;
            _fecha            = source.Fecha;
            _observaciones    = source.Observaciones;
            _tipo_exportacion = source.TipoExportacion;
        }
Example #3
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(Registries 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;
            RegistryRecord obj = Session().Get <RegistryRecord>(Oid);

            obj.CopyValues(this._base.Record);
            Session().Update(obj);

            MarkOld();
        }