Esempio n. 1
0
        internal List <ChequeraInfo> ObtenerPorFiltro(ChequeraInfo info)
        {
            List <ChequeraInfo> result = null;

            try
            {
                Logger.Info();
                var parameters = AuxChequeraDAL.ObtenerParametros(info);

                DataSet ds = Retrieve("Chequera_ObtenerPorFiltro", parameters);
                if (ValidateDataSet(ds))
                {
                    result = MapChequeraDAL.ObtenerTodos(ds);
                }
            }
            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);
            }
            return(result);
        }
Esempio n. 2
0
 internal int ObtenerConsecutivo(int OrganizacionId)
 {
     try
     {
         int result = 0;
         Logger.Info();
         var parameters = AuxChequeraDAL.ObtenerParametrosConsecutivo(OrganizacionId);
         var ds         = Retrieve("Chequera_ObtenerConsecutivo", parameters);
         if (ValidateDataSet(ds))
         {
             result = MapChequeraDAL.ObtenerConsecutivo(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);
     }
 }