Beispiel #1
0
        public string GetVersion()
        {
            DataConfigs dataConfigs = new DataConfigs();
            string      valor       = "";

            try
            {
                valor = dataConfigs.GetConfig(1);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(valor);
        }
Beispiel #2
0
 public string GetHoraFinRango()
 {
     dataConfigs = new DataConfigs();
     try
     {
         return(dataConfigs.GetConfig(9));
     }
     catch (AppException appex)
     {
         throw appex;
     }
     catch (Exception ex)
     {
         throw new AppException("Error desconocido durante la consulta de configuraciones", "Fatal", ex);
     }
 }
Beispiel #3
0
        public bool GetEstadoRutinaRegs()
        {
            dataConfigs = new DataConfigs();
            bool valor = false;

            try
            {
                if (!Boolean.TryParse(dataConfigs.GetConfig(4), out valor))
                {
                    throw new AppException("Error al intentar convertir los tipos de datos");
                }
            }
            catch (AppException appex)
            {
                throw appex;
            }
            catch (Exception ex)
            {
                throw new AppException("Error no controlado al verificar el archivo de configuraciones", "Fatal", ex);
            }
            return(valor);
        }
Beispiel #4
0
        public bool GetEstadoRango()
        {
            dataConfigs = new DataConfigs();
            bool valor = false;

            try
            {
                if (!Boolean.TryParse(dataConfigs.GetConfig(10), out valor))
                {
                    throw new AppException("Error al intentar convertir los tipos de datos");
                }
            }
            catch (AppException appex)
            {
                throw appex;
            }
            catch (Exception ex)
            {
                throw new AppException("Error desconocido durante la consulta de configuraciones", "Fatal", ex);
            }
            return(valor);
        }
Beispiel #5
0
        public bool IsEmpleados()
        {
            dataConfigs = new DataConfigs();
            string valor;
            bool   parse;

            try
            {
                valor = dataConfigs.GetConfig(10);
                if (!bool.TryParse(valor, out parse))
                {
                    throw new AppException("Error al intentar convertir el valor de la configuración.");
                }
            }
            catch (AppException appex)
            {
                throw appex;
            }
            catch (Exception ex)
            {
                throw new AppException("Error no controlado al intentar consultar la configuración.", "Fatal", ex);
            }
            return(parse);
        }