public ActionResult Delete(int id, FormCollection collection) { LOGGER.Info("ProductController::Delete POST"); try { Product product = new Product { Id = Convert.ToInt32(collection["Id"]), Name = collection["Name"] }; productDao.DeleteProduct(product); TempData["msg"] = "Product deleted"; TempData["css"] = "success"; return(RedirectToAction("Index")); } catch (Exception e) { LOGGER.Error($"Error deleting product: {e}"); return(View()); } }
public void Delete(Guid id) { _productDao.DeleteProduct(id); }
public void DeleteProduct(string productName, string categoryName) { productDao.DeleteProduct(productName, categoryName); }
public string DeleteProduct(string productId) { _productDao.DeleteProduct(productId); return("Produsul a fost sters"); }
public bool DeleteProduct(Product p) { return(productDao.DeleteProduct(p)); }
public bool DeleteProduct(string productId) { return(productDao.DeleteProduct(productId)); }
public void DeleteProduct(int index, string categoryName) { productDao.DeleteProduct(index, categoryName); }
public void DeleteProduct(int id) { _productDao.DeleteProduct(id); }