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