Пример #1
0
 public StageVM(StagePerform stage)
 {
     Actions = stage.Stage.Outputs.Where(x=>!x.Hidden);
     ID = stage.StageId;
     Name = stage.Stage.Title;
     Color = stage.Stage.Color;
     BeginDate = stage.BeginDate;
     EndDateExpected = stage.BeginDate + TimeSpan.FromMinutes(stage.Stage.PerformancePeriod);
     ElapsedTime = DateTime.Now - stage.BeginDate;
     TimeLeft = TimeSpan.FromMinutes(stage.Stage.PerformancePeriod) - (DateTime.Now - stage.BeginDate);
     ElapsedPercentage = 100 * (DateTime.Now - stage.BeginDate).TotalSeconds / TimeSpan.FromMinutes(stage.Stage.PerformancePeriod).TotalSeconds;
     ElapsedString = ElapsedPercentage.ToString(CultureInfo.GetCultureInfo("en-US"));
     Performer = stage.PerformUser;
     FromUser = stage.FromUser;
 }
Пример #2
0
 public WorkflowAutoProcessException(StagePerform stagePerform, Exception inner)
     : base(inner.Message, inner)
 {
     StagePerform = stagePerform;
 }