aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.BL/Builders
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2022-01-19 16:00:37 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2022-01-19 16:00:37 +0200
commitafdaadac0ddb76b5e905ef5eeda581ade4324f9b (patch)
treee19d3781fd639c721c8d40e9fa05886c1eb4b811 /Software/Visual_Studio/Tango.BL/Builders
parent981d893bcdd17e95f94859cb20cf413da6818df4 (diff)
downloadTango-afdaadac0ddb76b5e905ef5eeda581ade4324f9b.tar.gz
Tango-afdaadac0ddb76b5e905ef5eeda581ade4324f9b.zip
#5831 RML extension- Color shade window
Diffstat (limited to 'Software/Visual_Studio/Tango.BL/Builders')
-rw-r--r--Software/Visual_Studio/Tango.BL/Builders/RMLExtensionColorShadeBuilder.cs61
1 files changed, 61 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionColorShadeBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionColorShadeBuilder.cs
new file mode 100644
index 000000000..0f1894b4a
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionColorShadeBuilder.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Entities;
+using System.Data.Entity;
+
+namespace Tango.BL.Builders
+{
+ public class RMLExtensionColorShadeBuilder : EntityCollectionBuilderBase<RmlExtensionColorShade, RMLExtensionColorShadeBuilder>
+ {
+ public RMLExtensionColorShadeBuilder(ObservablesContext context) : base(context)
+ {
+ }
+
+ public virtual RMLExtensionColorShadeBuilder ForRMLExtension(String rmlExtensionGUID)
+ {
+ return AddQueryStep(0, (query) =>
+ {
+ if (rmlExtensionGUID != null)
+ {
+ return query.Where(x => x.RmlsExtensionsGuid == rmlExtensionGUID);
+ }
+ else
+ {
+ return query;
+ }
+ });
+ }
+ public virtual RMLExtensionColorShadeBuilder ForMachine(String machineGUID)
+ {
+ return AddQueryStep(1, (query) =>
+ {
+ if (machineGUID != null)
+ {
+ return query.Where(x => x.MachineGuid == machineGUID);
+ }
+ else
+ {
+ return query;
+ }
+ });
+ }
+ public virtual RMLExtensionColorShadeBuilder WithTests()
+ {
+ return AddStep(2, () =>
+ {
+ foreach (var result in Entities.ToList())
+ {
+ var testsList = Context.RmlExtensionColorShadesTests.Where(x => x.RmlExtensionColorShadesGuid == result.Guid).Include(y => y.RmlExtensionColorShadesTestsData).OrderBy(z => z.ID).ToList();
+
+ //foreach (var test in testsList)
+ //{
+ // var b = Context.RmlExtensionColorShadesTestsData.Where(x => x.RmlExtensionColorShadesTestsGuid == test.Guid).ToList();
+ //}
+ }
+ });
+ }
+ }
+}