コード例 #1
0
ファイル: CausaPrecioDAL.cs プロジェクト: vijaydairyf/Prueba
 /// <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
     {
         Dictionary <string, object> parameters = AuxCausaPrecioDAL.ObtenerParametrosPorPagina(pagina, filtro);
         DataSet ds = Retrieve("CausaPrecio_ObtenerPorPagina", parameters);
         ResultadoInfo <CausaPrecioInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapCausaPrecioDAL.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
ファイル: CausaPrecioDAL.cs プロジェクト: vijaydairyf/Prueba
 internal List <CausaPrecioInfo> ObtenerPorPrecioPorCausaSalida(int causa, int organizacionID)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxCausaPrecioDAL.ObtenerPorPrecioPorCausaSalida(causa, organizacionID);
         DataSet ds = Retrieve("CausaPrecio_ObtenerPorCausaSalida", parameters);
         List <CausaPrecioInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapCausaPrecioDAL.ObtenerPorPrecioPorCausaSalida(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
ファイル: CausaPrecioDAL.cs プロジェクト: vijaydairyf/Prueba
 /// <summary>
 /// Obtiene una lista filtrando por el estatus Activo = 1, Inactivo = 0
 /// </summary>
 /// <returns></returns>
 internal IList <CausaPrecioInfo> ObtenerTodos(EstatusEnum estatus)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxCausaPrecioDAL.ObtenerTodos(estatus);
         DataSet ds = Retrieve("CausaPrecio_ObtenerTodos", parameters);
         IList <CausaPrecioInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapCausaPrecioDAL.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);
     }
 }
コード例 #4
0
ファイル: CausaPrecioDAL.cs プロジェクト: vijaydairyf/Prueba
 /// <summary>
 /// Obtiene una instancia de CausaPrecioInfo
 /// </summary>
 /// <param name="filtro"></param>
 /// <returns></returns>
 internal CausaPrecioInfo ObtenerPorCausaSalidaPrecioGanado(CausaPrecioInfo filtro)
 {
     try
     {
         Dictionary <string, object> parameters = AuxCausaPrecioDAL.ObtenerParametrosPorCausaSalidaPrecioGanado(filtro);
         DataSet         ds     = Retrieve("CausaPrecio_ObtenerPorCausaSalidaPrecioGanado", parameters);
         CausaPrecioInfo result = null;
         if (ValidateDataSet(ds))
         {
             result = MapCausaPrecioDAL.ObtenerPorCausaSalidaPrecioGanado(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
ファイル: CausaPrecioDAL.cs プロジェクト: vijaydairyf/Prueba
 /// <summary>
 /// Obtiene una lista de CausaPrecio
 /// </summary>
 /// <returns></returns>
 internal IList <CausaPrecioInfo> ObtenerTodos()
 {
     try
     {
         Logger.Info();
         DataSet ds = Retrieve("CausaPrecio_ObtenerTodos");
         IList <CausaPrecioInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapCausaPrecioDAL.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);
     }
 }