diff options
| author | Roy <Roy.mail.net@gmail.com> | 2022-09-12 05:58:56 +0300 |
|---|---|---|
| committer | Roy <Roy.mail.net@gmail.com> | 2022-09-12 05:58:56 +0300 |
| commit | 34cb4b4ffeebb27c579c58a81320fb974f366aed (patch) | |
| tree | 009714dd5ea346c3ee13a6e805397cf82875d51c /Software/Visual_Studio/Tango.BL | |
| parent | b31c6f64122ea7fbcab951ab0980b9a0db75b41b (diff) | |
| parent | ea4957385f2d1a3da2a3a6f5e0db95ca624c8173 (diff) | |
| download | Tango-34cb4b4ffeebb27c579c58a81320fb974f366aed.tar.gz Tango-34cb4b4ffeebb27c579c58a81320fb974f366aed.zip | |
Added RML Extensions Washing properties.
Diffstat (limited to 'Software/Visual_Studio/Tango.BL')
19 files changed, 1176 insertions, 6 deletions
diff --git a/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs index 2b962d56b..a9aabdbdd 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs @@ -64,5 +64,45 @@ namespace Tango.BL.Builders } }); } + + public virtual RMLExtensionTestResultsCollectionBuilder WithWashingTestResults() + { + return AddStep(4, () => + { + foreach (var result in Entities.ToList()) + { + var tests = Context.RmlExtensionTestWashingResults.Where(x => x.RmlExtensionTestResultsGuid == result.Guid).ToList(); + foreach( var test in tests) + { + test.WashingTestMaterials = Context.WashingTestMaterials.FirstOrDefault(x => x.Guid == test.WashingTestMaterialsGuid); + } + + } + }); + } + + public virtual RMLExtensionTestResultsCollectionBuilder WithBtsrApplicationTypes() + { + return AddStep(5, () => + { + foreach (var result in Entities.ToList()) + { + if(!String.IsNullOrEmpty(result.BtsrApplicationTypeGuid)) + result.BtsrApplicationType = Context.BtsrApplicationTypes.FirstOrDefault(x => x.Guid == result.BtsrApplicationTypeGuid); + } + }); + } + + public virtual RMLExtensionTestResultsCollectionBuilder WithBtsrYarnTypes() + { + return AddStep(6, () => + { + foreach (var result in Entities.ToList()) + { + if (!String.IsNullOrEmpty(result.BtsrYarnTypeGuid)) + result.BtsrYarnType = Context.BtsrYarnTypes.FirstOrDefault(x => x.Guid == result.BtsrYarnTypeGuid); + } + }); + } } } diff --git a/Software/Visual_Studio/Tango.BL/Builders/machinesCollectionBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/machinesCollectionBuilder.cs new file mode 100644 index 000000000..25ca3e8f3 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Builders/machinesCollectionBuilder.cs @@ -0,0 +1,55 @@ +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 MachinesCollectionBuilder : EntityCollectionBuilderBase<Machine, MachinesCollectionBuilder> + { + public MachinesCollectionBuilder(ObservablesContext context) : base(context) + { + + } + + public virtual MachinesCollectionBuilder WithVersion() + { + return AddQueryStep(1, (query) => + { + return query.Include(x => x.MachineVersion); + }); + + } + + public virtual MachinesCollectionBuilder WithOrganization() + { + return AddStep(2, () => + { + foreach (var machine in Entities.ToList()) + { + Context.Organizations.Where(x => x.Guid == machine.OrganizationGuid) + .Include(x => x.Address) + .Include(x => x.Contact).FirstOrDefault(); + } + }); + } + + public virtual MachinesCollectionBuilder WithConfiguration() + { + return AddStep(3, () => + { + foreach (var machine in Entities.ToList()) + { + new ConfigurationBuilder(Context) + .Set(machine.ConfigurationGuid) + .WithIdsPacks() + .WithHardwareVersion() + .Build(); + } + }); + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultDTOBase.cs index d48a36b22..0f2fa1675 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultDTOBase.cs @@ -277,5 +277,29 @@ namespace Tango.BL.DTO get; set; } + /// <summary> + /// btsr application type guid + /// </summary> + public String BtsrApplicationTypeGuid + { + get; set; + } + + /// <summary> + /// btsr yarn type guid + /// </summary> + public String BtsrYarnTypeGuid + { + get; set; + } + + /// <summary> + /// btsr tension error + /// </summary> + public Double BtsrTensionError + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestWashingResultDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestWashingResultDTO.cs new file mode 100644 index 000000000..1e15767c8 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestWashingResultDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class RmlExtensionTestWashingResultDTO : RmlExtensionTestWashingResultDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestWashingResultDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestWashingResultDTOBase.cs new file mode 100644 index 000000000..db4fd9893 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestWashingResultDTOBase.cs @@ -0,0 +1,65 @@ + +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class RmlExtensionTestWashingResultDTOBase : ObservableEntityDTO<RmlExtensionTestWashingResultDTO, RmlExtensionTestWashingResult> + { + + /// <summary> + /// rml extension test results guid + /// </summary> + public String RmlExtensionTestResultsGuid + { + get; set; + } + + /// <summary> + /// washing test materials guid + /// </summary> + public String WashingTestMaterialsGuid + { + get; set; + } + + /// <summary> + /// index row + /// </summary> + public Int32 IndexRow + { + get; set; + } + + /// <summary> + /// color + /// </summary> + public Int32 Color + { + get; set; + } + + /// <summary> + /// washing value + /// </summary> + public Nullable<Double> WashingValue + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/WashingTestMaterialDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/WashingTestMaterialDTO.cs new file mode 100644 index 000000000..f2c9ec25d --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/WashingTestMaterialDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class WashingTestMaterialDTO : WashingTestMaterialDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/WashingTestMaterialDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/WashingTestMaterialDTOBase.cs new file mode 100644 index 000000000..8c9bc0ff1 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/WashingTestMaterialDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class WashingTestMaterialDTOBase : ObservableEntityDTO<WashingTestMaterialDTO, WashingTestMaterial> + { + + /// <summary> + /// name + /// </summary> + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/BtsrApplicationTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/BtsrApplicationTypeBase.cs index ee1ff6ecc..70fd2c41e 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/BtsrApplicationTypeBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/BtsrApplicationTypeBase.cs @@ -33,6 +33,8 @@ namespace Tango.BL.Entities public event EventHandler<String> DescriptionChanged; + public event EventHandler<SynchronizedObservableCollection<RmlExtensionTestResult>> RmlExtensionTestResultsChanged; + public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged; protected Int32 _code; @@ -116,6 +118,31 @@ namespace Tango.BL.Entities } } + protected SynchronizedObservableCollection<RmlExtensionTestResult> _rmlextensiontestresults; + + /// <summary> + /// Gets or sets the btsrapplicationtypebase rml extension test results. + /// </summary> + + public virtual SynchronizedObservableCollection<RmlExtensionTestResult> RmlExtensionTestResults + { + get + { + return _rmlextensiontestresults; + } + + set + { + if (_rmlextensiontestresults != value) + { + _rmlextensiontestresults = value; + + OnRmlExtensionTestResultsChanged(value); + + } + } + } + protected SynchronizedObservableCollection<Rml> _rmls; /// <summary> @@ -169,6 +196,15 @@ namespace Tango.BL.Entities } /// <summary> + /// Called when the RmlExtensionTestResults has changed. + /// </summary> + protected virtual void OnRmlExtensionTestResultsChanged(SynchronizedObservableCollection<RmlExtensionTestResult> rmlextensiontestresults) + { + RmlExtensionTestResultsChanged?.Invoke(this, rmlextensiontestresults); + RaisePropertyChanged(nameof(RmlExtensionTestResults)); + } + + /// <summary> /// Called when the Rmls has changed. /// </summary> protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls) @@ -183,6 +219,8 @@ namespace Tango.BL.Entities public BtsrApplicationTypeBase() : base() { + RmlExtensionTestResults = new SynchronizedObservableCollection<RmlExtensionTestResult>(); + Rmls = new SynchronizedObservableCollection<Rml>(); } diff --git a/Software/Visual_Studio/Tango.BL/Entities/BtsrYarnTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/BtsrYarnTypeBase.cs index 608989fab..8128c8998 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/BtsrYarnTypeBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/BtsrYarnTypeBase.cs @@ -33,6 +33,8 @@ namespace Tango.BL.Entities public event EventHandler<String> DescriptionChanged; + public event EventHandler<SynchronizedObservableCollection<RmlExtensionTestResult>> RmlExtensionTestResultsChanged; + public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged; protected Int32 _code; @@ -116,6 +118,31 @@ namespace Tango.BL.Entities } } + protected SynchronizedObservableCollection<RmlExtensionTestResult> _rmlextensiontestresults; + + /// <summary> + /// Gets or sets the btsryarntypebase rml extension test results. + /// </summary> + + public virtual SynchronizedObservableCollection<RmlExtensionTestResult> RmlExtensionTestResults + { + get + { + return _rmlextensiontestresults; + } + + set + { + if (_rmlextensiontestresults != value) + { + _rmlextensiontestresults = value; + + OnRmlExtensionTestResultsChanged(value); + + } + } + } + protected SynchronizedObservableCollection<Rml> _rmls; /// <summary> @@ -169,6 +196,15 @@ namespace Tango.BL.Entities } /// <summary> + /// Called when the RmlExtensionTestResults has changed. + /// </summary> + protected virtual void OnRmlExtensionTestResultsChanged(SynchronizedObservableCollection<RmlExtensionTestResult> rmlextensiontestresults) + { + RmlExtensionTestResultsChanged?.Invoke(this, rmlextensiontestresults); + RaisePropertyChanged(nameof(RmlExtensionTestResults)); + } + + /// <summary> /// Called when the Rmls has changed. /// </summary> protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls) @@ -183,6 +219,8 @@ namespace Tango.BL.Entities public BtsrYarnTypeBase() : base() { + RmlExtensionTestResults = new SynchronizedObservableCollection<RmlExtensionTestResult>(); + Rmls = new SynchronizedObservableCollection<Rml>(); } diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs index 2dd1e029a..22844741c 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs @@ -87,14 +87,22 @@ namespace Tango.BL.Entities public event EventHandler<Nullable<Double>> ThreadLubChanged; + public event EventHandler<Double> BtsrTensionErrorChanged; + public event EventHandler<RmlsExtension> RmlsExtensionsChanged; public event EventHandler<SynchronizedObservableCollection<TensileResult>> TensileResultsChanged; public event EventHandler<SynchronizedObservableCollection<RmlExtensionTestResultsFile>> RmlExtensionTestResultsFilesChanged; + public event EventHandler<BtsrApplicationType> BtsrApplicationTypeChanged; + + public event EventHandler<BtsrYarnType> BtsrYarnTypeChanged; + public event EventHandler<Machine> MachineChanged; + public event EventHandler<SynchronizedObservableCollection<RmlExtensionTestWashingResult>> RmlExtensionTestWashingResultsChanged; + public event EventHandler<SynchronizedObservableCollection<RubbingResult>> RubbingResultsChanged; protected String _rmlsextensionsguid; @@ -959,6 +967,85 @@ namespace Tango.BL.Entities } } + protected String _btsrapplicationtypeguid; + + /// <summary> + /// Gets or sets the rmlextensiontestresultbase btsr application type guid. + /// </summary> + + [Column("BTSR_APPLICATION_TYPE_GUID")] + [ForeignKey("BtsrApplicationType")] + + public String BtsrApplicationTypeGuid + { + get + { + return _btsrapplicationtypeguid; + } + + set + { + if (_btsrapplicationtypeguid != value) + { + _btsrapplicationtypeguid = value; + + } + } + } + + protected String _btsryarntypeguid; + + /// <summary> + /// Gets or sets the rmlextensiontestresultbase btsr yarn type guid. + /// </summary> + + [Column("BTSR_YARN_TYPE_GUID")] + [ForeignKey("BtsrYarnType")] + + public String BtsrYarnTypeGuid + { + get + { + return _btsryarntypeguid; + } + + set + { + if (_btsryarntypeguid != value) + { + _btsryarntypeguid = value; + + } + } + } + + protected Double _btsrtensionerror; + + /// <summary> + /// Gets or sets the rmlextensiontestresultbase btsr tension error. + /// </summary> + + [Column("BTSR_TENSION_ERROR")] + + public Double BtsrTensionError + { + get + { + return _btsrtensionerror; + } + + set + { + if (_btsrtensionerror != value) + { + _btsrtensionerror = value; + + OnBtsrTensionErrorChanged(value); + + } + } + } + protected RmlsExtension _rmlsextensions; /// <summary> @@ -1041,6 +1128,70 @@ namespace Tango.BL.Entities } } + protected BtsrApplicationType _btsrapplicationtype; + + /// <summary> + /// Gets or sets the rmlextensiontestresultbase btsr application types. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual BtsrApplicationType BtsrApplicationType + { + get + { + return _btsrapplicationtype; + } + + set + { + if (_btsrapplicationtype != value) + { + _btsrapplicationtype = value; + + if (BtsrApplicationType != null) + { + BtsrApplicationTypeGuid = BtsrApplicationType.Guid; + } + + OnBtsrApplicationTypeChanged(value); + + } + } + } + + protected BtsrYarnType _btsryarntype; + + /// <summary> + /// Gets or sets the rmlextensiontestresultbase btsr yarn types. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual BtsrYarnType BtsrYarnType + { + get + { + return _btsryarntype; + } + + set + { + if (_btsryarntype != value) + { + _btsryarntype = value; + + if (BtsrYarnType != null) + { + BtsrYarnTypeGuid = BtsrYarnType.Guid; + } + + OnBtsrYarnTypeChanged(value); + + } + } + } + protected Machine _machine; /// <summary> @@ -1073,6 +1224,31 @@ namespace Tango.BL.Entities } } + protected SynchronizedObservableCollection<RmlExtensionTestWashingResult> _rmlextensiontestwashingresults; + + /// <summary> + /// Gets or sets the rmlextensiontestresultbase rml extension test washing results. + /// </summary> + + public virtual SynchronizedObservableCollection<RmlExtensionTestWashingResult> RmlExtensionTestWashingResults + { + get + { + return _rmlextensiontestwashingresults; + } + + set + { + if (_rmlextensiontestwashingresults != value) + { + _rmlextensiontestwashingresults = value; + + OnRmlExtensionTestWashingResultsChanged(value); + + } + } + } + protected SynchronizedObservableCollection<RubbingResult> _rubbingresults; /// <summary> @@ -1369,6 +1545,15 @@ namespace Tango.BL.Entities } /// <summary> + /// Called when the BtsrTensionError has changed. + /// </summary> + protected virtual void OnBtsrTensionErrorChanged(Double btsrtensionerror) + { + BtsrTensionErrorChanged?.Invoke(this, btsrtensionerror); + RaisePropertyChanged(nameof(BtsrTensionError)); + } + + /// <summary> /// Called when the RmlsExtensions has changed. /// </summary> protected virtual void OnRmlsExtensionsChanged(RmlsExtension rmlsextensions) @@ -1396,6 +1581,24 @@ namespace Tango.BL.Entities } /// <summary> + /// Called when the BtsrApplicationType has changed. + /// </summary> + protected virtual void OnBtsrApplicationTypeChanged(BtsrApplicationType btsrapplicationtype) + { + BtsrApplicationTypeChanged?.Invoke(this, btsrapplicationtype); + RaisePropertyChanged(nameof(BtsrApplicationType)); + } + + /// <summary> + /// Called when the BtsrYarnType has changed. + /// </summary> + protected virtual void OnBtsrYarnTypeChanged(BtsrYarnType btsryarntype) + { + BtsrYarnTypeChanged?.Invoke(this, btsryarntype); + RaisePropertyChanged(nameof(BtsrYarnType)); + } + + /// <summary> /// Called when the Machine has changed. /// </summary> protected virtual void OnMachineChanged(Machine machine) @@ -1405,6 +1608,15 @@ namespace Tango.BL.Entities } /// <summary> + /// Called when the RmlExtensionTestWashingResults has changed. + /// </summary> + protected virtual void OnRmlExtensionTestWashingResultsChanged(SynchronizedObservableCollection<RmlExtensionTestWashingResult> rmlextensiontestwashingresults) + { + RmlExtensionTestWashingResultsChanged?.Invoke(this, rmlextensiontestwashingresults); + RaisePropertyChanged(nameof(RmlExtensionTestWashingResults)); + } + + /// <summary> /// Called when the RubbingResults has changed. /// </summary> protected virtual void OnRubbingResultsChanged(SynchronizedObservableCollection<RubbingResult> rubbingresults) @@ -1423,6 +1635,8 @@ namespace Tango.BL.Entities RmlExtensionTestResultsFiles = new SynchronizedObservableCollection<RmlExtensionTestResultsFile>(); + RmlExtensionTestWashingResults = new SynchronizedObservableCollection<RmlExtensionTestWashingResult>(); + RubbingResults = new SynchronizedObservableCollection<RubbingResult>(); } diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestWashingResult.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestWashingResult.cs new file mode 100644 index 000000000..9d67cef70 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestWashingResult.cs @@ -0,0 +1,49 @@ +using ColorMine.ColorSpaces; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; + +namespace Tango.BL.Entities +{ + public class RmlExtensionTestWashingResult: RmlExtensionTestWashingResultBase + { + public RmlExtensionTestWashingResult(): base() + { + + } + + [NotMapped] + [JsonIgnore] + public string GetMaterialName + { + get + { + return WashingTestMaterials != null ? WashingTestMaterials.Name : ""; + } + } + + //[NotMapped] + //[JsonIgnore] + //public Color ColorValue + //{ + // get + // { + // byte[] bytes = BitConverter.GetBytes(Color); + // var color1 = new SolidColorBrush(System.Windows.Media.Color.FromArgb(bytes[3], bytes[2], bytes[1], bytes[0])); + // return System.Windows.Media.Color.FromRgb(bytes[2], bytes[1], bytes[0]); + // } + // set + // { + // int v = ColorToInteger(value); + // int colorCodeWithAlpha = BitConverter.ToInt32(new byte[] { value.B, value.G, value.R, value.A }, 0); + // Color = colorCodeWithAlpha; + // RaisePropertyChanged(nameof(Color)); + // } + //} + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestWashingResultBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestWashingResultBase.cs new file mode 100644 index 000000000..c4016bb40 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestWashingResultBase.cs @@ -0,0 +1,289 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("RML_EXTENSION_TEST_WASHING_RESULTS")] + public abstract class RmlExtensionTestWashingResultBase : ObservableEntity<RmlExtensionTestWashingResult> + { + + public event EventHandler<Int32> IndexRowChanged; + + public event EventHandler<Int32> ColorChanged; + + public event EventHandler<Nullable<Double>> WashingValueChanged; + + public event EventHandler<RmlExtensionTestResult> RmlExtensionTestResultsChanged; + + public event EventHandler<WashingTestMaterial> WashingTestMaterialsChanged; + + protected String _rmlextensiontestresultsguid; + + /// <summary> + /// Gets or sets the rmlextensiontestwashingresultbase rml extension test results guid. + /// </summary> + + [Column("RML_EXTENSION_TEST_RESULTS_GUID")] + [ForeignKey("RmlExtensionTestResults")] + + public String RmlExtensionTestResultsGuid + { + get + { + return _rmlextensiontestresultsguid; + } + + set + { + if (_rmlextensiontestresultsguid != value) + { + _rmlextensiontestresultsguid = value; + + } + } + } + + protected String _washingtestmaterialsguid; + + /// <summary> + /// Gets or sets the rmlextensiontestwashingresultbase washing test materials guid. + /// </summary> + + [Column("WASHING_TEST_MATERIALS_GUID")] + [ForeignKey("WashingTestMaterials")] + + public String WashingTestMaterialsGuid + { + get + { + return _washingtestmaterialsguid; + } + + set + { + if (_washingtestmaterialsguid != value) + { + _washingtestmaterialsguid = value; + + } + } + } + + protected Int32 _indexrow; + + /// <summary> + /// Gets or sets the rmlextensiontestwashingresultbase index row. + /// </summary> + + [Column("INDEX_ROW")] + + public Int32 IndexRow + { + get + { + return _indexrow; + } + + set + { + if (_indexrow != value) + { + _indexrow = value; + + OnIndexRowChanged(value); + + } + } + } + + protected Int32 _color; + + /// <summary> + /// Gets or sets the rmlextensiontestwashingresultbase color. + /// </summary> + + [Column("COLOR")] + + public Int32 Color + { + get + { + return _color; + } + + set + { + if (_color != value) + { + _color = value; + + OnColorChanged(value); + + } + } + } + + protected Nullable<Double> _washingvalue; + + /// <summary> + /// Gets or sets the rmlextensiontestwashingresultbase washing value. + /// </summary> + + [Column("WASHING_VALUE")] + + public Nullable<Double> WashingValue + { + get + { + return _washingvalue; + } + + set + { + if (_washingvalue != value) + { + _washingvalue = value; + + OnWashingValueChanged(value); + + } + } + } + + protected RmlExtensionTestResult _rmlextensiontestresults; + + /// <summary> + /// Gets or sets the rmlextensiontestwashingresultbase rml extension test results. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual RmlExtensionTestResult RmlExtensionTestResults + { + get + { + return _rmlextensiontestresults; + } + + set + { + if (_rmlextensiontestresults != value) + { + _rmlextensiontestresults = value; + + if (RmlExtensionTestResults != null) + { + RmlExtensionTestResultsGuid = RmlExtensionTestResults.Guid; + } + + OnRmlExtensionTestResultsChanged(value); + + } + } + } + + protected WashingTestMaterial _washingtestmaterials; + + /// <summary> + /// Gets or sets the rmlextensiontestwashingresultbase washing test materials. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual WashingTestMaterial WashingTestMaterials + { + get + { + return _washingtestmaterials; + } + + set + { + if (_washingtestmaterials != value) + { + _washingtestmaterials = value; + + if (WashingTestMaterials != null) + { + WashingTestMaterialsGuid = WashingTestMaterials.Guid; + } + + OnWashingTestMaterialsChanged(value); + + } + } + } + + /// <summary> + /// Called when the IndexRow has changed. + /// </summary> + protected virtual void OnIndexRowChanged(Int32 indexrow) + { + IndexRowChanged?.Invoke(this, indexrow); + RaisePropertyChanged(nameof(IndexRow)); + } + + /// <summary> + /// Called when the Color has changed. + /// </summary> + protected virtual void OnColorChanged(Int32 color) + { + ColorChanged?.Invoke(this, color); + RaisePropertyChanged(nameof(Color)); + } + + /// <summary> + /// Called when the WashingValue has changed. + /// </summary> + protected virtual void OnWashingValueChanged(Nullable<Double> washingvalue) + { + WashingValueChanged?.Invoke(this, washingvalue); + RaisePropertyChanged(nameof(WashingValue)); + } + + /// <summary> + /// Called when the RmlExtensionTestResults has changed. + /// </summary> + protected virtual void OnRmlExtensionTestResultsChanged(RmlExtensionTestResult rmlextensiontestresults) + { + RmlExtensionTestResultsChanged?.Invoke(this, rmlextensiontestresults); + RaisePropertyChanged(nameof(RmlExtensionTestResults)); + } + + /// <summary> + /// Called when the WashingTestMaterials has changed. + /// </summary> + protected virtual void OnWashingTestMaterialsChanged(WashingTestMaterial washingtestmaterials) + { + WashingTestMaterialsChanged?.Invoke(this, washingtestmaterials); + RaisePropertyChanged(nameof(WashingTestMaterials)); + } + + /// <summary> + /// Initializes a new instance of the <see cref="RmlExtensionTestWashingResultBase" /> class. + /// </summary> + public RmlExtensionTestWashingResultBase() : base() + { + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/WashingTestMaterial.cs b/Software/Visual_Studio/Tango.BL/Entities/WashingTestMaterial.cs new file mode 100644 index 000000000..7cb6bd8e3 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/WashingTestMaterial.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.Entities +{ + public class WashingTestMaterial: WashingTestMaterialBase + { + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/WashingTestMaterialBase.cs b/Software/Visual_Studio/Tango.BL/Entities/WashingTestMaterialBase.cs new file mode 100644 index 000000000..84271403c --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/WashingTestMaterialBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("WASHING_TEST_MATERIALS")] + public abstract class WashingTestMaterialBase : ObservableEntity<WashingTestMaterial> + { + + public event EventHandler<String> NameChanged; + + public event EventHandler<SynchronizedObservableCollection<RmlExtensionTestWashingResult>> RmlExtensionTestWashingResultsChanged; + + protected String _name; + + /// <summary> + /// Gets or sets the washingtestmaterialbase name. + /// </summary> + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection<RmlExtensionTestWashingResult> _rmlextensiontestwashingresults; + + /// <summary> + /// Gets or sets the washingtestmaterialbase rml extension test washing results. + /// </summary> + + public virtual SynchronizedObservableCollection<RmlExtensionTestWashingResult> RmlExtensionTestWashingResults + { + get + { + return _rmlextensiontestwashingresults; + } + + set + { + if (_rmlextensiontestwashingresults != value) + { + _rmlextensiontestwashingresults = value; + + OnRmlExtensionTestWashingResultsChanged(value); + + } + } + } + + /// <summary> + /// Called when the Name has changed. + /// </summary> + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// <summary> + /// Called when the RmlExtensionTestWashingResults has changed. + /// </summary> + protected virtual void OnRmlExtensionTestWashingResultsChanged(SynchronizedObservableCollection<RmlExtensionTestWashingResult> rmlextensiontestwashingresults) + { + RmlExtensionTestWashingResultsChanged?.Invoke(this, rmlextensiontestwashingresults); + RaisePropertyChanged(nameof(RmlExtensionTestWashingResults)); + } + + /// <summary> + /// Initializes a new instance of the <see cref="WashingTestMaterialBase" /> class. + /// </summary> + public WashingTestMaterialBase() : base() + { + + RmlExtensionTestWashingResults = new SynchronizedObservableCollection<RmlExtensionTestWashingResult>(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/ColorSpaces.cs b/Software/Visual_Studio/Tango.BL/Enumerations/ColorSpaces.cs index 63970e879..d254475d9 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/ColorSpaces.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/ColorSpaces.cs @@ -49,11 +49,5 @@ namespace Tango.BL.Enumerations [Description("Catalog")] Catalog = 4, - /// <summary> - /// (HSB) - /// </summary> - [Description("HSB")] - HSB = 5, - } } diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs index 22ba28929..c06af8ba5 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs @@ -767,6 +767,14 @@ namespace Tango.BL } /// <summary> + /// Gets or sets the RmlExtensionTestWashingResults. + /// </summary> + public DbSet<RmlExtensionTestWashingResult> RmlExtensionTestWashingResults + { + get; set; + } + + /// <summary> /// Gets or sets the Rmls. /// </summary> public DbSet<Rml> Rmls @@ -959,6 +967,14 @@ namespace Tango.BL } /// <summary> + /// Gets or sets the WashingTestMaterials. + /// </summary> + public DbSet<WashingTestMaterial> WashingTestMaterials + { + get; set; + } + + /// <summary> /// Gets or sets the WindingMethods. /// </summary> public DbSet<WindingMethod> WindingMethods diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs index 33ef519ac..d06377cf3 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs @@ -3365,6 +3365,42 @@ namespace Tango.BL } + private ObservableCollection<RmlExtensionTestWashingResult> _rmlextensiontestwashingresults; + /// <summary> + /// Gets or sets the RmlExtensionTestWashingResults. + /// </summary> + public ObservableCollection<RmlExtensionTestWashingResult> RmlExtensionTestWashingResults + { + get + { + return _rmlextensiontestwashingresults; + } + + set + { + _rmlextensiontestwashingresults = value; RaisePropertyChanged(nameof(RmlExtensionTestWashingResults)); + } + + } + + private ICollectionView _rmlextensiontestwashingresultsViewSource; + /// <summary> + /// Gets or sets the RmlExtensionTestWashingResults View Source. + ///</summary> + public ICollectionView RmlExtensionTestWashingResultsViewSource + { + get + { + return _rmlextensiontestwashingresultsViewSource; + } + + set + { + _rmlextensiontestwashingresultsViewSource = value; RaisePropertyChanged(nameof(RmlExtensionTestWashingResultsViewSource)); + } + + } + private ObservableCollection<Rml> _rmls; /// <summary> /// Gets or sets the Rmls. @@ -4229,6 +4265,42 @@ namespace Tango.BL } + private ObservableCollection<WashingTestMaterial> _washingtestmaterials; + /// <summary> + /// Gets or sets the WashingTestMaterials. + /// </summary> + public ObservableCollection<WashingTestMaterial> WashingTestMaterials + { + get + { + return _washingtestmaterials; + } + + set + { + _washingtestmaterials = value; RaisePropertyChanged(nameof(WashingTestMaterials)); + } + + } + + private ICollectionView _washingtestmaterialsViewSource; + /// <summary> + /// Gets or sets the WashingTestMaterials View Source. + ///</summary> + public ICollectionView WashingTestMaterialsViewSource + { + get + { + return _washingtestmaterialsViewSource; + } + + set + { + _washingtestmaterialsViewSource = value; RaisePropertyChanged(nameof(WashingTestMaterialsViewSource)); + } + + } + private ObservableCollection<WindingMethod> _windingmethods; /// <summary> /// Gets or sets the WindingMethods. @@ -4457,6 +4529,8 @@ namespace Tango.BL PublishedProcedureProjectsVersionsViewSource = CreateCollectionView(PublishedProcedureProjectsVersions); + RmlExtensionTestWashingResultsViewSource = CreateCollectionView(RmlExtensionTestWashingResults); + RmlsViewSource = CreateCollectionView(Rmls); RmlsSpoolsViewSource = CreateCollectionView(RmlsSpools); @@ -4505,6 +4579,8 @@ namespace Tango.BL UsersRolesViewSource = CreateCollectionView(UsersRoles); + WashingTestMaterialsViewSource = CreateCollectionView(WashingTestMaterials); + WindingMethodsViewSource = CreateCollectionView(WindingMethods); } diff --git a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs index c2b370f38..b40fbb618 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs @@ -3365,6 +3365,42 @@ namespace Tango.BL } + private ObservableCollection<RmlExtensionTestWashingResult> _rmlextensiontestwashingresults; + /// <summary> + /// Gets or sets the RmlExtensionTestWashingResults. + /// </summary> + public ObservableCollection<RmlExtensionTestWashingResult> RmlExtensionTestWashingResults + { + get + { + return _rmlextensiontestwashingresults; + } + + set + { + _rmlextensiontestwashingresults = value; RaisePropertyChanged(nameof(RmlExtensionTestWashingResults)); + } + + } + + private ICollectionView _rmlextensiontestwashingresultsViewSource; + /// <summary> + /// Gets or sets the RmlExtensionTestWashingResults View Source. + ///</summary> + public ICollectionView RmlExtensionTestWashingResultsViewSource + { + get + { + return _rmlextensiontestwashingresultsViewSource; + } + + set + { + _rmlextensiontestwashingresultsViewSource = value; RaisePropertyChanged(nameof(RmlExtensionTestWashingResultsViewSource)); + } + + } + private ObservableCollection<Rml> _rmls; /// <summary> /// Gets or sets the Rmls. @@ -4229,6 +4265,42 @@ namespace Tango.BL } + private ObservableCollection<WashingTestMaterial> _washingtestmaterials; + /// <summary> + /// Gets or sets the WashingTestMaterials. + /// </summary> + public ObservableCollection<WashingTestMaterial> WashingTestMaterials + { + get + { + return _washingtestmaterials; + } + + set + { + _washingtestmaterials = value; RaisePropertyChanged(nameof(WashingTestMaterials)); + } + + } + + private ICollectionView _washingtestmaterialsViewSource; + /// <summary> + /// Gets or sets the WashingTestMaterials View Source. + ///</summary> + public ICollectionView WashingTestMaterialsViewSource + { + get + { + return _washingtestmaterialsViewSource; + } + + set + { + _washingtestmaterialsViewSource = value; RaisePropertyChanged(nameof(WashingTestMaterialsViewSource)); + } + + } + private ObservableCollection<WindingMethod> _windingmethods; /// <summary> /// Gets or sets the WindingMethods. @@ -4457,6 +4529,8 @@ namespace Tango.BL PublishedProcedureProjectsVersionsViewSource = CreateCollectionView(PublishedProcedureProjectsVersions); + RmlExtensionTestWashingResultsViewSource = CreateCollectionView(RmlExtensionTestWashingResults); + RmlsViewSource = CreateCollectionView(Rmls); RmlsSpoolsViewSource = CreateCollectionView(RmlsSpools); @@ -4505,6 +4579,8 @@ namespace Tango.BL UsersRolesViewSource = CreateCollectionView(UsersRoles); + WashingTestMaterialsViewSource = CreateCollectionView(WashingTestMaterials); + WindingMethodsViewSource = CreateCollectionView(WindingMethods); } diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index 8bdb3b3f5..ea2315046 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -116,6 +116,7 @@ <Compile Include="Builders\JobBuilder.cs" /> <Compile Include="Builders\JobRunsCollectionBuilder.cs" /> <Compile Include="Builders\CatalogsCollectionBuilder.cs" /> + <Compile Include="Builders\MachinesCollectionBuilder.cs" /> <Compile Include="Builders\RMLExtensionColorCalibrationBuilder.cs" /> <Compile Include="Builders\RMLExtensionColorShadeBuilder.cs" /> <Compile Include="Builders\RmlExtensionsBuilder.cs" /> @@ -307,6 +308,8 @@ <Compile Include="DTO\RmlExtensionTestResultDTOBase.cs" /> <Compile Include="DTO\RmlExtensionTestResultsFileDTO.cs" /> <Compile Include="DTO\RmlExtensionTestResultsFileDTOBase.cs" /> + <Compile Include="DTO\RmlExtensionTestWashingResultDTO.cs" /> + <Compile Include="DTO\RmlExtensionTestWashingResultDTOBase.cs" /> <Compile Include="DTO\RmlsExtensionDTO.cs" /> <Compile Include="DTO\RmlsExtensionDTOBase.cs" /> <Compile Include="DTO\RmlsSpoolDTO.cs" /> @@ -357,6 +360,8 @@ <Compile Include="DTO\UserDTOBase.cs" /> <Compile Include="DTO\UsersRoleDTO.cs" /> <Compile Include="DTO\UsersRoleDTOBase.cs" /> + <Compile Include="DTO\WashingTestMaterialDTO.cs" /> + <Compile Include="DTO\WashingTestMaterialDTOBase.cs" /> <Compile Include="DTO\WindingMethodDTO.cs" /> <Compile Include="DTO\WindingMethodDTOBase.cs" /> <Compile Include="DTO\YarnApplicationDTO.cs" /> @@ -495,6 +500,8 @@ <Compile Include="Entities\RmlExtensionTestResultBase.cs" /> <Compile Include="Entities\RmlExtensionTestResultsFile.cs" /> <Compile Include="Entities\RmlExtensionTestResultsFileBase.cs" /> + <Compile Include="Entities\RmlExtensionTestWashingResult.cs" /> + <Compile Include="Entities\RmlExtensionTestWashingResultBase.cs" /> <Compile Include="Entities\RmlsExtension.cs" /> <Compile Include="Entities\RmlsExtensionBase.cs" /> <Compile Include="Entities\RmlsSpoolBase.cs" /> @@ -537,6 +544,8 @@ <Compile Include="Entities\TensileResultBase.cs" /> <Compile Include="Entities\UserBase.cs" /> <Compile Include="Entities\UsersRoleBase.cs" /> + <Compile Include="Entities\WashingTestMaterial.cs" /> + <Compile Include="Entities\WashingTestMaterialBase.cs" /> <Compile Include="Entities\WindingMethodBase.cs" /> <Compile Include="Entities\YarnApplication.cs" /> <Compile Include="Entities\YarnApplicationBase.cs" /> |
