public HttpResponseMessage GuardarPlanAccionCorrectiva(List <EDPlanAccionCorrectiva> planescorrectivos) { try { var logica = new LNInspeccion(); var result = logica.GuardarPlanAccionCorrectiva(planescorrectivos); if (result != null) { var response = Request.CreateResponse <List <EDPlanAccionCorrectiva> >(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); } }
public HttpResponseMessage ObtenerTiposDePeligro() { try { var logica = new LNInspeccion(); var result = logica.ObtenerTiposDePeligro(); 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); } }
public HttpResponseMessage EditarCondicion(EDCondicionInsegura condicion) { try { var logica = new LNInspeccion(); var result = logica.EditarCondicion(condicion); if (result != null) { var response = Request.CreateResponse <EDCondicionInsegura>(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); } }
public HttpResponseMessage ConsultarInspeccionPorTipo(int idsede, string tipoInspeccion, DateTime?fechai, DateTime?fechaf, int NIT) { try { var logica = new LNInspeccion(); var result = logica.ObtenerInspecciones(idsede, tipoInspeccion, fechai, fechaf); 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); } }
public HttpResponseMessage GuardarPlanInspeccion(EDPlanInspeccion planinspeccion) { try { var logica = new LNInspeccion(); var result = logica.GuardarPlaneacion(planinspeccion); if (result != null) { var response = Request.CreateResponse <EDPlanInspeccion>(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); } }
public HttpResponseMessage ContinuarEjecutarPlan(int consecutivo, string responsable, string fecha, string describeinspeccion, int pkplan, int id) { try { var logica = new LNInspeccion(); var result = logica.ContinuarEjecucionPlan(consecutivo, responsable, fecha, describeinspeccion, pkplan, id); 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); } }
public HttpResponseMessage ObtenerInspeccionNoEjecutada(int Idinspeccion) { try { var logica = new LNInspeccion(); var result = logica.ObtenerConfiguracionesPorIns(Idinspeccion); 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); } }
public HttpResponseMessage EliminarPlaneacion(int IdPlaneacion) { try { var logica = new LNInspeccion(); var result = logica.EliminarPlaneacion(IdPlaneacion); 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); } }
public HttpResponseMessage ObtenerInspeccionNoEjecutada(int IdInspeccion, int IdPlaneacion, EDInformacionAuditoria edInfoauditoria) { try { var logica = new LNInspeccion(); var result = logica.EliminarInspeccion(IdInspeccion, IdPlaneacion, edInfoauditoria); 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); } }
public HttpResponseMessage EjecutarPlan(int ConsecutivoPlanVM, string responsable, string Fecha, string DescripcionTipoInspeccionse, int id) { try { var logica = new LNInspeccion(); var result = logica.EjecutarPlan(ConsecutivoPlanVM, responsable, Fecha, DescripcionTipoInspeccionse, id); 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); } }