public static bool Delete( Guid guid, Guid deletedBy, string deletedFromIP) { Offer offer = new Offer(guid); DBOffer.AddOfferHistory( Guid.NewGuid(), offer.Guid, offer.StoreGuid, offer.IsVisible, offer.IsSpecial, offer.Created, offer.CreatedBy, offer.CreatedFromIP, offer.IsDeleted, offer.DeletedTime, offer.DeletedBy, offer.DeletedFromIP, offer.LastModified, offer.LastModifiedBy, offer.LastModifiedFromIP, DateTime.UtcNow, offer.TaxClassGuid, offer.Url); return(DBOffer.Delete( guid, DateTime.UtcNow, deletedBy, deletedFromIP)); }
private bool Update() { Offer offer = new Offer(this.guid); DBOffer.AddOfferHistory( Guid.NewGuid(), offer.Guid, offer.StoreGuid, offer.IsVisible, offer.IsSpecial, offer.Created, offer.CreatedBy, offer.CreatedFromIP, offer.IsDeleted, offer.DeletedTime, offer.DeletedBy, offer.DeletedFromIP, offer.LastModified, offer.LastModifiedBy, offer.LastModifiedFromIP, DateTime.UtcNow, offer.TaxClassGuid, offer.Url); bool result = DBOffer.Update( this.guid, this.isVisible, this.isSpecial, this.taxClassGuid, this.url, this.lastModified, this.lastModifiedBy, this.lastModifiedFromIP, this.isDonation, this.name, this.description, this.teaser, this.price, this.productListName, this.showDetailLink, this.userCanSetPrice, this.maxPerOrder, this.sortRank1, this.sortRank2, this.metaDescription, this.metaKeywords, this.compiledMeta); if (result) { ContentChangedEventArgs e = new ContentChangedEventArgs(); OnContentChanged(e); } return(result); }