예제 #1
0
 public DraftReview CreateDraftReviewFromModel(Product product, Review origin)
 {
     return new DraftReview()
     {
         ReviewText = this.ReviewText,
         Product = product,
         OriginReview = origin
     };
 }
예제 #2
0
 /// <summary>
 /// Update a product's fields with this fields values
 /// </summary>
 /// <returns></returns>
 public void UpdateProduct(auRant.Core.Entities.Product produtoEditavel, ProductCategory category, PublicationStatus productStatus, Supplier supplier)
 {
     produtoEditavel.Name              = this.Name;
     produtoEditavel.Category          = category;
     produtoEditavel.PublicationStatus = productStatus;
     produtoEditavel.Price             = this.Price;
     produtoEditavel.Supplier          = supplier;
     produtoEditavel.urlImage          = this.urlImage;
     produtoEditavel.ShortDescription  = this.ShortDescription;
     produtoEditavel.FullDescription   = this.FullDescription;
 }
예제 #3
0
 /// <summary>
 /// Receives a product and set each field in ProductAdministrationModel
 /// </summary>
 /// <param name="product"></param>
 public ProductModel(auRant.Core.Entities.Product product)
 {
     this.ID               = product.ID;
     this.Name             = product.Name;
     this.CategoryId       = product.Category.ID;
     this.Price            = product.Price;
     this.CategoryName     = product.Category.Name;
     this.StatusId         = product.PublicationStatus.ID;
     this.StatusName       = product.PublicationStatus.Name;
     this.supplierId       = product.Supplier.ID;
     this.supplierName     = product.Supplier.Name;
     this.urlImage         = string.Concat(urlFolderImage, product.urlImage);
     this.ShortDescription = product.ShortDescription;
     this.FullDescription  = product.FullDescription;
 }
예제 #4
0
 public DraftProduct PopularDraftReviewFromModel(DraftProduct draft, ProductCategory category, Supplier supplier, Product origin)
 {
     draft.OriginalProduct = origin;
     draft.Category = category;
     draft.Supplier = supplier;
     draft.Name = this.Name;
     draft.Price = this.Price;
     draft.ShortDescription = this.ShortDescription;
     draft.urlImage = this.urlImage;
     draft.FullDescription = this.FullDescription;
     return draft;
 }
예제 #5
0
 public DraftProduct CreateDraftReviewFromModel(ProductCategory category, Supplier suplier, Product origin)
 {
     return new DraftProduct()
     {
         Category = category,
         FullDescription  = this.FullDescription,
         Supplier = suplier,
         Name = this.Name,
         Price = this.Price,
         ShortDescription = this.ShortDescription,
         urlImage = this.urlImage,
         OriginalProduct = origin
     };
 }
예제 #6
0
 public DraftReview PopularDraftReviewFromModel(DraftReview draft, Product product)
 {
     draft.Product = product;
     draft.ReviewText = this.ReviewText;
     return draft;
 }