示例#1
0
 /// <summary>
 /// Obtiene un lista paginada
 /// </summary>
 /// <param name="pagina"></param>
 /// <param name="filtro"></param>
 /// <returns></returns>
 public ResultadoInfo <MetodoPagoInfo> ObtenerPorPagina(PaginacionInfo pagina, MetodoPagoInfo filtro)
 {
     try
     {
         Dictionary <string, object> parameters = AuxMetodoPagoDAL.ObtenerParametrosPorPagina(pagina, filtro);
         DataSet ds = Retrieve("MetodoPago_ObtenerPorPagina", parameters);
         ResultadoInfo <MetodoPagoInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapMetodoPagoDAL.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>
 /// Obtiene una lista filtrando por el estatus Activo = 1, Inactivo = 0
 /// </summary>
 /// <returns></returns>
 public IList <MetodoPagoInfo> ObtenerTodos(EstatusEnum estatus)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxMetodoPagoDAL.ObtenerTodos(estatus);
         DataSet ds = Retrieve("MetodoPago_ObtenerTodos", parameters);
         IList <MetodoPagoInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapMetodoPagoDAL.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);
     }
 }
示例#3
0
 /// <summary>
 /// Obtiene un registro de MetodoPago
 /// </summary>
 /// <param name="descripcion">Descripción de la MetodoPago</param>
 /// <returns></returns>
 public MetodoPagoInfo ObtenerPorDescripcion(string descripcion)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxMetodoPagoDAL.ObtenerParametrosPorDescripcion(descripcion);
         DataSet        ds     = Retrieve("MetodoPago_ObtenerPorDescripcion", parameters);
         MetodoPagoInfo result = null;
         if (ValidateDataSet(ds))
         {
             result = MapMetodoPagoDAL.ObtenerPorDescripcion(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 MetodoPago
 /// </summary>
 /// <returns></returns>
 public IList <MetodoPagoInfo> ObtenerTodos()
 {
     try
     {
         Logger.Info();
         DataSet ds = Retrieve("MetodoPago_ObtenerTodos");
         IList <MetodoPagoInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapMetodoPagoDAL.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);
     }
 }