示例#1
0
        public ActionResult EnableOrDisable(int id)
        {
            if (!CheckPermission(ListsPermissions.ManageLists))
            {
                return(new HttpUnauthorizedResult());
            }

            var item = listItemService.GetById(id);

            item.Enabled = !item.Enabled;
            listItemService.Save(item);
            return(new AjaxResult().NotifyMessage("UPDATE_ENTITY_COMPLETE"));
        }