Beispiel #1
0
        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));
        }
Beispiel #2
0
        // 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)));
        }