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); }
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); }
public ItemModel UpdateItem([FromBody] ItemModel model) { _itemBusiness.Update(model); return(model); }
public ActionResult Update(Item item) { _itemBusiness.Update(item); return(RedirectToAction("Index")); }