Example #1
0
        public static SiteObj MagicMapper(this TblSite item)
        {
            if (item == null)
            {
                return(null);
            }

            SiteObj obj = new SiteObj
            {
                SiteId      = item.SiteId,
                TitleShortE = item.TitleShortE
            };

            return(obj);
        }
Example #2
0
        public override LEVELINFO VirtualLevelCalc(ALARMLEVEL[] alarmLevels, int rows)
        {
            LEVELINFO li  = SiteObj.LevelCalc(alarmLevels, rows, this);
            long      now = Time.DateTime2DbTime(DateTime.Now);
            long      N   = SiteObj.Records;

            if (0 == SiteObj.LastTime)
            {
                if (N > 1)
                {
                    SiteObj.LastTime = SiteObj.RainClickLists[N - 2].tm;
                }
            }
            if (li.level > 0)
            {
                if (now - SiteObj.LastTime > 24 * 3600 || li.level > m_pSectionObj.SectionAlarmLevel)
                {
                    VirtualLevelInfo = li;//save
                }
            }
            SiteObj.LastTime = now;

            return(li);
        }
Example #3
0
        public override bool DoCanLiftLevel(int level, int value, long tm)
        {
            bool b = SiteObj.DoCanLiftLevel(tm, level, value, ref m_pAutoLiftLevelInfo);

            return(b);
        }