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