public HttpResponseMessage ObtenerCalificacionFinalEstandares(string NIT, string IdEval) { HttpResponseMessage response = null; try { LNEvaluacionStandMinimos logica = new LNEvaluacionStandMinimos(); int IdEvalInt = 0; if (int.TryParse(IdEval, out IdEvalInt)) { } var calificacion = logica.ObtenerCalificacionFinal(NIT, IdEvalInt); if (calificacion != null) { response = Request.CreateResponse <EDValoracionFinal>(HttpStatusCode.OK, calificacion); return(response); } else { response = Request.CreateResponse(HttpStatusCode.ExpectationFailed); return(response); } } catch (Exception ex) { response = Request.CreateResponse(HttpStatusCode.InternalServerError); return(response); } }
public HttpResponseMessage ObtenerCiclos(string NIT, string IdEval) { HttpResponseMessage response = null; try { LNEvaluacionStandMinimos logica = new LNEvaluacionStandMinimos(); int IdEvalInt = 0; if (int.TryParse(IdEval, out IdEvalInt)) { } var Ciclos = logica.ObtenerCiclos(NIT, IdEvalInt); if (Ciclos != null) { response = Request.CreateResponse(HttpStatusCode.OK, Ciclos); return(response); } else { response = Request.CreateResponse(HttpStatusCode.ExpectationFailed); return(response); } } catch (Exception ex) { response = Request.CreateResponse(HttpStatusCode.InternalServerError, ex); return(response); } }
public HttpResponseMessage ObtenerActividades(string NIT, int idEval) { HttpResponseMessage response = null; try { LNEvaluacionStandMinimos logica = new LNEvaluacionStandMinimos(); var actividades = logica.ObtenerActividades(NIT, idEval); if (actividades != null) { response = Request.CreateResponse(HttpStatusCode.OK, actividades); return(response); } else { response = Request.CreateResponse(HttpStatusCode.ExpectationFailed); return(response); } } catch (Exception ex) { response = Request.CreateResponse(HttpStatusCode.InternalServerError); return(response); } }
public HttpResponseMessage ObtenerCriterios(int idCiclo, string NIT, string IdEval) { HttpResponseMessage response = null; try { LNEvaluacionStandMinimos logica = new LNEvaluacionStandMinimos(); int IdEvalInt = 0; if (int.TryParse(IdEval, out IdEvalInt)) { } var Estandares = logica.ListaEstandarEditar(idCiclo, NIT, IdEvalInt); if (Estandares != null) { response = Request.CreateResponse(HttpStatusCode.OK, Estandares); return(response); } else { response = Request.CreateResponse(HttpStatusCode.ExpectationFailed); return(response); } } catch (Exception ex) { response = Request.CreateResponse(HttpStatusCode.InternalServerError); return(response); } }
public HttpResponseMessage ObtenerEvaluaciones(int Idempresa, int IdEval) { HttpResponseMessage response = null; try { LNEvaluacionStandMinimos logica = new LNEvaluacionStandMinimos(); var Estandares = logica.Evaluacion(Idempresa, IdEval); if (Estandares != null) { response = Request.CreateResponse(HttpStatusCode.OK, Estandares); return(response); } else { response = Request.CreateResponse(HttpStatusCode.ExpectationFailed); return(response); } } catch (Exception ex) { response = Request.CreateResponse(HttpStatusCode.InternalServerError); return(response); } }
public HttpResponseMessage ObtenerReporteActividadesExcel(string Nit, int Idval) { HttpResponseMessage response = null; try { LNEvaluacionStandMinimos logica = new LNEvaluacionStandMinimos(); var archivo = logica.ObtenerActividadesExcel(Nit, Idval); if (archivo != null) { response = Request.CreateResponse <byte[]>(HttpStatusCode.OK, archivo); return(response); } else { response = Request.CreateResponse(HttpStatusCode.ExpectationFailed); return(response); } } catch (Exception ex) { response = Request.CreateResponse(HttpStatusCode.InternalServerError); return(response); } }
public void GenerarExcelPlanAccionLogicaTest() { LNEvaluacionStandMinimos logica = new LNEvaluacionStandMinimos(); byte [] archivo = logica.ObtenerActividadesExcel("3", 1); Assert.IsNotNull(archivo, "La peticion fallo, el objeto es nulo"); Assert.IsTrue(archivo.Length > 0, "La peticion fallo, la lista de estandares esta vacia"); }
public HttpResponseMessage VerificarEstado(int Ideval) { try { var logica = new LNEvaluacionStandMinimos(); var Respuesta = logica.VerificarCambiarEstado(Ideval); var response = Request.CreateResponse(HttpStatusCode.OK, Respuesta); return(response); } catch (Exception ex) { var response = Request.CreateResponse(HttpStatusCode.InternalServerError); return(response); } }
public HttpResponseMessage ValidarEvaluacionCriterio(EDEvaluacionEmpresa EDEvaluacionEmpresa) { HttpResponseMessage response = null; try { LNEvaluacionStandMinimos logica = new LNEvaluacionStandMinimos(); var Respuesta = logica.verificarcriterio(EDEvaluacionEmpresa.Estado, EDEvaluacionEmpresa.Pk_Id_EvaluacionEmpresa); response = Request.CreateResponse(HttpStatusCode.OK, Respuesta); return(response); } catch (Exception ex) { response = Request.CreateResponse(HttpStatusCode.InternalServerError, ex); return(response); } }
public HttpResponseMessage EditarEvaluacionEstandares(EDEvaluacionEstandarMinimo EvaluacionEstandar) { HttpResponseMessage response = null; try { LNEvaluacionStandMinimos logica = new LNEvaluacionStandMinimos(); var result = logica.EditarEvaluacionEstandar(EvaluacionEstandar); response = Request.CreateResponse <EDCiclo>(HttpStatusCode.Created, result); return(response); } catch (Exception ex) { response = Request.CreateResponse(HttpStatusCode.InternalServerError); return(response); } }
public HttpResponseMessage CerrarEvaluacion(int idEval, int idempresa) { HttpResponseMessage response = null; try { LNEvaluacionStandMinimos logica = new LNEvaluacionStandMinimos(); var cerrado = logica.CerrarEvaluacion(idEval, idempresa); response = Request.CreateResponse(HttpStatusCode.OK, cerrado); return(response); } catch (Exception ex) { response = Request.CreateResponse(HttpStatusCode.InternalServerError); return(response); } }
public HttpResponseMessage EliminarEvaluacion(EDEvaluacionEmpresa EDEvaluacionEmpresa) { HttpResponseMessage response = null; try { LNEvaluacionStandMinimos logica = new LNEvaluacionStandMinimos(); var actividades = logica.EliminarEvaluacion(EDEvaluacionEmpresa); response = Request.CreateResponse(HttpStatusCode.OK, actividades); return(response); } catch (Exception ex) { response = Request.CreateResponse(HttpStatusCode.InternalServerError); return(response); } }
public void GuardarEvaluacionEstandaresLogicaTest() { EDEvaluacionEstandarMinimo eval = new EDEvaluacionEstandarMinimo { IdCriterio = 2, IdEmpresaEvaluar = 3, IdValoracionCriterio = 2, IdCiclo = 1, Justificacion = "No tiene", Actividades = CrearActividades() }; LNEvaluacionStandMinimos logica = new LNEvaluacionStandMinimos(); EDCiclo ciclo = logica.GuardarEvaluacionEstandar(eval); Assert.IsNotNull(ciclo, "La peticion fallo, el objeto es nulo"); Assert.IsTrue(ciclo.Id_Ciclo > 0, "La peticion fallo, la lista de estandares esta vacia"); }
public HttpResponseMessage ObtenerCriterioConsulta(int idCiclo, string NIT, string IdEval, int idElemento, bool tipo) { HttpResponseMessage response = null; try { LNEvaluacionStandMinimos logica = new LNEvaluacionStandMinimos(); int IdEvalInt = 0; if (int.TryParse(IdEval, out IdEvalInt)) { } EDCiclo EDCiclo = new EDCiclo(); if (tipo) { EDCiclo = logica.ObtenerEstandaresPorCicloConsulta1(idCiclo, NIT, IdEvalInt, idElemento); } else { EDCiclo = logica.ObtenerEstandaresPorCicloConsulta(idCiclo, NIT, IdEvalInt, idElemento); } if (EDCiclo != null) { response = Request.CreateResponse <EDCiclo>(HttpStatusCode.OK, EDCiclo); return(response); } else { response = Request.CreateResponse(HttpStatusCode.ExpectationFailed); return(response); } } catch (Exception ex) { response = Request.CreateResponse(HttpStatusCode.InternalServerError); return(response); } }
public HttpResponseMessage ObtenerEvaluaaciones(int IdEmpresa) { try { var logica = new LNEvaluacionStandMinimos(); var result = logica.ListaEvaluaciones(IdEmpresa); 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); } }