Пример #1
0
 /// <summary>
 /// Obtiene un lista paginada
 /// </summary>
 /// <param name="pagina"></param>
 /// <param name="filtro"></param>
 /// <returns></returns>
 internal ResultadoInfo <LoteReimplanteInfo> ObtenerPorPagina(PaginacionInfo pagina, LoteReimplanteInfo filtro)
 {
     try
     {
         Dictionary <string, object> parameters = AuxLoteReimplanteDAL.ObtenerParametrosPorPagina(pagina, filtro);
         DataSet ds = Retrieve("LoteReimplante_ObtenerPorPagina", parameters);
         ResultadoInfo <LoteReimplanteInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapLoteReimplanteDAL.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 de lotes reimplante
 /// </summary>
 /// <param name="organizacionId"> </param>
 /// <param name="lotes"></param>
 /// <returns></returns>
 internal IList <LoteReimplanteInfo> ObtenerPorLoteXML(int organizacionId, IList <LoteInfo> lotes)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxLoteReimplanteDAL.ObtenerParametrosPorLoteXML(
             organizacionId, lotes);
         var ds = Retrieve("LoteReimplante_ObtenerPorLoteXML", parameters);
         IList <LoteReimplanteInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapLoteReimplanteDAL.ObtenerPorloteXML(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 el lote reimplante por lote id
 /// </summary>
 /// <param name="lote"></param>
 /// <returns></returns>
 internal List <LoteReimplanteInfo> ObtenerListaPorLote(LoteInfo lote)
 {
     try
     {
         Logger.Info();
         var parameters = AuxLoteReimplanteDAL.ObtenerParametrosPorLote(lote);
         var ds         = Retrieve("LoteReimplante_ObtenerPorLote", parameters);
         List <LoteReimplanteInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapLoteReimplanteDAL.ObtenerListaPorlote(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 un registro de LoteReimplante
 /// </summary>
 /// <param name="descripcion">Descripción de la LoteReimplante</param>
 /// <returns></returns>
 internal LoteReimplanteInfo ObtenerPorDescripcion(string descripcion)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxLoteReimplanteDAL.ObtenerParametrosPorDescripcion(descripcion);
         DataSet            ds     = Retrieve("LoteReimplante_ObtenerPorDescripcion", parameters);
         LoteReimplanteInfo result = null;
         if (ValidateDataSet(ds))
         {
             result = MapLoteReimplanteDAL.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);
     }
 }
Пример #5
0
 /// <summary>
 /// Obtiene una lista filtrando por el estatus Activo = 1, Inactivo = 0
 /// </summary>
 /// <returns></returns>
 internal IList <LoteReimplanteInfo> ObtenerTodos(EstatusEnum estatus)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxLoteReimplanteDAL.ObtenerTodos(estatus);
         DataSet ds = Retrieve("LoteReimplante_ObtenerTodos", parameters);
         IList <LoteReimplanteInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapLoteReimplanteDAL.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);
     }
 }
Пример #6
0
 /// <summary>
 /// Obtiene una lista de LoteReimplante
 /// </summary>
 /// <returns></returns>
 internal IList <LoteReimplanteInfo> ObtenerTodos()
 {
     try
     {
         Logger.Info();
         DataSet ds = Retrieve("LoteReimplante_ObtenerTodos");
         IList <LoteReimplanteInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapLoteReimplanteDAL.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);
     }
 }