Exemple #1
0
        public ActionResult EditFormRule(int?id)
        {
            var obj = new RuleEventItem();

            obj.GameID = 0;
            if (id.HasValue)
            {
                obj = gamePlayerRepository.GetDetailRuleEvent(id.Value);
            }
            return(Json(new
            {
                listGame = gamePlayerRepository.GetAllGame(),
                data = obj
            }, JsonRequestBehavior.AllowGet));
        }
Exemple #2
0
        public ActionResult ActionRuleEvent(RuleEventItem objSubmit)
        {
            if (objSubmit.ID == 0)
            {
                gamePlayerRepository.InsertRuleEvent(objSubmit);
            }
            else
            {
                gamePlayerRepository.UpdateRuleEvent(objSubmit);
            }

            return(Json(new
            {
                Error = false
            }, JsonRequestBehavior.AllowGet));
        }