public ActionResult EditForm(int?id) { var obj = new CardOptionItem(); if (id.HasValue) { obj = daiLyRepository.GetCardOptionDetail(id.Value); } else { } return(Json(new { data = obj, }, JsonRequestBehavior.AllowGet)); }
public ActionResult Action(CardOptionItem objSubmit) { if (objSubmit.id == 0) { objSubmit.isDeleted = 0; objSubmit.isShow = Convert.ToInt32(objSubmit.IsShowd); daiLyRepository.ActionCardOption(objSubmit); } else { objSubmit.isShow = Convert.ToInt32(objSubmit.IsShowd); daiLyRepository.ActionCardOption(objSubmit); } return(Json(new { Error = false }, JsonRequestBehavior.AllowGet)); }