public HCRoomBlock GetObjectByKey(object keypair) { if (this.Contains(GetKey(keypair)) == false) { return(null); } HCRoomBlock ob = this[GetKey(keypair)]; return((HCRoomBlock)ob); }
public HCRoomBlock GetObjectByKey(long k_HCRmBlockID) { if (this.Contains(GetKey(k_HCRmBlockID)) == false) { return(null); } HCRoomBlock ob = this[GetKey(k_HCRmBlockID)]; return((HCRoomBlock)ob); }
public HCRoomBlock GetObjectByKey(KeyValuePair <string, long> keypair) { if (this.Contains(keypair) == false) { return(null); } HCRoomBlock ob = this[keypair]; return((HCRoomBlock)ob); }
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); }
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); }
public bool DeleteObject(HCRoomBlock item, LV.Core.DAL.Base.IRepository repository) { repository.Update(item); return(true); }
public bool AddObject(HCRoomBlock item, LV.Core.DAL.Base.IRepository repository) { repository.Add(item); return(true); }
protected override KeyValuePair <string, long> GetKeyForItem(HCRoomBlock item) { return(item.Key); }