blob: 7646e91c0bee23f4f539c0ceca7800bc18879e5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.BL.Enumerations;
namespace Tango.MachineStudio.Statistics.Models
{
public class JobRunModel
{
public JobRun JobRun { get; set; }
public Machine Machine { get; set; }
public User User { get; set; }
public TimeSpan? UploadDuration { get; set; }
public TimeSpan? HeatingDuration { get; set; }
public RmlModel Rml { get; set; }
public String Gen
{
get
{
return JobRun.MachineType == (int)MachineTypes.Eureka ? "X4" : "X1";
}
}
public void Init()
{
if (JobRun.HeatingStartDate != null)
{
UploadDuration = JobRun.HeatingStartDate - JobRun.StartDate;
}
if (JobRun.ActualStartDate != null && JobRun.HeatingStartDate != null)
{
HeatingDuration = JobRun.ActualStartDate - JobRun.HeatingStartDate;
}
if (JobRun.MachineType == (int)MachineTypes.Eureka)
{
JobRun.JobLogicalLength *= 4;
JobRun.JobLength *= 4;
JobRun.EndPosition *= 4;
}
}
}
}
|