Bug fix in MetrologyDlgFlowMeterTab, etc. when ranges are enabled
This commit is contained in:
@@ -70,9 +70,13 @@ namespace TBF.BenchControl.Elde.FlowMeter
|
||||
///
|
||||
public void Initialize()
|
||||
{
|
||||
if (flowMeterCfg.CalibValidDate != DateTime.MinValue && flowMeterCfg.CalibValidDate.Date < DateTime.Now.Date)
|
||||
for (int r = 0; r <= 5; r++)
|
||||
{
|
||||
throw new Exception(string.Format("{0}: {1}", Name, Strings.Calibration_certificate_validity_expired));
|
||||
if (RangeEnabled(r) && flowMeterCfg.GetCalibValidDate(r) != DateTime.MinValue
|
||||
&& flowMeterCfg.GetCalibValidDate(r).Date < DateTime.Now.Date)
|
||||
{
|
||||
throw new Exception(string.Format("{0}/r{1}: {2}", Name, r, Strings.Calibration_certificate_validity_expired));
|
||||
}
|
||||
}
|
||||
|
||||
log.FatalFormat("Successfully initialized device {0}", Name);
|
||||
|
||||
Reference in New Issue
Block a user