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