예제 #1
0
 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());
     }
 }
예제 #2
0
 public void Delete(Guid id)
 {
     _productDao.DeleteProduct(id);
 }
예제 #3
0
 public void DeleteProduct(string productName, string categoryName)
 {
     productDao.DeleteProduct(productName, categoryName);
 }
예제 #4
0
 public string DeleteProduct(string productId)
 {
     _productDao.DeleteProduct(productId);
     return("Produsul a fost sters");
 }
예제 #5
0
 public bool DeleteProduct(Product p)
 {
     return(productDao.DeleteProduct(p));
 }
예제 #6
0
 public bool DeleteProduct(string productId)
 {
     return(productDao.DeleteProduct(productId));
 }
예제 #7
0
 public void DeleteProduct(int index, string categoryName)
 {
     productDao.DeleteProduct(index, categoryName);
 }
예제 #8
0
 public void DeleteProduct(int id)
 {
     _productDao.DeleteProduct(id);
 }