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