Exemplo n.º 1
0
        public ActionResult AjaxForm()
        {
            var activeRole = new DN_Active();

            if (DoAction == ActionType.Edit)
            {
                activeRole = _dnActiveRoleDa.GetById(ArrId.FirstOrDefault());
            }

            ViewData.Model     = activeRole;
            ViewBag.Action     = DoAction;
            ViewBag.ActionText = ActionText;
            return(View());
        }
Exemplo n.º 2
0
        public ActionResult Update(string key, ActiveRoleItem activeRole)
        {
            if (key == Keyapi)
            {
                var obj = _dl.GetById(activeRole.ID);
                UpdateRole(obj, activeRole);
                _dl.Save();
                return(Json(1, JsonRequestBehavior.AllowGet));
            }

            return(Json(0, JsonRequestBehavior.AllowGet));
        }