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