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