public ItemModel UpdateItem([FromBody] ItemModel model)
 {
     if (model.item_image != null)
     {
         var arrData = model.item_image.Split(';');
         if (arrData.Length == 3)
         {
             var savePath = $@"assets/images/{arrData[0]}";
             model.item_image = $"{savePath}";
             SaveFileFromBase64String(savePath, arrData[2]);
         }
     }
     _itemBusiness.Update(model);
     return(model);
 }
示例#2
0
        public IActionResult Put([FromBody] ItemVO itemVO)
        {
            if (itemVO == null)
            {
                return(BadRequest());
            }
            else
            {
                var updateItem = _itemBusiness.Update(itemVO);

                if (updateItem == null)
                {
                    return(BadRequest());
                }
                else
                {
                    return(new ObjectResult(updateItem));
                }
            }
        }
 public ProductModel UpdateItem([FromBody] ProductModel model)
 {
     _itemBusiness.Update(model);
     return(model);
 }
示例#4
0
 public ItemModel UpdateItem([FromBody] ItemModel model)
 {
     _itemBusiness.Update(model);
     return(model);
 }
示例#5
0
        public ActionResult Update(Item item)
        {
            _itemBusiness.Update(item);

            return(RedirectToAction("Index"));
        }