private string NameCentroCosto(int centroCosto)
        {
            string name           = string.Empty;
            var    centroCostoTMP = centroCostoService.GetSingle(cc => cc.CC_ID_CENTRO_COSTO == centroCosto);

            if (centroCostoTMP != null)
            {
                name = $"{centroCostoTMP.CC_CENTRO_COSTO}-{centroCostoTMP.CC_NOMBRE}";
            }
            return(name);
        }
Beispiel #2
0
        public IHttpActionResult Get(int id)
        {
            var model = service.GetSingle(c => c.CC_ID_CENTRO_COSTO == id);

            if (model != null)
            {
                return(Ok(model));
            }
            return(NotFound());
        }