public ActionResult Add(int id, string content) { try { if (id == 0) { footerRepository.Add(content); } else { Footer footer = new Footer(); footer.ID = id; footer.Contents = content; footerRepository.Edit(footer); } return(Json(new { IsSuccess = true, Message = "Lưu thành công" }, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(new { IsSuccess = false, Message = "Lưu thất bại" }, JsonRequestBehavior.AllowGet)); } }