aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2022-02-22 14:41:25 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2022-02-22 14:41:25 +0200
commit28fa1ab91b3fb7970d9968c5cb1d018c2b44fd69 (patch)
tree040ebb961e0e991436571f11d8a189c92326e4b3 /Software/Visual_Studio/Tango.BL/Entities/JobBase.cs
parent3681ab681f02bbb7cda89de4044fd69bc9d61ab8 (diff)
downloadTango-28fa1ab91b3fb7970d9968c5cb1d018c2b44fd69.tar.gz
Tango-28fa1ab91b3fb7970d9968c5cb1d018c2b44fd69.zip
Implement grouping of segments. Changes in GUI and database. Not in Dying process.
Related Work Items: #4558
Diffstat (limited to 'Software/Visual_Studio/Tango.BL/Entities/JobBase.cs')
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/JobBase.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs b/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs
index 4d0ac20fb..f37848b5e 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs
@@ -99,6 +99,8 @@ namespace Tango.BL.Entities
public event EventHandler<WindingMethod> WindingMethodChanged;
+ public event EventHandler<SynchronizedObservableCollection<SegmentsGroup>> SegmentsGroupsChanged;
+
public event EventHandler<SynchronizedObservableCollection<Segment>> SegmentsChanged;
protected DateTime _creationdate;
@@ -1333,6 +1335,31 @@ namespace Tango.BL.Entities
}
}
+ protected SynchronizedObservableCollection<SegmentsGroup> _segmentsgroups;
+
+ /// <summary>
+ /// Gets or sets the jobbase segments groups.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<SegmentsGroup> SegmentsGroups
+ {
+ get
+ {
+ return _segmentsgroups;
+ }
+
+ set
+ {
+ if (_segmentsgroups != value)
+ {
+ _segmentsgroups = value;
+
+ OnSegmentsGroupsChanged(value);
+
+ }
+ }
+ }
+
protected SynchronizedObservableCollection<Segment> _segments;
/// <summary>
@@ -1683,6 +1710,15 @@ namespace Tango.BL.Entities
}
/// <summary>
+ /// Called when the SegmentsGroups has changed.
+ /// </summary>
+ protected virtual void OnSegmentsGroupsChanged(SynchronizedObservableCollection<SegmentsGroup> segmentsgroups)
+ {
+ SegmentsGroupsChanged?.Invoke(this, segmentsgroups);
+ RaisePropertyChanged(nameof(SegmentsGroups));
+ }
+
+ /// <summary>
/// Called when the Segments has changed.
/// </summary>
protected virtual void OnSegmentsChanged(SynchronizedObservableCollection<Segment> segments)
@@ -1697,6 +1733,8 @@ namespace Tango.BL.Entities
public JobBase() : base()
{
+ SegmentsGroups = new SynchronizedObservableCollection<SegmentsGroup>();
+
Segments = new SynchronizedObservableCollection<Segment>();
}