예제 #1
0
 /// <summary>
 /// Obtiene un lista paginada
 /// </summary>
 /// <param name="pagina"></param>
 /// <param name="filtro"></param>
 /// <returns></returns>
 public ResultadoInfo <IndicadorObjetivoInfo> ObtenerPorPagina(PaginacionInfo pagina, IndicadorObjetivoInfo filtro)
 {
     try
     {
         Dictionary <string, object> parameters = AuxIndicadorObjetivoDAL.ObtenerParametrosPorPagina(pagina, filtro);
         DataSet ds = Retrieve("IndicadorObjetivo_ObtenerPorPagina", parameters);
         ResultadoInfo <IndicadorObjetivoInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapIndicadorObjetivoDAL.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);
     }
 }
예제 #2
0
 /// <summary>
 /// Metodo para Obtener el semaforo
 /// </summary>
 internal List <IndicadorObjetivoSemaforoInfo> ObtenerSemaforo(int pedidoID, int productoID, int organizacionID)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxIndicadorObjetivoDAL.ObtenerSemaforo(pedidoID, productoID, organizacionID);
         var ds = Retrieve("IndicadorObjetivo_ObtenerSemaforo", parameters);
         List <IndicadorObjetivoSemaforoInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapIndicadorObjetivoDAL.ObtenerSemaforo(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);
     }
 }
예제 #3
0
 /// <summary>
 /// Obtiene un registro de IndicadorObjetivo
 /// </summary>
 /// <param name="filtros">Descripción de la IndicadorObjetivo</param>
 /// <returns></returns>
 public IndicadorObjetivoInfo ObtenerPorFiltros(IndicadorObjetivoInfo filtros)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxIndicadorObjetivoDAL.ObtenerParametrosPorFiltros(filtros);
         DataSet ds = Retrieve("IndicadorObjetivo_ObtenerPorFiltros", parameters);
         IndicadorObjetivoInfo result = null;
         if (ValidateDataSet(ds))
         {
             result = MapIndicadorObjetivoDAL.ObtenerPorFiltros(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);
     }
 }
예제 #4
0
 /// <summary>
 /// Obtiene una lista de IndicadorObjetivo
 /// </summary>
 /// <returns></returns>
 public IList <IndicadorObjetivoInfo> ObtenerTodos()
 {
     try
     {
         Logger.Info();
         DataSet ds = Retrieve("IndicadorObjetivo_ObtenerTodos");
         IList <IndicadorObjetivoInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapIndicadorObjetivoDAL.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);
     }
 }