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