private void update_Item() { using (var updateForm = new Update_Product()) { var item = listViewInventory.FocusedItem.SubItems; updateForm.returnName = item[0].ToString(); var result = updateForm.ShowDialog(); } }
public async Task <IActionResult> Update_Product_In_List([FromBody] object update_request_json) { Update_Product updatelist_command = JsonConvert.DeserializeObject <Update_Product>(update_request_json.ToString()); bool ok = await _shoppingService.Add_Or_Update_Product_In_List( updatelist_command.NewProduct, User.FindFirstValue(ClaimTypes.NameIdentifier), updatelist_command.ShoppingListId); if (ok) { return(Ok()); } else { return(BadRequest("Update of item failed. Item not found.")); } }