diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-11-01 19:44:34 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-11-01 19:44:34 +0200 |
| commit | bab9f04ae0f251acdb759e72fb54d84d042c533e (patch) | |
| tree | 6df0d31b90ee7c9c7075c0f45c5fc6a09ab1b3ab /Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs | |
| parent | d2a95e54a3ae4fb7ff8b29bd85bb221cf3769a1f (diff) | |
| download | Tango-bab9f04ae0f251acdb759e72fb54d84d042c533e.tar.gz Tango-bab9f04ae0f251acdb759e72fb54d84d042c533e.zip | |
Added Ha Amma spool support via sites.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs index 4cf8f3da6..c23455fbd 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Data.Entity; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -86,6 +87,15 @@ namespace Tango.PPC.UI.Printing config.LubricationVolume = (int)rmlLubrication.LubricationLevel; } + var spoolTypeGuid = settings.SpoolTypeGuid; + var spoolType = await context.SpoolTypes.FirstOrDefaultAsync(x => x.Guid == spoolTypeGuid); + if (spoolType == null) + { + spoolType = await context.SpoolTypes.FirstOrDefaultAsync(x => x.Code == (int)BL.Enumerations.SpoolTypes.StandardSpool); + } + + job.SpoolType = spoolType; + handler = await _machineProvider.MachineOperator.Print(job, config); _notificationProvider.ReleaseGlobalBusyMessage(); } |
