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