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