aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.BL
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2023-10-22 16:43:49 +0300
committerRoy <Roy.mail.net@gmail.com>2023-10-22 16:43:49 +0300
commit4cebc14d3183ee4dc4ade0f85d9bf72cec44533c (patch)
treeb940003b7572fa616fd385ef5c5be00b06f5c01b /Software/Visual_Studio/Tango.BL
parentf35fea4ffd1219e844f94a0b72c12cc91af2c94e (diff)
parent648437dec6e56e32218d88b7a85e70ac00b6e98a (diff)
downloadTango-4cebc14d3183ee4dc4ade0f85d9bf72cec44533c.tar.gz
Tango-4cebc14d3183ee4dc4ade0f85d9bf72cec44533c.zip
Merge branch 'software' of https://twinetfs.visualstudio.com/Tango/_git/Tango into software
Diffstat (limited to 'Software/Visual_Studio/Tango.BL')
-rw-r--r--Software/Visual_Studio/Tango.BL/DTO/JobDTOBase.cs8
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Job.cs21
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/JobBase.cs38
3 files changed, 53 insertions, 14 deletions
diff --git a/Software/Visual_Studio/Tango.BL/DTO/JobDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/JobDTOBase.cs
index c5e13a569..feb789ffe 100644
--- a/Software/Visual_Studio/Tango.BL/DTO/JobDTOBase.cs
+++ b/Software/Visual_Studio/Tango.BL/DTO/JobDTOBase.cs
@@ -309,5 +309,13 @@ namespace Tango.BL.DTO
get; set;
}
+ /// <summary>
+ /// number of spools
+ /// </summary>
+ public Int32 NumberOfSpools
+ {
+ get; set;
+ }
+
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Job.cs b/Software/Visual_Studio/Tango.BL/Entities/Job.cs
index 29f7e1054..328d74f0c 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Job.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Job.cs
@@ -99,9 +99,9 @@ namespace Tango.BL.Entities
{
get
{
- if (Spools >= 4)
+ if (NumberOfSpools >= 4)
{
- return LengthIncludingNumberOfUnits * Spools;
+ return LengthIncludingNumberOfUnits * NumberOfSpools;
}
return LengthIncludingNumberOfUnits;
@@ -129,9 +129,9 @@ namespace Tango.BL.Entities
{
get
{
- if (Spools >= 4)
+ if (NumberOfSpools >= 4)
{
- return WeightIncludingNumberOfUnits * Spools;
+ return WeightIncludingNumberOfUnits * NumberOfSpools;
}
return WeightIncludingNumberOfUnits;
@@ -144,9 +144,9 @@ namespace Tango.BL.Entities
{
get
{
- if (Spools >= 4)
+ if (NumberOfSpools >= 4)
{
- return NumberOfUnits * Spools;
+ return NumberOfUnits * NumberOfSpools;
}
return NumberOfUnits;
}
@@ -218,14 +218,7 @@ namespace Tango.BL.Entities
RaisePropertyChangedAuto();
}
}
-
- [NotMapped]
- [JsonIgnore]
- public int Spools
- {
- get { return 4; }//headunits?
- }
-
+
/// <summary>
/// Gets or sets the effective segments.
/// </summary>
diff --git a/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs b/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs
index f37848b5e..83912de98 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs
@@ -83,6 +83,8 @@ namespace Tango.BL.Entities
public event EventHandler<Int32> VersionChanged;
+ public event EventHandler<Int32> NumberOfSpoolsChanged;
+
public event EventHandler<ColorCatalog> ColorCatalogChanged;
public event EventHandler<ColorSpace> ColorSpaceChanged;
@@ -1079,6 +1081,33 @@ namespace Tango.BL.Entities
}
}
+ protected Int32 _numberofspools;
+
+ /// <summary>
+ /// Gets or sets the jobbase number of spools.
+ /// </summary>
+
+ [Column("NUMBER_OF_SPOOLS")]
+
+ public Int32 NumberOfSpools
+ {
+ get
+ {
+ return _numberofspools;
+ }
+
+ set
+ {
+ if (_numberofspools != value)
+ {
+ _numberofspools = value;
+
+ OnNumberOfSpoolsChanged(value);
+
+ }
+ }
+ }
+
protected ColorCatalog _colorcatalog;
/// <summary>
@@ -1638,6 +1667,15 @@ namespace Tango.BL.Entities
}
/// <summary>
+ /// Called when the NumberOfSpools has changed.
+ /// </summary>
+ protected virtual void OnNumberOfSpoolsChanged(Int32 numberofspools)
+ {
+ NumberOfSpoolsChanged?.Invoke(this, numberofspools);
+ RaisePropertyChanged(nameof(NumberOfSpools));
+ }
+
+ /// <summary>
/// Called when the ColorCatalog has changed.
/// </summary>
protected virtual void OnColorCatalogChanged(ColorCatalog colorcatalog)