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