/// <summary> /// Obtiene una lista filtrando por el estatus Activo = 1, Inactivo = 0 /// </summary> /// <returns></returns> internal IList <CostoPromedioInfo> ObtenerTodos(EstatusEnum estatus) { try { Logger.Info(); Dictionary <string, object> parameters = AuxCostoPromedioDAL.ObtenerTodos(estatus); DataSet ds = Retrieve("CostoPromedio_ObtenerTodos", parameters); IList <CostoPromedioInfo> result = null; if (ValidateDataSet(ds)) { result = MapCostoPromedioDAL.ObtenerTodos(ds); } return(result); } catch (SqlException ex) { Logger.Error(ex); throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex); } catch (DataException ex) { Logger.Error(ex); throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex); } catch (Exception ex) { Logger.Error(ex); throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex); } }
/// <summary> /// Obtiene una lista de CostoPromedio /// </summary> /// <returns></returns> internal IList <CostoPromedioInfo> ObtenerTodos() { try { Logger.Info(); DataSet ds = Retrieve("CostoPromedio_ObtenerTodos"); IList <CostoPromedioInfo> result = null; if (ValidateDataSet(ds)) { result = MapCostoPromedioDAL.ObtenerTodos(ds); } return(result); } catch (SqlException ex) { Logger.Error(ex); throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex); } catch (DataException ex) { Logger.Error(ex); throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex); } catch (Exception ex) { Logger.Error(ex); throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex); } }