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