public void SetState()
        {
            TimeSpan diff = DateTime.Now - this.m_OrderTime;

            if (diff.TotalHours > 72)
            {
                this.m_State = MonitorStateEnum.Critical;
            }
            else if (diff.TotalHours > 24)
            {
                this.m_State = MonitorStateEnum.Warning;
            }
            else
            {
                this.m_State = MonitorStateEnum.Warning;
            }
        }
        public void SetState()
        {
            TimeSpan singleScreenLookback   = new TimeSpan(24, 0, 0);
            TimeSpan multipleScreenLookback = new TimeSpan(30, 0, 0);

            this.m_HoursSinceAccessioned = YellowstonePathology.Business.Helper.DateTimeExtensions.GetHoursBetweenExcludingWeekends(this.m_AccessionTime, DateTime.Now);

            if (this.Final == false)
            {
                if (this.m_AccessionTime.Day == DateTime.Today.Day)
                {
                    this.m_State = MonitorStateEnum.Normal;
                }
                else if (this.m_AccessionTime.Day != DateTime.Today.Day)
                {
                    if (this.m_ScreeningCount == 1)
                    {
                        if (this.m_HoursSinceAccessioned.TotalHours > singleScreenLookback.TotalHours)
                        {
                            this.m_State = MonitorStateEnum.Critical;
                        }
                        else
                        {
                            this.m_State = MonitorStateEnum.Warning;
                        }
                    }
                    else
                    {
                        if (this.m_HoursSinceAccessioned.TotalHours > multipleScreenLookback.TotalHours)
                        {
                            this.m_State = MonitorStateEnum.Critical;
                        }
                        else
                        {
                            this.m_State = MonitorStateEnum.Warning;
                        }
                    }
                }
            }
            else
            {
                this.m_State = MonitorStateEnum.Normal;
            }
        }
Beispiel #3
0
        public void SetState()
        {
            this.SetRunningTime();
            this.SetGoalTime();
            this.SetDifference();

            if (this.m_Difference.TotalMinutes < 0)
            {
                this.m_State = MonitorStateEnum.Critical;
            }
            else if (this.m_IsDelayed == true)
            {
                this.m_State = MonitorStateEnum.Warning;
            }
            else
            {
                this.m_State = MonitorStateEnum.Normal;
            }
        }
Beispiel #4
0
        public void SetState()
        {
            this.SetRunningTime();
            this.SetGoalTime();
            this.SetDifference();

            if (this.m_Difference.TotalMinutes < 0)
            {
                this.m_State = MonitorStateEnum.Critical;
            }
            else if (this.m_IsDelayed == true)
            {
                this.m_State = MonitorStateEnum.Warning;
            }
            else
            {
                this.m_State = MonitorStateEnum.Normal;
            }
        }
        public void SetState()
        {
            TimeSpan singleScreenLookback = new TimeSpan(24, 0, 0);
            TimeSpan multipleScreenLookback = new TimeSpan(30, 0, 0);

            this.m_HoursSinceAccessioned = YellowstonePathology.Business.Helper.DateTimeExtensions.GetHoursBetweenExcludingWeekends(this.m_AccessionTime, DateTime.Now);

            if (this.Final == false)
            {
                if (this.m_AccessionTime.Day == DateTime.Today.Day)
                {
                    this.m_State = MonitorStateEnum.Normal;
                }
                else if (this.m_AccessionTime.Day != DateTime.Today.Day)
                {
                    if (this.m_ScreeningCount == 1)
                    {
                        if (this.m_HoursSinceAccessioned.TotalHours > singleScreenLookback.TotalHours)
                        {
                            this.m_State = MonitorStateEnum.Critical;
                        }
                        else
                        {
                            this.m_State = MonitorStateEnum.Warning;
                        }
                    }
                    else
                    {
                        if (this.m_HoursSinceAccessioned.TotalHours > multipleScreenLookback.TotalHours)
                        {
                            this.m_State = MonitorStateEnum.Critical;
                        }
                        else
                        {
                            this.m_State = MonitorStateEnum.Warning;
                        }
                    }
                }
            }
            else
            {
                this.m_State = MonitorStateEnum.Normal;
            }
        }
 public void SetState()
 {
     TimeSpan diff = DateTime.Now - this.m_OrderTime;
     if (diff.TotalHours > 72)
     {
         this.m_State = MonitorStateEnum.Critical;
     }
     else if (diff.TotalHours > 24)
     {
         this.m_State = MonitorStateEnum.Warning;
     }
     else
     {
         this.m_State = MonitorStateEnum.Warning;
     }
 }