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); } }
public static void UpgradeSettings() { ModulePrincipal.UpgradeSettings(); }