From 1cbef6c4d79a1db8c8d3923edfec2e50277caa51 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Tue, 9 Sep 2025 06:51:14 +0300 Subject: RMl Default Liquid Factor + Machine Type + Improved RML Filter Loading. --- Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs | 8 +++++ Software/Visual_Studio/Tango.BL/Entities/Rml.cs | 15 +++++++++ .../Visual_Studio/Tango.BL/Entities/RmlBase.cs | 38 ++++++++++++++++++++++ 3 files changed, 61 insertions(+) (limited to 'Software/Visual_Studio/Tango.BL') diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs index 460d1f193..03bd6b656 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs @@ -445,5 +445,13 @@ namespace Tango.BL.DTO get; set; } + /// + /// machine type + /// + public Nullable MachineType + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/Rml.cs b/Software/Visual_Studio/Tango.BL/Entities/Rml.cs index fdeb8f05e..3f35ed11f 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/Rml.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/Rml.cs @@ -106,6 +106,21 @@ namespace Tango.BL.Entities } } + [NotMapped] + [JsonIgnore] + public MachineTypes? ForMachineType + { + get + { + return MachineType != null ? (MachineTypes?)MachineType : null; + } + set + { + MachineType = (int?)value; + RaisePropertyChanged(nameof(ForMachineType)); + } + } + protected override void OnNameChanged(string name) { base.OnNameChanged(name); diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs index 357be1666..59881f3d5 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs @@ -111,6 +111,8 @@ namespace Tango.BL.Entities public event EventHandler DefaultLiquidFactorChanged; + public event EventHandler> MachineTypeChanged; + public event EventHandler BtsrApplicationTypeChanged; public event EventHandler BtsrYarnTypeChanged; @@ -1569,6 +1571,33 @@ namespace Tango.BL.Entities } } + protected Nullable _machinetype; + + /// + /// Gets or sets the rmlbase machine type. + /// + + [Column("MACHINE_TYPE")] + + public Nullable MachineType + { + get + { + return _machinetype; + } + + set + { + if (_machinetype != value) + { + _machinetype = value; + + OnMachineTypeChanged(value); + + } + } + } + protected BtsrApplicationType _btsrapplicationtype; /// @@ -2499,6 +2528,15 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(DefaultLiquidFactor)); } + /// + /// Called when the MachineType has changed. + /// + protected virtual void OnMachineTypeChanged(Nullable machinetype) + { + MachineTypeChanged?.Invoke(this, machinetype); + RaisePropertyChanged(nameof(MachineType)); + } + /// /// Called when the BtsrApplicationType has changed. /// -- cgit v1.3.1