Example #1
0
 /// <summary>
 /// Metodo para Guardar/Modificar una entidad CausaPrecio
 /// </summary>
 /// <param name="info"></param>
 internal int Guardar(CausaPrecioInfo info)
 {
     try
     {
         Logger.Info();
         var causaPrecioDAL = new CausaPrecioDAL();
         int result         = info.CausaPrecioID;
         if (info.CausaPrecioID == 0)
         {
             result = causaPrecioDAL.Crear(info);
         }
         else
         {
             causaPrecioDAL.Actualizar(info);
         }
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
Example #2
0
 /// <summary>
 /// Obtiene un lista de CausaPrecio
 /// </summary>
 /// <returns></returns>
 internal IList <CausaPrecioInfo> ObtenerTodos()
 {
     try
     {
         Logger.Info();
         var causaPrecioDAL             = new CausaPrecioDAL();
         IList <CausaPrecioInfo> result = causaPrecioDAL.ObtenerTodos();
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
Example #3
0
 /// <summary>
 /// Obtiene un lista paginada
 /// </summary>
 /// <param name="pagina"></param>
 /// <param name="filtro"></param>
 /// <returns></returns>
 internal ResultadoInfo <CausaPrecioInfo> ObtenerPorPagina(PaginacionInfo pagina, CausaPrecioInfo filtro)
 {
     try
     {
         Logger.Info();
         var causaPrecioDAL = new CausaPrecioDAL();
         ResultadoInfo <CausaPrecioInfo> result = causaPrecioDAL.ObtenerPorPagina(pagina, filtro);
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
Example #4
0
 internal List <CausaPrecioInfo> ObtenerPorPrecioPorCausaSalida(int causa, int organizacionID)
 {
     try
     {
         Logger.Info();
         var causaPrecioDAL            = new CausaPrecioDAL();
         List <CausaPrecioInfo> result = causaPrecioDAL.ObtenerPorPrecioPorCausaSalida(causa, organizacionID);
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
Example #5
0
 /// <summary>
 /// Obtiene una entidad por los Filtros
 /// </summary>
 /// <param name="filtro"></param>
 /// <returns></returns>
 internal CausaPrecioInfo ObtenerPorCausaSalidaPrecioGanado(CausaPrecioInfo filtro)
 {
     try
     {
         Logger.Info();
         var             causaPrecioDAL = new CausaPrecioDAL();
         CausaPrecioInfo result         = causaPrecioDAL.ObtenerPorCausaSalidaPrecioGanado(filtro);
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
Example #6
0
 /// <summary>
 /// Obtiene una entidad CausaPrecio por su descripciĆ³n
 /// </summary>
 /// <param name="descripcion"></param>
 /// <returns></returns>
 internal CausaPrecioInfo ObtenerPorDescripcion(string descripcion)
 {
     try
     {
         Logger.Info();
         var             causaPrecioDAL = new CausaPrecioDAL();
         CausaPrecioInfo result         = causaPrecioDAL.ObtenerPorDescripcion(descripcion);
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }