Example #1
0
 public HttpResponseMessage MostrarArchivosPT(EDEstudioPuestoTrabajo estudio)
 {
     try
     {
         var logica = new LNEstudioPuestoTrabajo();
         var result = logica.ConsultarArchivosEstudio(estudio.IdEstudioPuestoTrabajo);
         if (result != null)
         {
             var response = Request.CreateResponse(HttpStatusCode.OK, result);
             return(response);
         }
         else
         {
             var response = Request.CreateResponse(HttpStatusCode.ExpectationFailed);
             return(response);
         }
     }
     catch (Exception ex)
     {
         var response = Request.CreateResponse(HttpStatusCode.InternalServerError);
         return(response);
     }
 }
Example #2
0
 public HttpResponseMessage GuardarEstudio(EDEstudioPuestoTrabajo estudio)
 {
     try
     {
         var logica = new LNEstudioPuestoTrabajo();
         var result = logica.GuardarEstudio(estudio);
         if (result != null)
         {
             var response = Request.CreateResponse(HttpStatusCode.Created, result);
             return(response);
         }
         else
         {
             var response = Request.CreateResponse(HttpStatusCode.ExpectationFailed);
             return(response);
         }
     }
     catch (Exception ex)
     {
         var response = Request.CreateResponse(HttpStatusCode.InternalServerError);
         return(response);
     }
 }
Example #3
0
 public HttpResponseMessage ConsultarEstudioXNumIden(EDEstudioPuestoTrabajo estudio)
 {
     try
     {
         var logica = new LNEstudioPuestoTrabajo();
         var result = logica.ConsultarEstudioPTXNumIden(estudio.NumeroIdentificacion);
         if (result != null)
         {
             var response = Request.CreateResponse(HttpStatusCode.OK, result);
             return(response);
         }
         else
         {
             var response = Request.CreateResponse(HttpStatusCode.ExpectationFailed);
             return(response);
         }
     }
     catch (Exception ex)
     {
         var response = Request.CreateResponse(HttpStatusCode.InternalServerError);
         return(response);
     }
 }