public void FromDto(ProductFileDTO dto) { if (dto == null) return; this.AvailableMinutes = dto.AvailableMinutes; this.Bvin = dto.Bvin; this.FileName = dto.FileName; this.LastUpdated = dto.LastUpdated; this.MaxDownloads = dto.MaxDownloads; this.ProductId = dto.ProductId; this.ShortDescription = dto.ShortDescription; this.StoreId = dto.StoreId; }
//DTO public ProductFileDTO ToDto() { ProductFileDTO dto = new ProductFileDTO(); dto.AvailableMinutes = this.AvailableMinutes; dto.Bvin = this.Bvin; dto.FileName = this.FileName; dto.LastUpdated = this.LastUpdated; dto.MaxDownloads = this.MaxDownloads; dto.ProductId = this.ProductId; dto.ShortDescription = this.ShortDescription; dto.StoreId = this.StoreId; return dto; }
public ApiResponse<ProductFileDTO> ProductFilesUpdate(ProductFileDTO item) { ApiResponse<ProductFileDTO> result = new ApiResponse<ProductFileDTO>(); result = RestHelper.PostRequest<ApiResponse<ProductFileDTO>>(this.fullApiUri + "productfiles/" + Enc(item.Bvin) + "?key=" + Enc(key), MerchantTribe.Web.Json.ObjectToJson(item)); return result; }