/// <summary> /// Obtiene un lista paginada /// </summary> /// <param name="pagina"></param> /// <param name="filtro"></param> /// <returns></returns> public ResultadoInfo <DeteccionAnimalInfo> ObtenerPorPagina(PaginacionInfo pagina, DeteccionAnimalInfo filtro) { try { Dictionary <string, object> parameters = AuxDeteccionAnimalDAL.ObtenerParametrosPorPagina(pagina, filtro); DataSet ds = Retrieve("DeteccionAnimal_ObtenerPorPagina", parameters); ResultadoInfo <DeteccionAnimalInfo> result = null; if (ValidateDataSet(ds)) { result = MapDeteccionAnimalDAL.ObtenerPorPagina(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 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 por Animal Movimiento ID /// </summary> /// <param name="animalMovimientoID">id del animal movimiento</param> /// <returns></returns> public DeteccionAnimalInfo ObtenerPorAnimalMovimientoID(long animalMovimientoID) { try { Logger.Info(); Dictionary <string, object> parameters = AuxDeteccionAnimalDAL.ObtenerParametrosPorAnimalMovimientoID(animalMovimientoID); DataSet ds = Retrieve("DeteccionAnimal_ObtenerPorAnimalMovimientoID", parameters); DeteccionAnimalInfo result = null; if (ValidateDataSet(ds)) { result = MapDeteccionAnimalDAL.ObtenerPorAnimalMovimientoID(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); } }