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