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