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