public bool IsWithinLimits(FCCLTestType testType, string value) { bool isWithin = true; decimal convertedValue; Interval interval = GetIntervalByType(testType); if(decimal.TryParse(value, out convertedValue) && convertedValue > 0) { if(interval.MinVal > convertedValue || convertedValue > interval.MaxVal) { isWithin = false; } } return isWithin; }
public bool IsWithinLimits(FCCLTestType testType, string value) { bool isWithin = true; decimal convertedValue; Interval interval = GetIntervalByType(testType); if (decimal.TryParse(value, out convertedValue) && convertedValue > 0) { if (interval.MinVal > convertedValue || convertedValue > interval.MaxVal) { isWithin = false; } } return(isWithin); }
public Interval GetIntervalByType(FCCLTestType testType) { return(repo.Get().Where(s => (s.Application == application || s.Application == 0)).OrderByDescending(s => s.Application) .FirstOrDefault(s => s.Type == (int)testType)); }
public Interval GetIntervalByType(FCCLTestType testType) { return repo.Get().Where(s => (s.Application == application || s.Application == 0)).OrderByDescending(s => s.Application) .FirstOrDefault(s => s.Type == (int)testType); }