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