public JsonResult GetProductHot(int StoreID) { string jsonData = "[]"; IProductHot _cls = new ProductHotBO(); var data = _cls.GetData(StoreID); if (data != null) jsonData = new JavaScriptSerializer().Serialize(data); return Json(jsonData, JsonRequestBehavior.AllowGet); }
public ActionResult CreateProductHot(int store, long id) { if (_session.IsLogin && _session.IsStore && _session.IsAdmin) { vw_ProductHot model = new vw_ProductHot(); ViewBag.ID = id; @ViewBag.StoreID = store; if (id != -1) { IProductHot cls = new ProductHotBO(); model = cls.GetData(id); } return View(model); } else return RedirectToAction("index", "admin"); }