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