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