Exemple #1
0
        public static bool SetVersion(int newVer, int?transCode = null)
        {
            int currVer = GetVersion();

            if (currVer >= 0)
            {
                if (newVer > currVer)
                {
                    return(ModelUtils.SetVersion(newVer, transCode));
                }
            }
            return(false);
        }
Exemple #2
0
 public static bool EnableVersionControl()
 {
     if (!ModelUtils.VersionControlTableExists())
     {
         if (ModelUtils.CreateVersionControlTable())
         {
             return(ModelUtils.SetVersion(0));
         }
         else
         {
             return(false);
         }
     }
     else
     {
         if (ModelUtils.GetVersion() == -1)
         {
             return(ModelUtils.SetVersion(0));
         }
     }
     return(true);
 }