public void UpdateProduct(tblProduct product)
        {
            _productRepository.Update(a => a.Id == product.Id, product);

            product.tblProductDocument = _productDocumentService.GetProductDocument(product.Id);

            SyncSingleProductDocument(product);
        }
示例#2
0
        public ActionResult DownloadDocument(int id)
        {
            tblProductDocument productDocument = _productDocumentService.GetProductDocument(id);

            byte[] fileBytes = productDocument.DocumentContent;
            string fileName  = _urlFileService.GetFileName(productDocument.tblProduct.Url);

            return(File(fileBytes, System.Net.Mime.MediaTypeNames.Application.Octet, fileName));
        }