/// <summary> /// Metodo que obtiene un listado de indicadoresproducto por producto id /// </summary> /// <returns></returns> internal List <IndicadorProductoInfo> ObtenerPorProductoId(ProductoInfo productoInfo, EstatusEnum estatus) { try { Logger.Info(); var parameters = AuxIndicadorProductoDAL.ObtenerParametrosObtenerPorProductoId(productoInfo, estatus); var ds = Retrieve("IndicadorProducto_ObtenerPorProductoId", parameters); List <IndicadorProductoInfo> result = null; if (ValidateDataSet(ds)) { result = MapIndicadorProductoDAL.ObtenerPorProductoId(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 un indicador producto por clave /// de indicador y clave de producto /// </summary> /// <param name="indicadorProductoInfo"></param> /// <returns></returns> internal IndicadorProductoInfo ObtenerPorIndicadorProducto(IndicadorProductoInfo indicadorProductoInfo) { try { Logger.Info(); Dictionary <string, object> parameters = AuxIndicadorProductoDAL.ObtenerPorIndicadorProducto(indicadorProductoInfo); DataSet ds = Retrieve("IndicadorProducto_ObtenerPorIndicadorProducto", parameters); IndicadorProductoInfo result = null; if (ValidateDataSet(ds)) { result = MapIndicadorProductoDAL.ObtenerPorIndicadorProducto(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 IndicadorProducto /// </summary> /// <returns></returns> public IList <IndicadorProductoInfo> ObtenerTodos() { try { Logger.Info(); DataSet ds = Retrieve("IndicadorProducto_ObtenerTodos"); IList <IndicadorProductoInfo> result = null; if (ValidateDataSet(ds)) { result = MapIndicadorProductoDAL.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 filtrando por el estatus Activo = 1, Inactivo = 0 /// </summary> /// <returns></returns> public IList <IndicadorProductoInfo> ObtenerTodos(EstatusEnum estatus) { try { Logger.Info(); Dictionary <string, object> parameters = AuxIndicadorProductoDAL.ObtenerTodos(estatus); DataSet ds = Retrieve("IndicadorProducto_ObtenerTodos", parameters); IList <IndicadorProductoInfo> result = null; if (ValidateDataSet(ds)) { result = MapIndicadorProductoDAL.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 un lista paginada /// </summary> /// <param name="pagina"></param> /// <param name="filtro"></param> /// <returns></returns> public ResultadoInfo <IndicadorProductoInfo> ObtenerPorPagina(PaginacionInfo pagina, IndicadorProductoInfo filtro) { try { Dictionary <string, object> parameters = AuxIndicadorProductoDAL.ObtenerParametrosPorPagina(pagina, filtro); DataSet ds = Retrieve("IndicadorProducto_ObtenerPorPagina", parameters); ResultadoInfo <IndicadorProductoInfo> result = null; if (ValidateDataSet(ds)) { result = MapIndicadorProductoDAL.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); } }