/// <summary>
        ///     The TestSheets which are running at the moment
        /// </summary>
        /// <returns>the running production orders</returns>
        public ICollection <TestSheet> RunningTestSheets()
        {
            var today = DateTime.Today;
            var shift = ShiftHelper.GetCurrentShift();

            if (shift == null)
            {
                return(null);
            }
            return(TestSheetRepository.GetAll()
                   .Where(sheet => sheet.DayInYear.Equals(today.DayOfYear) && (sheet.ShiftType == shift))
                   .ToList());
        }
        /// <summary>
        ///     The current existing testsheet for given fanr or null if not existing
        /// </summary>
        /// <param name="faNr">the production order number</param>
        /// <returns>the current testsheet</returns>
        public TestSheet GetTestSheetForFaNr(String faNr)
        {
            var today = DateTime.Today;
            var shift = ShiftHelper.GetCurrentShift();

            if (shift == null)
            {
                return(null);
            }
            var testsheet = TestSheetRepository.GetAll()
                            .Where(sheet => sheet.FaNr.Equals(faNr) && sheet.DayInYear.Equals(today.DayOfYear) && (sheet.ShiftType == shift))
                            .ToList();

            return(testsheet.ToList()
                   .Count == 1
                ? testsheet[0]
                : null);
        }