Esempio n. 1
0
        public void MeasureEnd(DeviceInfo device, List <MaxValue> lstMaxValue, int measureResult, DateTime?measureEndTime)
        {
            var _hasErrDB = false;

            if (device.MeasureType == emMeasureType.WalkingTest && lstMaxValue != null)
            {
                foreach (var data in lstMaxValue)
                {
                    var dtSample = data.dtSample;
                    dtSample.result = (int)emMeasureResult.Fail;
                    InsertMeasureLimit(dtSample, _DBUltity, device.MeasureId);
                }
            }

            if (!_DBUltity.UpdateEndTimeMeasure(device.MeasureId, measureEndTime.Value, measureResult))
            {
                _hasErrDB = true;
                WriteFileErrors(clsConfig.MEASURE_NAME_FILE, _DBUltity.GetUpdateEndTimeMeasure(device.MeasureId, measureEndTime.Value, measureResult), device.MeasureId);
            }

            if (_hasErrDB)
            {
                FormSetting.ShowMsg(MessageBoxIcon.Error, MSG_ERR_HAS_DB);
            }
        }
Esempio n. 2
0
        public void MeasureEnd()
        {
            if (MeasureType == emMeasureType.WalkingTest && FormSetting.ListMaxValue != null)
            {
                foreach (var data in FormSetting.ListMaxValue)
                {
                    var dtSample = data.dtSample;
                    dtSample.result = (int)emMeasureResult.Fail;
                    InsertMeasureLimit(dtSample, _DBUltity);
                }
            }

            if (!_DBUltity.UpdateEndTimeMeasure(_measureId, FormSetting.MeasureEndTime, FormSetting.MeasureResult))
            {
                _hasErrDB = true;
                WriteFileErrors(clsConfig.MEASURE_NAME_FILE, _DBUltity.GetUpdateEndTimeMeasure(_measureId, FormSetting.MeasureEndTime, FormSetting.MeasureResult));
            }

            if (_hasErrDB)
            {
                FormSetting.ShowMsg(MessageBoxIcon.Error, MSG_ERR_HAS_DB);
            }
        }