Esempio n. 1
0
 public IActionResult AddRole(string name)
 {
     try
     {
         //_permissionRepository.AddRole(name, CompanyID);
         _permissionRepository.AddRole(name, 1);
         return(new JsonResult(new { result = 1, message = "添加角色成功" }));
     }
     catch (Exception exc)
     {
         _log.Log(NLog.LogLevel.Error, $"添加角色:{exc.Message}");
         return(new JsonResult(new { result = 0, message = $"添加角色:{exc.Message}" }));
     }
 }
 public bool AddRole(string rolename)
 {
     return(_permissionRepository.AddRole(rolename) > 0 ? true : false);
 }