public IList <PartidaModel> GetPartida() { IList <PartidaModel> searchResults = null; searchResults = new PartidaData().GetList(); if (searchResults.Count == 0) { var partidas = new PartidaService().GetPartidaFromSalesforce(); JObject jObject = JObject.Parse(partidas); IList <JToken> results = jObject["records"].Children().ToList(); searchResults = new List <PartidaModel>(); foreach (var result in results) { PartidaModel searchResult = result.ToObject <PartidaModel>(); searchResults.Add(searchResult); new PartidaData().Insert(searchResult); } } return(searchResults); }
public List <PartidaEntity> ListarPartida() { List <PartidaEntity> lstPartidaEntity = new List <PartidaEntity>(); try { objPartidaData = new PartidaData(); lstPartidaEntity = objPartidaData.Listar(); } catch (Exception ex) { throw ex; } return(lstPartidaEntity); }
public List <PresupuestoEntity> ListarPresupuesto(int?pnumAnio) { List <PresupuestoEntity> lstPresupuestoEntity = new List <PresupuestoEntity>(); try { objPartidaData = new PartidaData(); objPresupuestoData = new PresupuestoData(); lstPresupuestoEntity = objPresupuestoData.Listar(pnumAnio); } catch (Exception ex) { throw ex; } return(lstPresupuestoEntity); }