public bool CrearPeriodosAnteriores(ICPruebaEntities iCPrueba) { try { iCPrueba.usp_LimpiarCargas(); foreach (var periodo in PeriodosFaltantesCosto()) { iCPrueba.usp_PeriodosAnterioresCostoROM(periodo.Month, periodo.Year); } foreach (var periodo in PeriodosFaltantesIngreso()) { iCPrueba.usp_PeriodosAnterioresIngresoROM(periodo.Month, periodo.Year); } return(true); } catch { return(false); } }