aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.BL/Entities/JobBase.cs')
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/JobBase.cs121
1 files changed, 43 insertions, 78 deletions
diff --git a/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs b/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs
index a535a78bd..c5354f2c7 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs
@@ -19,10 +19,14 @@ using System.Linq;
using Tango.DAL.Remote.DB;
using Tango.Core;
using System.ComponentModel;
-using Tango.Core.CustomAttributes;
namespace Tango.BL.Entities
{
+
+ /// <summary>
+ ///
+ /// </summary>
+
[Table("JOBS")]
public abstract class JobBase : ObservableEntity<Job>
{
@@ -77,16 +81,14 @@ namespace Tango.BL.Entities
public event EventHandler<Double> LengthPercentageFactorChanged;
- public event EventHandler<Boolean> IsSynchronizedChanged;
-
- public event EventHandler<Int32> SourceChanged;
-
public event EventHandler<ColorCatalog> ColorCatalogChanged;
public event EventHandler<ColorSpace> ColorSpaceChanged;
public event EventHandler<Customer> CustomerChanged;
+ public event EventHandler<SynchronizedObservableCollection<JobRun>> JobRunsChanged;
+
public event EventHandler<Machine> MachineChanged;
public event EventHandler<Rml> RmlChanged;
@@ -993,61 +995,6 @@ namespace Tango.BL.Entities
}
}
- protected Boolean _issynchronized;
-
- /// <summary>
- /// Gets or sets the jobbase is synchronized.
- /// </summary>
-
- [Column("IS_SYNCHRONIZED")]
-
- public Boolean IsSynchronized
- {
- get
- {
- return _issynchronized;
- }
-
- set
- {
- if (_issynchronized != value)
- {
- _issynchronized = value;
-
- OnIsSynchronizedChanged(value);
-
- }
- }
- }
-
- protected Int32 _source;
-
- /// <summary>
- /// 0 = Remote
- /// 1 = Local
- /// </summary>
-
- [Column("SOURCE")]
-
- public Int32 Source
- {
- get
- {
- return _source;
- }
-
- set
- {
- if (_source != value)
- {
- _source = value;
-
- OnSourceChanged(value);
-
- }
- }
- }
-
protected ColorCatalog _colorcatalog;
/// <summary>
@@ -1144,6 +1091,31 @@ namespace Tango.BL.Entities
}
}
+ protected SynchronizedObservableCollection<JobRun> _jobruns;
+
+ /// <summary>
+ /// Gets or sets the jobbase job runs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<JobRun> JobRuns
+ {
+ get
+ {
+ return _jobruns;
+ }
+
+ set
+ {
+ if (_jobruns != value)
+ {
+ _jobruns = value;
+
+ OnJobRunsChanged(value);
+
+ }
+ }
+ }
+
protected Machine _machine;
/// <summary>
@@ -1555,24 +1527,6 @@ namespace Tango.BL.Entities
}
/// <summary>
- /// Called when the IsSynchronized has changed.
- /// </summary>
- protected virtual void OnIsSynchronizedChanged(Boolean issynchronized)
- {
- IsSynchronizedChanged?.Invoke(this, issynchronized);
- RaisePropertyChanged(nameof(IsSynchronized));
- }
-
- /// <summary>
- /// Called when the Source has changed.
- /// </summary>
- protected virtual void OnSourceChanged(Int32 source)
- {
- SourceChanged?.Invoke(this, source);
- RaisePropertyChanged(nameof(Source));
- }
-
- /// <summary>
/// Called when the ColorCatalog has changed.
/// </summary>
protected virtual void OnColorCatalogChanged(ColorCatalog colorcatalog)
@@ -1600,6 +1554,15 @@ namespace Tango.BL.Entities
}
/// <summary>
+ /// Called when the JobRuns has changed.
+ /// </summary>
+ protected virtual void OnJobRunsChanged(SynchronizedObservableCollection<JobRun> jobruns)
+ {
+ JobRunsChanged?.Invoke(this, jobruns);
+ RaisePropertyChanged(nameof(JobRuns));
+ }
+
+ /// <summary>
/// Called when the Machine has changed.
/// </summary>
protected virtual void OnMachineChanged(Machine machine)
@@ -1659,6 +1622,8 @@ namespace Tango.BL.Entities
public JobBase() : base()
{
+ JobRuns = new SynchronizedObservableCollection<JobRun>();
+
Segments = new SynchronizedObservableCollection<Segment>();
}