From cd670d0404673efd095ae2baec1873b916c49c81 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sat, 21 Dec 2019 23:17:25 +0200 Subject: Implemented not existing deleted RML check for PPC update and error message. Added proper notification when trying to remove used RML onMS. --- .../Web/Tango.MachineService/Controllers/PPCController.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Controllers') diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs index ade8f88bc..1bb025217 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs @@ -330,6 +330,10 @@ namespace Tango.MachineService.Controllers var hardwareVersions = db.HardwareVersions.Select(x => new { x.Guid, x.LastUpdated }).ToList(); var catalogs = db.ColorCatalogs.Select(x => new { x.Guid, x.LastUpdated }).ToList(); + var arr = request.UsedRmlsGuids.ToArray(); + var existingRml = db.Rmls.Where(x => arr.Contains(x.Guid)).Select(x => x.Guid).Distinct().ToList(); + response.UsedNotExistingRmlsGuids = arr.Where(x => !existingRml.Exists(y => y == x)).ToList(); + bool hasDatabaseUpdates = false; hasDatabaseUpdates = machine.LastUpdated > request.MachineLastUpdated; -- cgit v1.3.1