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