Esempio n. 1
0
        /// <summary>
        /// A method to insert a new Adapter
        /// </summary>
        /// <param name="djs">An adapter entity with information about the new adapter</param>
        public void insert(List <Model.SlNoiseInfo> djs)
        {
            if (djs.Count <= 0)
            {
                return;
            }

            ISlNoise dal = SensorHub.DALFactory.SlNoise.Create();
            List <Model.SlNoiseInfo> list = new List <SlNoiseInfo>();

            foreach (Model.SlNoiseInfo dj in djs)
            {
                if (dal.queryCountByDevAndUpTime(dj.SRCID, dj.UPTIME) <= 0)
                {
                    list.Add(dj);
                }
            }
            if (list.Count > 0)
            {
                dal.insert(djs);
            }
        }