public void Publish(BasePublishableEntity draft, PublicationStatus status, Base.BaseEntity originalEntity = null) { if (((DraftProduct)draft).OriginalProduct == null) { ((DraftProduct)draft).OriginalProduct = new Product() { Category = this.Category, FullDescription = this.FullDescription, Supplier = this.Supplier, Name = this.Name, Price = this.Price, ShortDescription = this.ShortDescription, urlImage = this.urlImage, PublicationStatus = status }; } else { Product original = (Product)originalEntity; original.PublicationStatus = new Entities.PublicationStatus(); original.Supplier = this.Supplier; original.FullDescription = this.FullDescription; original.Category = this.Category; original.Name = this.Name; original.Price = this.Price; original.ShortDescription = this.ShortDescription; original.urlImage = this.urlImage; original.PublicationStatus = status; } }
public void Publish(BasePublishableEntity draft, PublicationStatus status, BaseEntity originalEntity = null) { if (((DraftTable)draft).OriginalTable == null) { ((DraftTable)draft).OriginalTable = new Table() { Name = this.Name, Capacity = this.Capacity, TableNumber = this.TableNumber, PublicationStatus = status, Password = this.Password }; } else { Table original = (Table)originalEntity; original.PublicationStatus = new Entities.PublicationStatus(); original.PublicationStatus = status; original.Name = this.Name; original.TableNumber = this.TableNumber; original.Capacity = this.Capacity; original.Password = this.Password; } }
public void CreateOriginal(Base.BaseEntity original) { if (original != null) { this.OriginalProduct = (Product)original; } }
public void CreateOriginal(BaseEntity original) { if (original != null) { this.OriginalTable = (Table)original; } }
public void Publish(BasePublishableEntity draft, PublicationStatus status, Base.BaseEntity originalEntity = null) { if (((ProdutoRascunho)draft).ProdutoOriginal == null) { ((ProdutoRascunho)draft).ProdutoOriginal = new Produto() { Category = this.CategoriaDoProduto, FullDescription = this.FullDescription, Manufactor = this.Fornecedor, Name = this.Name, Price = this.Price, ShortDescription = this.ShortDescription, urlImage = this.urlImage, PublicationStatus = status }; } else { Produto original = (Produto)originalEntity; original.PublicationStatus = new Entities.PublicationStatus(); original.Manufactor = this.Fornecedor; original.FullDescription = this.FullDescription; original.Category = this.CategoriaDoProduto; original.Name = this.Name; original.Price = this.Price; original.ShortDescription = this.ShortDescription; original.urlImage = this.urlImage; original.PublicationStatus = status; } }
public void CreateOriginal(Base.BaseEntity original) { if (original != null) { this.ProdutoOriginal = (Produto)original; } }
public void CreateOriginal(BaseEntity original) { if (original != null) { this.OriginReview = (Review)original; } }
public void Publish(BasePublishableEntity draft, PublicationStatus status, BaseEntity originalEntity = null) { if (((DraftReview)draft).OriginReview == null) { ((DraftReview)draft).OriginReview = new Review() { Product = this.Product, PublicationStatus = status, ReviewText = this.ReviewText }; } else { Review original = (Review)originalEntity; original.PublicationStatus = new Entities.PublicationStatus(); original.PublicationStatus = status; original.Product = this.Product; original.ReviewText = this.ReviewText; } }