/// <summary> /// Obtiene una lista filtrando por el estatus Activo = 1, Inactivo = 0 /// </summary> /// <returns></returns> public IList <DeteccionAnimalInfo> ObtenerTodos(EstatusEnum estatus) { try { Logger.Info(); Dictionary <string, object> parameters = AuxDeteccionAnimalDAL.ObtenerTodos(estatus); DataSet ds = Retrieve("DeteccionAnimal_ObtenerTodos", parameters); IList <DeteccionAnimalInfo> result = null; if (ValidateDataSet(ds)) { result = MapDeteccionAnimalDAL.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 DeteccionAnimal /// </summary> /// <returns></returns> public IList <DeteccionAnimalInfo> ObtenerTodos() { try { Logger.Info(); DataSet ds = Retrieve("DeteccionAnimal_ObtenerTodos"); IList <DeteccionAnimalInfo> result = null; if (ValidateDataSet(ds)) { result = MapDeteccionAnimalDAL.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); } }