public JsonResult LoadData(int id, string status) { var data = ImageBus.List(id); if (!string.IsNullOrEmpty(status)) { var statusBool = bool.Parse(status); data = data.Where(x => x.Status == statusBool); } return(Json(new { data = data, status = true }, JsonRequestBehavior.AllowGet)); }
// GET: Product/Details/5 public ActionResult Details(int?id) { if (id == null) { return(Redirect("/")); } var product = ProductBus.Find(id); if (product == null) { return(Redirect("/")); } ViewBag.Images = ImageBus.List(id); return(View(ProductBus.Details(id))); }