/// <summary> /// Obtiene un PrecioGanadoInfo por Id /// </summary> /// <param name="info"></param> /// <returns></returns> internal PrecioGanadoInfo ObtenerPorOrganizacionTipoGanado(PrecioGanadoInfo info) { PrecioGanadoInfo result = null; try { Logger.Info(); Dictionary <string, object> parameters = AuxPrecioGanadoDAL.ObtenerPorOrganizacionTipoGanado(info); DataSet ds = Retrieve("[dbo].[PrecioGanado_ObtenerPorOrganizacionTipoGanado]", parameters); if (ValidateDataSet(ds)) { result = MapPrecioGanadoDAL.ObtenerPorOrganizacionTipoGanado(ds); } } 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); } return(result); }
/// <summary> /// Obtiene un lista paginada /// </summary> /// <param name="pagina"></param> /// <param name="filtro"></param> /// <returns></returns> internal ResultadoInfo <PrecioGanadoInfo> ObtenerPorPagina(PaginacionInfo pagina, PrecioGanadoInfo filtro) { ResultadoInfo <PrecioGanadoInfo> precioGanadoLista = null; try { Dictionary <string, object> parameters = AuxPrecioGanadoDAL.ObtenerParametrosPorPagina(pagina, filtro); DataSet ds = Retrieve("PrecioGanado_ObtenerPorPagina", parameters); if (ValidateDataSet(ds)) { precioGanadoLista = MapPrecioGanadoDAL.ObtenerPorPagina(ds); } } 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); } return(precioGanadoLista); }
/// <summary> /// Obtiene una lista de PrecioGanados filtrando por el estatus Activo = 1, Inactivo = 0 /// </summary> /// <returns></returns> internal IList <PrecioGanadoInfo> ObtenerTodos(EstatusEnum estatus) { try { Logger.Info(); Dictionary <string, object> parameters = AuxPrecioGanadoDAL.ObtenerTodos(estatus); DataSet ds = Retrieve("PrecioGanado_ObtenerTodos", parameters); IList <PrecioGanadoInfo> result = null; if (ValidateDataSet(ds)) { result = MapPrecioGanadoDAL.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); } }