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

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

            obj.CopyValues(Base.Record);
            Session().Update(obj);
            MarkOld();
        }
예제 #2
0
        public virtual void CopyValues(MonitorRecord source)
        {
            if (source == null)
            {
                return;
            }

            Oid                 = source.Oid;
            _status             = source.Status;
            _component_type     = source.ComponentType;
            _component_serial   = source.ComponentSerial;
            _component_name     = source.ComponentName;
            _component_ip       = source.ComponentIP;
            _component_interval = source.ComponentInterval;
            _component_status   = source.ComponentStatus;
            _error_type         = source.ErrorType;
            _error_level        = source.ErrorLevel;
            _description        = source.Description;
            _last_update        = source.LastUpdate;
            _error_count        = source.ErrorCount;
            _warning_count      = source.WarningCount;
            _notify             = source.Notify;
        }
예제 #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(Monitors 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;
            MonitorRecord obj = Session().Get <MonitorRecord>(Oid);

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

            MarkOld();
        }