Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            objProductImageBO.DeleteImage(id);
            int productId = Convert.ToInt32(TempData["productId"]);

            return(RedirectToAction("Index", new { id = productId }));
        }
Beispiel #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            List <ProductImage> lstProductImage = objProductImageBO.GetImages(id);

            foreach (ProductImage p in lstProductImage)
            {
                objProductImageBO.DeleteImage(p.PKImageId);
            }
            objProductBO.DeleteProduct(id);
            return(RedirectToAction("Index"));
        }