Пример #1
0
 /// <summary>
 /// Obtiene un lista paginada
 /// </summary>
 /// <param name="pagina"></param>
 /// <param name="filtro"></param>
 /// <returns></returns>
 internal ResultadoInfo <CheckListCorralInfo> ObtenerPorPagina(PaginacionInfo pagina, CheckListCorralInfo filtro)
 {
     try
     {
         Dictionary <string, object> parameters = AuxCheckListCorralDAL.ObtenerParametrosPorPagina(pagina, filtro);
         DataSet ds = Retrieve("CheckListCorral_ObtenerPorPagina", parameters);
         ResultadoInfo <CheckListCorralInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapCheckListCorralDAL.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 un registro de CheckListCorral
 /// </summary>
 /// <param name="filtro">identificador del Lote</param>
 /// <returns></returns>
 internal LoteProyeccionInfo GenerarProyeccion(CheckListCorralInfo filtro)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxCheckListCorralDAL.ObtenerParametrosGenerarProyeccion(filtro);
         DataSet            ds     = Retrieve("GenerarProyeccion", parameters);
         LoteProyeccionInfo result = null;
         if (ValidateDataSet(ds))
         {
             result = MapCheckListCorralDAL.GenerarProyeccion(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 una lista filtrando por el estatus Activo = 1, Inactivo = 0
 /// </summary>
 /// <returns></returns>
 internal IList <CheckListCorralInfo> ObtenerTodos(EstatusEnum estatus)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxCheckListCorralDAL.ObtenerTodos(estatus);
         DataSet ds = Retrieve("CheckListCorral_ObtenerTodos", parameters);
         IList <CheckListCorralInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapCheckListCorralDAL.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
 /// <summary>
 /// Obtiene un registro de CheckListCorral
 /// </summary>
 /// <param name="loteID">identificador del Lote</param>
 /// <param name="organizacionID">identificador de la Organización</param>
 /// <returns></returns>
 internal CheckListCorralInfo ObtenerPorLote(int organizacionID, int loteID)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxCheckListCorralDAL.ObtenerParametrosPorLote(organizacionID, loteID);
         DataSet             ds     = Retrieve("CheckListCorral_ObtenerCheckListPorLote", parameters);
         CheckListCorralInfo result = null;
         if (ValidateDataSet(ds))
         {
             result = MapCheckListCorralDAL.ObtenerPorLote(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 de CheckListCorral
 /// </summary>
 /// <returns></returns>
 internal IList <CheckListCorralInfo> ObtenerTodos()
 {
     try
     {
         Logger.Info();
         DataSet ds = Retrieve("CheckListCorral_ObtenerTodos");
         IList <CheckListCorralInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapCheckListCorralDAL.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);
     }
 }