/// <summary>
 /// Metodo para Guardar/Modificar una entidad IndicadorProductoBoleta
 /// </summary>
 /// <param name="info"></param>
 public int Guardar(IndicadorProductoBoletaInfo info)
 {
     try
     {
         Logger.Info();
         var indicadorProductoBoletaDAL = new IndicadorProductoBoletaDAL();
         int result = info.IndicadorProductoBoletaID;
         if (info.IndicadorProductoBoletaID == 0)
         {
             result = indicadorProductoBoletaDAL.Crear(info);
         }
         else
         {
             indicadorProductoBoletaDAL.Actualizar(info);
         }
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
 /// <summary>
 /// Obtiene un lista de IndicadorProductoBoleta
 /// </summary>
 /// <returns></returns>
 public IList <IndicadorProductoBoletaInfo> ObtenerTodos()
 {
     try
     {
         Logger.Info();
         var indicadorProductoBoletaDAL             = new IndicadorProductoBoletaDAL();
         IList <IndicadorProductoBoletaInfo> result = indicadorProductoBoletaDAL.ObtenerTodos();
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
 /// <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>
 public List <IndicadorProductoBoletaInfo> ObtenerPorProductoOrganizacion(int productoID, int organizacionID, EstatusEnum activo)
 {
     try
     {
         Logger.Info();
         var indicadorProductoBoletaDAL            = new IndicadorProductoBoletaDAL();
         List <IndicadorProductoBoletaInfo> result =
             indicadorProductoBoletaDAL.ObtenerPorProductoOrganizacion(productoID, organizacionID, activo);
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     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
     {
         Logger.Info();
         var indicadorProductoBoletaDAL = new IndicadorProductoBoletaDAL();
         ResultadoInfo <IndicadorProductoBoletaInfo> result = indicadorProductoBoletaDAL.ObtenerPorPagina(pagina,
                                                                                                          filtro);
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
 /// <summary>
 /// Obtiene una indicador producto boleta por
 /// indicador producto y organizacion
 /// </summary>
 /// <param name="indicadorProductoID"></param>
 /// <param name="organizacionID"></param>
 /// <returns></returns>
 public IndicadorProductoBoletaInfo ObtenerPorIndicadorProductoOrganizacion(int indicadorProductoID, int organizacionID)
 {
     try
     {
         Logger.Info();
         var indicadorProductoBoletaDAL     = new IndicadorProductoBoletaDAL();
         IndicadorProductoBoletaInfo result =
             indicadorProductoBoletaDAL.ObtenerPorIndicadorProductoOrganizacion(indicadorProductoID,
                                                                                organizacionID);
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }