Пример #1
0
        /// <summary>
        ///     Obtiene una lista de Organizacion filtrando por el estatus Activo = 1, Inactivo = 0
        /// </summary>
        /// <returns></returns>
        internal List <VigilanciaInfo> ObtenerTodos(EstatusEnum estatus)
        {
            List <VigilanciaInfo> result = null;

            try
            {
                Logger.Info();
                Dictionary <string, object> parameters = AuxProductoVigilanciaDAL.ObtenerTodos(estatus);
                DataSet ds = Retrieve("[dbo].[Organizacion_ObtenerTodos]", parameters);
                if (ValidateDataSet(ds))
                {
                    result = MAPPlacasVigilanciaDAL.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);
        }
Пример #2
0
        /// <summary>
        ///     Obtiene una lista de todos los Organizaciones
        /// </summary>
        /// <returns></returns>
        internal List <VigilanciaInfo> ObtenerTodos()
        {
            List <VigilanciaInfo> result = null;

            try
            {
                Logger.Info();
                DataSet ds = Retrieve("f");
                if (ValidateDataSet(ds))
                {
                    result = MAPPlacasVigilanciaDAL.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);
        }