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