Beispiel #1
0
        /// <summary>
        /// Actualiza un registro en la base de datos
        /// </summary>
        /// <param name="parent">Objeto padre</param>
        internal void Update(Monitor 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;

            OidMonitor = parent.Oid;

            ValidationRules.CheckRules();

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

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

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

            MarkOld();
        }
Beispiel #2
0
        protected override void DataPortal_Update()
        {
            if (!IsDirty)
            {
                return;
            }

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

            obj.CopyValues(this.Base.Record);
            Session().Update(obj);
            MarkOld();
        }
Beispiel #3
0
        public virtual void CopyValues(MonitorLineRecord source)
        {
            if (source == null)
            {
                return;
            }

            Oid                 = source.Oid;
            _oid_monitor        = source.OidMonitor;
            _date               = source.Date;
            _component_ip       = source.ComponentIP;
            _component_interval = source.ComponentInterval;
            _component_status   = source.ComponentStatus;
            _status             = source.Status;
            _error_level        = source.ErrorLevel;
            _description        = source.Description;
        }
Beispiel #4
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(MonitorLines 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;
            MonitorLineRecord obj = Session().Get <MonitorLineRecord>(Oid);

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

            MarkOld();
        }