public IActionResult DeleteCartItem(int id) { try { var customer = JsonConvert.DeserializeObject <Models.Customer>(HttpContext.Session.GetString("CustomerSession")); // Debug.WriteLine("http:// Edit called"); CartItem.DeleteCartItem(_connection, id); Item.ItemRemovedFromCart(id, _connection); return(RedirectToAction("Index")); } catch (Exception e) { return(RedirectToAction("Index", "Customer1")); } }
public IActionResult AddItemToCirculationAgain(int id) { try { var customer = JsonConvert.DeserializeObject <Models.Customer>(HttpContext.Session.GetString("CustomerSession")); Debug.WriteLine("http:// Edit called"); // Item.EditItemDb(a, _connection); CartItem.DeleteCartItem(_connection, id); Item.ItemRemovedFromCart(id, _connection); return(RedirectToAction("ItemsInCart", "item1")); } catch (Exception e) { return(RedirectToAction("ItemsInCart", "item1")); } return(RedirectToAction("ItemsInCart", "item1")); }