aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.BL
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2023-05-02 17:24:55 +0300
committerRoy <Roy.mail.net@gmail.com>2023-05-02 17:24:55 +0300
commita42e9713125bc9675b2978031244918c11c6e956 (patch)
tree1cc11cd6bdd284e1884b3c4d420bd6a0fb3d865a /Software/Visual_Studio/Tango.BL
parentbcec28b0d2d80d26513b0415519f26d83f25c51c (diff)
downloadTango-a42e9713125bc9675b2978031244918c11c6e956.tar.gz
Tango-a42e9713125bc9675b2978031244918c11c6e956.zip
Eureka Added more baud rates + some bug fixes.
Diffstat (limited to 'Software/Visual_Studio/Tango.BL')
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Machine.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Machine.cs b/Software/Visual_Studio/Tango.BL/Entities/Machine.cs
index 4e998bdc9..01e17cfde 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Machine.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Machine.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations.Schema;
+using System.Data.Entity;
using System.Linq;
using System.Reflection;
using System.Text;
@@ -176,5 +177,24 @@ namespace Tango.BL.Entities
{
}
+
+ public async Task<ObservableCollection<SpoolType>> GetSiteSpoolTypes(ObservablesContext db)
+ {
+ ObservableCollection<SpoolType> spoolTypes = new ObservableCollection<SpoolType>();
+
+ spoolTypes = (await db.SitesSpoolTypes.Where(x => x.SiteGuid == SiteGuid).Include(x => x.SpoolType).Select(x => x.SpoolType).ToListAsync()).OrderBy(x => x.LastUpdated).ToObservableCollection();
+
+ if (spoolTypes.Count == 0)
+ {
+ spoolTypes = new ObservableCollection<SpoolType>();
+ var standardSpool = await db.SpoolTypes.FirstOrDefaultAsync(x => x.Code == (int)BL.Enumerations.SpoolTypes.StandardSpool);
+ if (standardSpool != null)
+ {
+ spoolTypes.Add(standardSpool);
+ }
+ }
+
+ return spoolTypes;
+ }
}
}