Example #1
0
        public static void CheckDBVersion()
        {
            ApplicationSettingInfo dbVersion = ApplicationSettingInfo.Get(Settings.Default.DB_VERSION_VARIABLE);

            //Version de base de datos equivalente o no existe la variable
            if ((dbVersion.Value == string.Empty) ||
                (String.CompareOrdinal(dbVersion.Value, ModulePrincipal.GetDBVersion()) == 0))
            {
                return;
            }
            //Version de base de datos superior
            else if (String.CompareOrdinal(dbVersion.Value, ModulePrincipal.GetDBVersion()) > 0)
            {
                throw new iQException(String.Format(Library.Resources.Messages.DB_VERSION_HIGHER,
                                                    dbVersion.Value,
                                                    ModulePrincipal.GetDBVersion(),
                                                    Settings.Default.NAME),
                                      iQExceptionCode.DB_VERSION_MISSMATCH);
            }
            //Version de base de datos inferior
            else if (String.CompareOrdinal(dbVersion.Value, ModulePrincipal.GetDBVersion()) < 0)
            {
                throw new iQException(String.Format(Library.Resources.Messages.DB_VERSION_LOWER,
                                                    dbVersion.Value,
                                                    ModulePrincipal.GetDBVersion(),
                                                    Settings.Default.NAME),
                                      iQExceptionCode.DB_VERSION_MISSMATCH);
            }
        }
Example #2
0
        public static string GetCuentasMask()
        {
            string mask = string.Empty;

            try
            {
                for (int i = 1; i <= ModulePrincipal.GetNDigitosCuentasContablesSetting(); i++)
                {
                    mask += "0";
                }
            }
            catch { mask = string.Empty; }

            return(mask);
        }
Example #3
0
 public static void UpgradeSettings()
 {
     ModulePrincipal.UpgradeSettings();
 }