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