예제 #1
0
        public ActionResult Index()
        {
            if (!DataSettingsHelper.DatabaseIsInstalled())
                return RedirectToRoute("Install");

            var model = new UpgradeModel();
            model.ApplicationVersion = GrandVersion.CurrentVersion;
            model.DatabaseVersion = _upgradeService.DatabaseVersion();

            return View(model);
        }
예제 #2
0
        public ActionResult Index(UpgradeModel m)
        {
            var model = new UpgradeModel();
            model.ApplicationVersion = GrandVersion.CurrentVersion;
            model.DatabaseVersion = _upgradeService.DatabaseVersion();

            if (model.ApplicationVersion != model.DatabaseVersion)
            {
                _upgradeService.UpgradeData(model.DatabaseVersion, model.ApplicationVersion);
            }
            model.ApplicationVersion = GrandVersion.CurrentVersion;
            model.DatabaseVersion = _upgradeService.DatabaseVersion();
            return View(model);
        }