/// <summary> /// Obtiene una indicador producto boleta por /// indicador producto y organizacion /// </summary> /// <param name="productoID"></param> /// <param name="organizacionID"></param> /// <param name="activo"></param> /// <returns></returns> internal List <IndicadorProductoBoletaInfo> ObtenerPorProductoOrganizacion(int productoID, int organizacionID, EstatusEnum activo) { try { Logger.Info(); var parameters = new Dictionary <string, object> { { "@ProductoID", productoID }, { "@OrganizacionID", organizacionID }, { "@Activo", activo.GetHashCode() } }; DataSet ds = Retrieve("IndicadorProductoBoleta_ObtenerPorProductoOrganizacion", parameters); List <IndicadorProductoBoletaInfo> result = null; if (ValidateDataSet(ds)) { result = MapIndicadorProductoBoletaDAL.ObtenerPorProductoOrganizacion(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 IndicadorProductoBoleta /// </summary> /// <returns></returns> public IList <IndicadorProductoBoletaInfo> ObtenerTodos() { try { Logger.Info(); DataSet ds = Retrieve("IndicadorProductoBoleta_ObtenerTodos"); IList <IndicadorProductoBoletaInfo> result = null; if (ValidateDataSet(ds)) { result = MapIndicadorProductoBoletaDAL.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 registro de IndicadorProductoBoleta /// </summary> /// <param name="indicadorProductoBoletaID">Identificador de la IndicadorProductoBoleta</param> /// <returns></returns> public IndicadorProductoBoletaInfo ObtenerPorID(int indicadorProductoBoletaID) { try { Logger.Info(); Dictionary <string, object> parameters = null; DataSet ds = Retrieve("IndicadorProductoBoleta_ObtenerPorID", parameters); IndicadorProductoBoletaInfo result = null; if (ValidateDataSet(ds)) { result = MapIndicadorProductoBoletaDAL.ObtenerPorID(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 <IndicadorProductoBoletaInfo> ObtenerPorPagina(PaginacionInfo pagina, IndicadorProductoBoletaInfo filtro) { try { var parameters = new Dictionary <string, object> { { "@Inicio", pagina.Inicio }, { "@Limite", pagina.Limite }, { "@Activo", filtro.Activo }, { "@IndicadorID", filtro.IndicadorProducto.IndicadorInfo.IndicadorId }, { "@ProductoID", filtro.IndicadorProducto.Producto.ProductoId } }; DataSet ds = Retrieve("IndicadorProductoBoleta_ObtenerPorPagina", parameters); ResultadoInfo <IndicadorProductoBoletaInfo> result = null; if (ValidateDataSet(ds)) { result = MapIndicadorProductoBoletaDAL.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); } }