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