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