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")); }
public ActionResult GetProductImages(int productId) { ViewBag.ProductId = productId; return(View(objProductImageBO.GetImages(productId))); }
// GET: /Admin/ProductImage/ public ActionResult Index(int?id) { TempData["productId"] = id.Value; TempData.Keep(); return(View(objProductImageBO.GetImages(id.Value))); }