public HttpResponseMessage PutStatePermissions(string PermissionsId, bool State)
 {
     try
     {
         DbLibrary            dbLibrary           = new DbLibrary();
         BO_SystemPermissions boSystemPermissions = new BO_SystemPermissions(dbLibrary);
         DataMessage          dataMessage         = new DataMessage(boSystemPermissions.ChangeState(PermissionsId, State));
         return(Request.CreateResponse(HttpStatusCode.OK, dataMessage));
     }
     catch (Exception e)
     {
         ErrorMessage mensaje = new ErrorMessage("2.1", "Excepción en el cambio de estado del Permissions: " + e.GetBaseException().Message, e.ToString());
         return(Request.CreateResponse(HttpStatusCode.BadRequest, mensaje));
     }
 }
 public HttpResponseMessage GetPermissions()
 {
     try
     {
         DbLibrary            dbLibrary           = new DbLibrary();
         BO_SystemPermissions boSystemPermissions = new BO_SystemPermissions(dbLibrary);
         DataMessage          dataMessage         = new DataMessage(boSystemPermissions.GetAll());
         return(Request.CreateResponse(HttpStatusCode.OK, dataMessage));
     }
     catch (Exception e)
     {
         ErrorMessage mensaje = new ErrorMessage("2.1", "Excepción en la obtención del listado de permisos: " + e.GetBaseException().Message, e.ToString());
         return(Request.CreateResponse(HttpStatusCode.BadRequest, mensaje));
     }
 }
 public HttpResponseMessage Put([FromBody] SystemPermissions systemPermissions)
 {
     try
     {
         DbLibrary            dbLibrary           = new DbLibrary();
         BO_SystemPermissions boSystemPermissions = new BO_SystemPermissions(dbLibrary);
         DataMessage          dataMessage         = new DataMessage(boSystemPermissions.Update(systemPermissions));
         return(Request.CreateResponse(HttpStatusCode.OK, dataMessage));
     }
     catch (Exception e)
     {
         ErrorMessage mensaje = new ErrorMessage("2.1", "Excepción en la actualización del Permissions: " + e.GetBaseException().Message, e.ToString());
         return(Request.CreateResponse(HttpStatusCode.BadRequest, mensaje));
     }
 }