Esempio n. 1
0
 public IActionResult SwitchOpen(int id, bool isOpen)
 {
     if (id != 0)
     {
         var tag = _tagManager.LoadEntities(x => x.Id == id).FirstOrDefault();
         if (tag != null)
         {
             tag.IsOpen = isOpen;
             var result = _tagManager.EditEntity(tag);
             if (result)
             {
                 return(Json("成功"));
             }
         }
     }
     return(Json("失败"));
 }