public Response MeasureStart(DeviceInfo device, int measureResult) { Response res = new Response(); res.MeasureId = -1; res.PathFolderData = ""; //Insert measure information var _measureId = _DBUltity.InsertMeasure(device.DeviceId, (int)device.MeasureType, device.AlarmValue, device.Period, device.FailLevel, device.Samples, DateTime.Now); if (_measureId < 1) { FormSetting.ShowMsg(MessageBoxIcon.Error, MSG_ERR_CONNECT_DB); return(res); } res.MeasureId = _measureId; return(res); }
public void MeasureStart() { //Insert measure information _measureId = _DBUltity.InsertMeasure(DeviceCurrent.deviceId, (int)MeasureType, DeviceCurrent.AlarmValue, DeviceCurrent.period, DeviceCurrent.failLevel, DeviceCurrent.samples, DateTime.Now); if (_measureId < 1) { FormSetting.ShowMsg(MessageBoxIcon.Error, MSG_ERR_CONNECT_DB); return; } }