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