Example #1
0
        public DDI GetObjectByKey(object keypair)
        {
            if (this.Contains(GetKey(keypair)) == false)
            {
                return(null);
            }
            DDI ob = this[GetKey(keypair)];

            return((DDI)ob);
        }
Example #2
0
        public DDI GetObjectByKey(long k_DDIID)
        {
            if (this.Contains(GetKey(k_DDIID)) == false)
            {
                return(null);
            }
            DDI ob = this[GetKey(k_DDIID)];

            return((DDI)ob);
        }
Example #3
0
        public DDI GetObjectByKey(KeyValuePair <string, long> keypair)
        {
            if (this.Contains(keypair) == false)
            {
                return(null);
            }
            DDI ob = this[keypair];

            return((DDI)ob);
        }
Example #4
0
        public bool ChangeItem(KeyValuePair <string, long> keypair, DDI item)
        {
            DDI orig = this.GetObjectByKey(keypair);

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

                return(true);
            }

            return(false);
        }
Example #5
0
        public DDI GetObjectByKey(long k_DDIID, LV.Core.DAL.Base.IRepository repository)
        {
            if (this.Contains(GetKey(k_DDIID)) == false)
            {
                DDI ob = repository.GetQuery <DDI>().FirstOrDefault(o => o.DDIID == k_DDIID);
                if (ob != null)
                {
                    this.Add(ob);
                }
                return(ob);
            }
            DDI obj = this[GetKey(k_DDIID)];

            return((DDI)obj);
        }
Example #6
0
        public bool DeleteObject(DDI item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Update(item);

            return(true);
        }
Example #7
0
        public bool AddObject(DDI item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Add(item);

            return(true);
        }
Example #8
0
 protected override KeyValuePair <string, long> GetKeyForItem(DDI item)
 {
     return(item.Key);
 }