Ejemplo n.º 1
0
 public IActionResult AddEmployeeToSystem(int employee_id, int system_id)
 {
     try
     {
         var result = _service.AddEmployee(employee_id, system_id);
         if (result.Contains("Successfully"))
         {
             return(Ok(result));
         }
         return(BadRequest(result));
     }
     catch (System.Exception e)
     {
         try { _logService.SendLogError(e); } catch (System.Exception ex) { return(StatusCode(503, ex.Message)); }
         return(StatusCode(503, e));
     }
 }