예제 #1
0
        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));
        }
예제 #2
0
        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));
        }