예제 #1
0
 /// <summary>
 /// Metodo para Crear un registro de IndicadorProducto
 /// </summary>
 /// <param name="info">Valores de la entidad que será creada</param>
 public int Crear(IndicadorProductoInfo info)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxIndicadorProductoDAL.ObtenerParametrosCrear(info);
         int result = Create("IndicadorProducto_Crear", parameters);
         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 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);
     }
 }
예제 #3
0
 /// <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);
     }
 }
예제 #4
0
 /// <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);
     }
 }
예제 #5
0
 /// <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);
     }
 }
예제 #6
0
 /// <summary>
 /// Metodo para actualizar un registro de IndicadorProducto
 /// </summary>
 /// <param name="info">Valores de la entidad que se actualizarán</param>
 public void Actualizar(IndicadorProductoInfo info)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxIndicadorProductoDAL.ObtenerParametrosActualizar(info);
         Update("IndicadorProducto_Actualizar", parameters);
     }
     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);
     }
 }