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); }
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); }