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

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

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

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

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

                return(true);
            }

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

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

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

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