public static ProductViewModel ToModel(this RProduct product)
 {
     if (product == null)
     {
         return(null);
     }
     return(new ProductViewModel()
     {
     });
 }
 public static ProductSimpleViewModel ToSimpleModel(this RProduct product)
 {
     if (product == null)
     {
         return(null);
     }
     return(new ProductSimpleViewModel()
     {
         Status = product.Status,
         Id = product.Id,
         Name = product.Name,
         Type = product.Type,
         Code = product.Code,
     });
 }
 public static ProductGroupProductViewModel ToModel(this RProduct product, bool isAdd)
 {
     if (product == null)
     {
         return(null);
     }
     return(new ProductGroupProductViewModel()
     {
         Status = product.Status,
         Id = product.Id,
         Name = product.Name,
         Type = product.Type,
         Code = product.Code,
         IsAdd = isAdd
     });
 }
示例#4
0
 public Product(RProduct product)
 {
     Id                                   = product.Id;
     Type                                 = product.Type;
     ParentId                             = product.ParentId;
     Name                                 = product.Name;
     IsBaseProduct                        = product.IsBaseProduct;
     Images                               = product.Images;
     ShortDescription                     = product.ShortDescription;
     FullDescription                      = product.FullDescription;
     Status                               = product.Status;
     AllowCustomerReviews                 = product.AllowCustomerReviews;
     ManufacturerPartNumber               = product.ManufacturerPartNumber;
     Gtin                                 = product.Gtin;
     HasUserAgreement                     = product.HasUserAgreement;
     UserAgreementText                    = product.UserAgreementText;
     TaxCategoryId                        = product.TaxCategoryId;
     DisplayStockAvailability             = product.DisplayStockAvailability;
     DisplayStockQuantity                 = product.DisplayStockQuantity;
     AllowBackInStockSubscriptions        = product.AllowBackInStockSubscriptions;
     OrderMinimumQuantity                 = product.OrderMinimumQuantity;
     OrderMaximumQuantity                 = product.OrderMaximumQuantity;
     NotReturnable                        = product.NotReturnable;
     DisableBuyButton                     = product.DisableBuyButton;
     DisableWishlistButton                = product.DisableWishlistButton;
     AvailableForPreOrder                 = product.AvailableForPreOrder;
     PreOrderAvailabilityStartDateTimeUtc = product.PreOrderAvailabilityStartDateTimeUtc;
     Weight                               = product.Weight;
     Length                               = product.Length;
     Width                                = product.Width;
     Height                               = product.Height;
     SerialRequired                       = product.SerialRequired;
     InstallRequired                      = product.InstallRequired;
     AvailableStartDateTimeUtc            = product.AvailableStartDateTimeUtc;
     AvailableEndDateTimeUtc              = product.AvailableEndDateTimeUtc;
     ProductUnit                          = product.ProductUnit;
     QtyPerUnit                           = product.QtyPerUnit;
     DisplayOption                        = product.DisplayOption;
     Version                              = product.Version;
     SeoInfo                              = product.SeoInfo;
     UpdatedDateUtc                       = product.UpdatedDateUtc;
     CreatedDateUtc                       = product.CreatedDateUtc;
     CreatedUid                           = product.CreatedUid;
     UpdatedDateUtc                       = product.UpdatedDateUtc;
 }