diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/MachineStudioUpdateService.svc.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/MachineStudioUpdateService.svc.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/MachineStudioUpdateService.svc.cs index 9ec234449..3320a86c7 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/MachineStudioUpdateService.svc.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/MachineStudioUpdateService.svc.cs @@ -67,6 +67,8 @@ namespace Tango.MachineStudio.UpdateService var latestVersion = db.MachineStudioVersions.ToList().OrderByDescending(x => Version.Parse(x.Version)).FirstOrDefault(); Version currentVersion = Version.Parse(request.Version); + bool isForcedUpdate = db.MachineStudioVersions.ToList().Exists(x => x.ForceUpdate && Version.Parse(x.Version) > currentVersion); + if (latestVersion != null && Version.Parse(latestVersion.Version) > currentVersion) { response.IsUpdateAvailable = true; @@ -76,7 +78,7 @@ namespace Tango.MachineStudio.UpdateService response.Password = ConfigurationManager.AppSettings["Password"].ToString(); response.FilePath = latestVersion.FtpFilePath; response.Version = latestVersion.Version; - response.ForcedUpdate = latestVersion.ForceUpdate; + response.ForcedUpdate = isForcedUpdate; } } else |
