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