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