public IHttpActionResult GetAllNombreEmpresas() { var manager = new TarifaManager(); _apiResponse = new ApiResponse { Data = manager.RetrieveAll().GroupBy(x => x.Operator).Select(group => group.First()), Message = "Proceso realizado" }; return(Ok(_apiResponse)); }
public IHttpActionResult UpdateTarifas() { try { var mng = new TarifaManager(); mng.UpdateTarifasAresep(); apiResp.Message = "Tarifas actualizadas."; return(Ok(apiResp)); } catch (BusinessException bex) { return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message))); } }
public IHttpActionResult GetOperadores() { try { var mng = new TarifaManager(); apiResp.Data = mng.RetrieveEmpresarios(); apiResp.Message = "Operadores"; return(Ok(apiResp)); } catch (BusinessException bex) { return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message))); } }
public IHttpActionResult GetTarifa(int id) { try { var mng = new TarifaManager(); apiResp.Data = mng.Retrieve(new Tarifa { RouteId = id }); apiResp.Message = "Tarifa"; return(Ok(apiResp)); } catch (BusinessException bex) { return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message))); } }