Пример #1
0
        public refSIPrefix GetObjectByKey(object keypair)
        {
            if (this.Contains(GetKey(keypair)) == false)
            {
                return(null);
            }
            refSIPrefix ob = this[GetKey(keypair)];

            return((refSIPrefix)ob);
        }
Пример #2
0
        public refSIPrefix GetObjectByKey(byte k_PrefID)
        {
            if (this.Contains(GetKey(k_PrefID)) == false)
            {
                return(null);
            }
            refSIPrefix ob = this[GetKey(k_PrefID)];

            return((refSIPrefix)ob);
        }
Пример #3
0
        public refSIPrefix GetObjectByKey(KeyValuePair <string, byte> keypair)
        {
            if (this.Contains(keypair) == false)
            {
                return(null);
            }
            refSIPrefix ob = this[keypair];

            return((refSIPrefix)ob);
        }
Пример #4
0
        public bool ChangeItem(KeyValuePair <string, byte> keypair, refSIPrefix item)
        {
            refSIPrefix orig = this.GetObjectByKey(keypair);

            if (orig != null)
            {
                int index = this.IndexOf(orig);
                this.SetItem(index, item);

                return(true);
            }

            return(false);
        }
Пример #5
0
        public refSIPrefix GetObjectByKey(byte k_PrefID, LV.Core.DAL.Base.IRepository repository)
        {
            if (this.Contains(GetKey(k_PrefID)) == false)
            {
                refSIPrefix ob = repository.GetQuery <refSIPrefix>().FirstOrDefault(o => o.PrefID == k_PrefID);
                if (ob != null)
                {
                    this.Add(ob);
                }
                return(ob);
            }
            refSIPrefix obj = this[GetKey(k_PrefID)];

            return((refSIPrefix)obj);
        }
Пример #6
0
        public bool DeleteObject(refSIPrefix item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Update(item);

            return(true);
        }
Пример #7
0
        public bool AddObject(refSIPrefix item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Add(item);

            return(true);
        }
Пример #8
0
 protected override KeyValuePair <string, byte> GetKeyForItem(refSIPrefix item)
 {
     return(item.Key);
 }