public bool UserAdd(string userName, string password, string name) { try { _permissionRepository.AddUser(userName, password, name); return(true); } catch { return(false); } }
public IActionResult UserAdd(string userName, string password, string name) { try { // _permissionRepository.AddUser(userName, password, name, CompanyID); _permissionRepository.AddUser(userName, password, 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}" })); } }