public BodyRegion GetObjectByKey(object keypair) { if (this.Contains(GetKey(keypair)) == false) { return(null); } BodyRegion ob = this[GetKey(keypair)]; return((BodyRegion)ob); }
public BodyRegion GetObjectByKey(long k_BRegID) { if (this.Contains(GetKey(k_BRegID)) == false) { return(null); } BodyRegion ob = this[GetKey(k_BRegID)]; return((BodyRegion)ob); }
public BodyRegion GetObjectByKey(KeyValuePair <string, long> keypair) { if (this.Contains(keypair) == false) { return(null); } BodyRegion ob = this[keypair]; return((BodyRegion)ob); }
public bool ChangeItem(KeyValuePair <string, long> keypair, BodyRegion item) { BodyRegion orig = this.GetObjectByKey(keypair); if (orig != null) { int index = this.IndexOf(orig); this.SetItem(index, item); return(true); } return(false); }
public BodyRegion GetObjectByKey(long k_BRegID, LV.Core.DAL.Base.IRepository repository) { if (this.Contains(GetKey(k_BRegID)) == false) { BodyRegion ob = repository.GetQuery <BodyRegion>().FirstOrDefault(o => o.BRegID == k_BRegID); if (ob != null) { this.Add(ob); } return(ob); } BodyRegion obj = this[GetKey(k_BRegID)]; return((BodyRegion)obj); }
public bool DeleteObject(BodyRegion item, LV.Core.DAL.Base.IRepository repository) { repository.Update(item); return(true); }
public bool AddObject(BodyRegion item, LV.Core.DAL.Base.IRepository repository) { repository.Add(item); return(true); }
protected override KeyValuePair <string, long> GetKeyForItem(BodyRegion item) { return(item.Key); }