public ActionResult ActionDaiLyShow(DaiLyShowItem obj) { try { if (obj.ID > 0) { gamePlayerRepository.UpdatetDaiLyShow(obj); } else { gamePlayerRepository.InserUpdatetDaiLyShow(obj); } return(Json(new { Error = false, msg = "Đã cập nhật thành công" }, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(new { Error = true, msg = "Đã có lỗi xẩy ra" }, JsonRequestBehavior.AllowGet)); } }
public ActionResult EditFormDaiLyShow(int?id) { var obj = new DaiLyShowItem(); obj.IsShow = true; if (id.HasValue) { obj = gamePlayerRepository.GetDaiLyShowByID(id.Value); } return(Json(new { data = obj }, JsonRequestBehavior.AllowGet)); }