Beispiel #1
0
 public ProductModel(DraftProduct Draft, bool isDraft)
 {
     this.ID = Draft.ID;
     this.Name = Draft.Name;
     this.CategoryId = Draft.Category.ID;
     this.Price = Draft.Price;
     this.CategoryName = Draft.Category.Name;
     this.StatusId = Draft.PublicationStatus.ID;
     this.StatusName = Draft.PublicationStatus.Name;
     this.supplierId = Draft.Supplier.ID;
     this.supplierName = Draft.Supplier.Name;
     this.urlImage = string.Concat(urlFolderImage, Draft.urlImage);
     this.ShortDescription = Draft.ShortDescription;
     this.FullDescription = Draft.FullDescription;
     this.IsDraft = isDraft;
 }
Beispiel #2
0
 public ProductModel(DraftProduct draft)
 {
     ID = draft.ID;
     CategoryId = draft.Category.ID;
     CategoryName = draft.Category.Name;
     FullDescription = draft.FullDescription;
     supplierName = draft.Supplier.Name;
     supplierId = draft.Supplier.ID;
     Name = draft.Name;
     Price = draft.Price;
     ShortDescription = draft.ShortDescription;
     StatusId = draft.PublicationStatus.ID;
     StatusName = draft.PublicationStatus.Name;
     urlImage = string.Concat(urlFolderImage, draft.urlImage);
     IsDraft = true;
     IdOriginal = draft.OriginalProduct != null ? draft.OriginalProduct.ID : 0;
 }
Beispiel #3
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;
 }