diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-11-20 13:27:36 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-11-20 13:27:36 +0200 |
| commit | c272cdaaa43f7bf2fefcb36bbfe49624fc4a5ff1 (patch) | |
| tree | bcc9ccd584d7cc706f6453e7a906fa3f1485ef53 /Software/Visual_Studio/Tango.BL/Entities/JobRun.cs | |
| parent | fa8459be63d8f76059d1e71ab86c01e0a13851b5 (diff) | |
| download | Tango-c272cdaaa43f7bf2fefcb36bbfe49624fc4a5ff1.tar.gz Tango-c272cdaaa43f7bf2fefcb36bbfe49624fc4a5ff1.zip | |
Added job runs logger to machine studio.
Diffstat (limited to 'Software/Visual_Studio/Tango.BL/Entities/JobRun.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.BL/Entities/JobRun.cs | 57 |
1 files changed, 47 insertions, 10 deletions
diff --git a/Software/Visual_Studio/Tango.BL/Entities/JobRun.cs b/Software/Visual_Studio/Tango.BL/Entities/JobRun.cs index b4ecf4f5a..6e953f5ce 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/JobRun.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/JobRun.cs @@ -21,6 +21,11 @@ using Tango.Core; namespace Tango.BL.Entities { + + /// <summary> + /// + /// </summary> + [Table("JOB_RUNS")] public partial class JobRun : ObservableEntity<JobRun> { @@ -29,7 +34,9 @@ namespace Tango.BL.Entities public event EventHandler<DateTime> EndDateChanged; - public event EventHandler<Boolean> SuccessfulChanged; + public event EventHandler<Int32> StatusChanged; + + public event EventHandler<String> FailedMessageChanged; public event EventHandler<Job> JobChanged; @@ -115,30 +122,60 @@ namespace Tango.BL.Entities } } - protected Boolean _successful; + protected Int32 _status; + + /// <summary> + /// 0 = COMPLETED + /// 1 = ABORTED + /// 2 = FAILED + /// </summary> + + [Column("STATUS")] + + public Int32 Status + { + get + { + return _status; + } + + set + { + if (_status != value) + { + _status = value; + + StatusChanged?.Invoke(this, value); + + RaisePropertyChanged(nameof(Status)); + } + } + } + + protected String _failedmessage; /// <summary> - /// Gets or sets the jobrun successful. + /// Gets or sets the jobrun failed message. /// </summary> - [Column("SUCCESSFUL")] + [Column("FAILED_MESSAGE")] - public Boolean Successful + public String FailedMessage { get { - return _successful; + return _failedmessage; } set { - if (_successful != value) + if (_failedmessage != value) { - _successful = value; + _failedmessage = value; - SuccessfulChanged?.Invoke(this, value); + FailedMessageChanged?.Invoke(this, value); - RaisePropertyChanged(nameof(Successful)); + RaisePropertyChanged(nameof(FailedMessage)); } } } |
